SOAP Exchange Rates API with Web Services 1.0
Overview
Exchange rates are applied to currency attributes in both Configuration and Commerce based on the user’s currency preference (or session / transaction currency preference). You can generate a skeleton input for each operation in the exchange rates WSDL, which contains 3 operations:
- modifyExchangeRate
- deleteExchangeRate
- getExchangeRate
For each operation, there are 3 fields that are always required in the header:
- sessionID
- category: Exchange Rates
- schemaLocation
Exchange Rates SOAP API Details
modifyExchangeRate |
Allows the user the ability to modify the conversion rate and uplift rate from the base currency to any other supported currency. |
sessionID
category
schemaLocation
sourceCurrencyCode
targetCurrencyCode
conversionRate
Note: The conversionRate is limited to 4 decimal points.
|
status:
success
message
|
exceptionCode
exceptionMessage
|
deleteExchangeRate |
Allows the user to delete a conversion rate and/or uplift rate for the specified currency. For example, if its no longer supported. |
sessionID
category
schemaLocation
targetCurrencyCode
|
status:
success
message
|
exceptionCode
exceptionMessage
|
getExchangeRate |
Allows the user to get the value of the conversion rate and uplift rate for the specified currency. This user can then determine if it needs to be updated. |
sessionID
category
schemaLocation
sourceCurrencyCode
targetCurrencyCode
|
status:
success
message
|
exceptionCode
exceptionMessage
|
Administration
Accessing Users WSDL and Generating Skeleton Input
- Navigate from Admin Home Page > Integration Platform > Web Services.
- Click the Exchange Rates tab.
- Select an API from the drop-down menu.
- Click Generate Input to retrieve the skeleton.
Sample Exchange Rates APIs
modifyExchangeRate - Input SOAP XML
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<bm:userInfo xmlns:bm="urn:soap.bigmachines.com">
<bm:sessionId>A99EA9EA9FFC03C02AF30373A60CFD60</bm:sessionId>
</bm:userInfo>
<bm:category xmlns:bm="urn:soap.bigmachines.com">Exchange Rates</bm:category>
<bm:xsdInfo xmlns:bm="urn:soap.bigmachines.com">
<bm:schemaLocation>https://pm.bigmachines.com/bmfsweb/pm/schema/v1_0/exchangerates/Exchange_Rates.xsd</bm:schemaLocation>
</bm:xsdInfo>
</soapenv:Header>
<soapenv:Body>
<bm:modifyExchangeRate xmlns:bm="urn:soap.bigmachines.com">
<bm:exchangeRates>
<bm:each_record>
<bm:sourceCurrencyCode>USD</bm:sourceCurrencyCode><bm:targetCurrencyCode>AUD</bm:targetCurrencyCode>
<bm:conversionRate/>
<bm:upliftRate/>
</bm:each_record>
<bm:each_record>
<bm:sourceCurrencyCode>USD</bm:sourceCurrencyCode>
<bm:targetCurrencyCode>CAD</bm:targetCurrencyCode>
<bm:conversionRate/>
<bm:upliftRate/>
</bm:each_record>
<bm:each_record>
<bm:sourceCurrencyCode>USD</bm:sourceCurrencyCode>
<bm:targetCurrencyCode>CHF</bm:targetCurrencyCode>
<bm:conversionRate/>
<bm:upliftRate/>
</bm:each_record>
<bm:each_record>
<bm:sourceCurrencyCode>USD</bm:sourceCurrencyCode>
<bm:targetCurrencyCode>EUR</bm:targetCurrencyCode>
<bm:conversionRate/>
<bm:upliftRate/>
</bm:each_record>
<bm:each_record>
<bm:sourceCurrencyCode>USD</bm:sourceCurrencyCode>
<bm:targetCurrencyCode>GBP</bm:targetCurrencyCode>
<bm:conversionRate/>
<bm:upliftRate/>
</bm:each_record>
<bm:each_record>
<bm:sourceCurrencyCode>USD</bm:sourceCurrencyCode>
<bm:targetCurrencyCode>JPY</bm:targetCurrencyCode>
<bm:conversionRate/>
<bm:upliftRate/>
</bm:each_record>
</bm:exchangeRates>
</bm:modifyExchangeRate>
</soapenv:Body>
</soapenv:Envelope>
Highlighted tags are required.
deleteExchangeRate - Input SOAP XML
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<bm:userInfo xmlns:bm="urn:soap.bigmachines.com">
<bm:sessionId>A99EA9EA9FFC03C02AF30373A60CFD60</bm:sessionId>
</bm:userInfo>
<bm:category xmlns:bm="urn:soap.bigmachines.com">Exchange Rates</bm:category>
<bm:xsdInfo xmlns:bm="urn:soap.bigmachines.com">
<bm:schemaLocation>https://pm.bigmachines.com/bmfsweb/pm/schema/v1_0/exchangerates/Exchange_Rates.xsd</bm:schemaLocation>
</bm:xsdInfo>
</soapenv:Header>
<soapenv:Body>
<bm:deleteExchangeRate xmlns:bm="urn:soap.bigmachines.com">
<bm:exchangeRates>
<bm:each_record>
<bm:targetCurrencyCode/>
</bm:each_record>
</bm:exchangeRates>
</bm:deleteExchangeRate>
</soapenv:Body>
</soapenv:Envelope>
Highlighted tags are required.
getExchangeRate - Input SOAP XML
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<bm:userInfo xmlns:bm="urn:soap.bigmachines.com">
<bm:sessionId>A99EA9EA9FFC03C02AF30373A60CFD60</bm:sessionId>
</bm:userInfo>
<bm:category xmlns:bm="urn:soap.bigmachines.com">Exchange Rates</bm:category>
<bm:xsdInfo xmlns:bm="urn:soap.bigmachines.com">
<bm:schemaLocation>https://pm.bigmachines.com/bmfsweb/pm/schema/v1_0/exchangerates/Exchange_Rates.xsd</bm:schemaLocation>
</bm:xsdInfo>
</soapenv:Header>
<soapenv:Body>
<bm:getExchangeRate xmlns:bm="urn:soap.bigmachines.com">
<bm:exchangeRate>
<bm:sourceCurrencyCode>USD</bm:sourceCurrencyCode>
<bm:targetCurrencyCode/>
</bm:exchangeRate>
</bm:getExchangeRate>
</soapenv:Body>
</soapenv:Envelope>
Highlighted tags are required.
Notes
SOAP requests must include "Agent" information.
Related Topics
See Also