WSDL Page:  http://yourdomainhere.com/api/1/addedit.asmx?op=ExchangeRate

 

Parameter Summary:

api_key / STRING = Admin API Key {See get.asmx > GetAPIKey}

start_date /DATETIME = Exchange Rate Start Date [YYYY-MM-DDTHH:MM:SS]

end_date/ DATETIME = Exchange Rate End Date [YYYY-MM-DDTHH:MM:SS]

exchange_rates / STRING = The exchange rates you wish to add/edit [To "ADD" new Exchange Rates pass "start_date" & "end_date" for a period that does not exist / To "EDIT" exiting rates, "start_date" & "end_date" of an existing period] {See get.asmx > Currencies} & {See get.asmx > ExchangeRates}

 

Parameter Types:

api_key - ID

start_date - ASSIGNABLE

end_date - ASSIGNABLE

exchange_rates - ASSIGNABLE

 

Note: Passing the inverse will result in an error. Also you cannot pass a date range that spans over an existing period, that is not an exact match to an existing period. If you do the service will error. You must pass all currencies, omitting any currencies will result in an error.

 

Sample ADD SOAP 1.1 Call:

POST /api/1/addedit.asmx HTTP/1.1
SOAPAction: "http://cakemarketing.com/api/1/ExchangeRate"
Host: demo.cakemarketing.com
Content-Length: 2335
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ExchangeRate xmlns="http://cakemarketing.com/api/1/">
      <api_key>dNJFmId9rI</api_key>
      <start_date>2014-09-01T12:00:00</start_date>
      <end_date>2014-09-02T12:00:00</end_date>
      <exchange_rates>
        <exchange_rate>
          <base_currency_id>1</base_currency_id>
          <quote_currency_id>2</quote_currency_id>
          <rate>1.2</rate>
        </exchange_rate>
        <exchange_rate>
          <base_currency_id>1</base_currency_id>
          <quote_currency_id>3</quote_currency_id>
          <rate>1.3</rate>
        </exchange_rate>
        <exchange_rate>
          <base_currency_id>1</base_currency_id>
          <quote_currency_id>4</quote_currency_id>
          <rate>1.4</rate>
        </exchange_rate>
        <exchange_rate>
          <base_currency_id>1</base_currency_id>
          <quote_currency_id>5</quote_currency_id>
          <rate>1.5</rate>
        </exchange_rate>
        <exchange_rate>
          <base_currency_id>2</base_currency_id>
          <quote_currency_id>3</quote_currency_id>
          <rate>2.3</rate>
        </exchange_rate>
        <exchange_rate>
          <base_currency_id>2</base_currency_id>
          <quote_currency_id>4</quote_currency_id>
          <rate>2.4</rate>
        </exchange_rate>
        <exchange_rate>
          <base_currency_id>2</base_currency_id>
          <quote_currency_id>5</quote_currency_id>
          <rate>2.5</rate>
        </exchange_rate>
        <exchange_rate>
          <base_currency_id>3</base_currency_id>
          <quote_currency_id>4</quote_currency_id>
          <rate>3.4</rate>
        </exchange_rate>
        <exchange_rate>
          <base_currency_id>3</base_currency_id>
          <quote_currency_id>5</quote_currency_id>
          <rate>3.5</rate>
        </exchange_rate>
        <exchange_rate>
          <base_currency_id>4</base_currency_id>
          <quote_currency_id>5</quote_currency_id>
          <rate>4.5</rate>
        </exchange_rate>
      </exchange_rates>
    </ExchangeRate>
  </soap:Body>
</soap:Envelope>

 Note: The request in this scenario has a total of 5 currencies in the system, so all 5 rates were covered in my request.

Sample XML Response:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <ExchangeRateResponse xmlns="http://cakemarketing.com/api/1/">
      <ExchangeRateResult>
        <success>true</success>
        <message>Exchange Rates Successfully Created</message>
      </ExchangeRateResult>
    </ExchangeRateResponse>
  </soap:Body>
</soap:Envelope>