Legacy SOAP API

For this API you need a set of credentials. These are different from the API Keys the REST API uses. You’ll find them in the dashboard, under settings.

The API is compatible with the old Nimta API, so in order to switch from the OnlineCity NIMTA Messaging Gateway, to GatewayAPI.com, you can simply switch the SOAP endpoint and update your credentials etc, but not otherwise change anything.

We still strongly recommend the new APIs such as the REST API, because that’s the API we will focus on going forward.

Compared to the SOAP API, the REST offers
  • Improved security, incl. replay attack protection
  • SMS Tags
  • Message priority selection
  • User specified tracking references
  • Improved performance
  • etc...

How to switch

If you want to switch from nimta.com to gatewayapi.com, there are just three configuration changes you need to made.

Required changes

Request example

POST /legacy/soap

Send a SMS message.

Example request:

POST /legacy/soap HTTP/1.1
Host: gatewayapi.com
Connection: Keep-Alive
Content-Type: application/soap+xml; charset=utf-8; action="http://www.nimta.com/webservices/Gateway/sendSMSes"
Content-Length: 1716

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://www.nimta.com/webservices/Gateway">
  <env:Body>
    <ns1:sendSMSes>
      <ns1:username>secret</ns1:username>
      <ns1:password>secret</ns1:password>
      <ns1:gatewayClass>standard</ns1:gatewayClass>
      <ns1:messages>
        <ns1:SMSSendMessage>
          <ns1:message>Lorem ipsum dolor sit amet</ns1:message>
          <ns1:alphatext>Example SMS</ns1:alphatext>
          <ns1:charge>0</ns1:charge>
          <ns1:delayed>false</ns1:delayed>
          <ns1:sendTime>2016-10-26T23:23:47+02:00</ns1:sendTime>
          <ns1:recipients>
            <ns1:Recipient>
              <ns1:countryCode>45</ns1:countryCode>
              <ns1:number>12345678</ns1:number>
              <ns1:operatorCode>3</ns1:operatorCode>
            </ns1:Recipient>
          </ns1:recipients>
        </ns1:SMSSendMessage>
      </ns1:messages>
    </ns1:sendSMSes>
  </env:Body>
</env:Envelope>

Example response:

HTTP/1.0 200 OK
Content-Length: 340
Content-Type: application/soap+xml; charset=utf-8
Server: Werkzeug/0.11.11 Python/3.5.1
Date: Wed, 26 Oct 2016 21:23:47 GMT

<?xml version="1.0" encoding="UTF-8"?>
<soap12env:Envelope xmlns:soap12env="http://www.w3.org/2003/05/soap-envelope" xmlns:tns="http://www.nimta.com/webservices/Gateway">
  <soap12env:Body>
    <tns:sendSMSesResponse>
      <tns:sendSMSesResult>
        <tns:int>1641644</tns:int>
      </tns:sendSMSesResult>
    </tns:sendSMSesResponse>
  </soap12env:Body>
</soap12env:Envelope>

API Reference

Unfortunately we have not converted the documentation to this new format yet, but you can still use the old documentation with this API.

You can find it on https://oc.dk/gateway/#api or embedded below if reading online.