{"swagger":"2.0","info":{"description":"AAT SMS Service.  Find out more at  [https://www.vodacommessaging.co.za/](https://www.vodacommessaging.co.za/) .","version":"1.0.0","title":"AAT SMS Service","termsOfService":"https://www.vodacommessaging.co.za/terms.asp","contact":{"email":"support@aat.co.za"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"host":"demo.streetmaps.co.za","basePath":"/test","tags":[{"name":"sms","description":"SMS Operations","externalDocs":{"description":"Find out more","url":"https://www.vodacommessaging.co.za/XML2SMS/functions.asp"}}],"schemes":["https"],"paths":{"/send":{"get":{"tags":["sms"],"summary":"Send an SMS","description":"Send a single SMS","operationId":"Sendsms","produces":["application/json"],"parameters":[{"name":"gw","in":"query","description":"SMS Gateway to use","required":true,"type":"string","enum":["smsgw1","smsgw2","smsgw3","smsgw4"]},{"name":"number","in":"query","description":"Number to send to, this should be an ITU E.164 number (https://www.itu.int/rec/T-REC-E.164/en)","required":true,"type":"string"},{"name":"message","in":"query","description":"Message to send","required":true,"type":"string"},{"name":"ems","in":"query","description":"Send as an EMS. Set this to 0 to reject messages over 160 characters","type":"integer","enum":[0,1],"default":1}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/submitresults"}},"400":{"description":"Invalid status value"}}}},"/sendlog":{"get":{"tags":["sms"],"summary":"Send Logs","operationId":"Sendlogs","description":"Retrieve Sent Logs","produces":["application/json"],"parameters":[{"name":"gw","in":"query","description":"SMS Gateway to use","required":true,"type":"string","enum":["smsgw1","smsgw2","smsgw3","smsgw4"]},{"name":"key","in":"query","description":"Return the status of only the specified SMS","required":false,"type":"integer"},{"name":"watermark","in":"query","description":"Returns all SMS messages including and after watermark","required":false,"type":"integer"},{"name":"startdate","in":"query","description":"Format: YYYYMMDD, Returns all SMS messages including and after startdate","required":false,"type":"string"},{"name":"enddate","in":"query","description":"Format: YYYYMMDD, Returns all SMS messages up to and including enddate","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/logresults"}}}}},"/recvlog":{"get":{"tags":["sms"],"summary":"Receive Logs","description":"Retrieve Receive Logs","operationId":"Recvlog","produces":["application/json"],"parameters":[{"name":"gw","in":"query","description":"SMS Gateway to use","required":true,"type":"string","enum":["smsgw1","smsgw2","smsgw3","smsgw4"]},{"name":"key","in":"query","description":"Return the status of only the specified SMS","required":false,"type":"integer"},{"name":"watermark","in":"query","description":"Returns all SMS messages including and after watermark","required":false,"type":"integer"},{"name":"startdate","in":"query","description":"Format: YYYYMMDD, Returns all SMS messages including and after startdate","required":false,"type":"string"},{"name":"enddate","in":"query","description":"Format: YYYYMMDD, Returns all SMS messages up to and including enddate","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/logresults"}}}}}},"definitions":{"Error":{"type":"integer","format":"int32","enum":[0,1,3,4,5,7,8,11,25,69,116,120,123,124,134,195,196,254,1036,1037,1038,1039,1042],"description":"Error Code - code, definition, description, action * 0, Delivered, no error * 1, Enroute, SMS submitted to operator * 3, Expired, Mobile number off/unavailable and delivery retry expired on SMSC, Query with subscriber * 4, Deleted by SMSC, Delivery to mobile device not allowed, Subscriber to query Operator * 5, Cannot Deliver, Destination device not available on network. Ported/Cancelled SIM, Query with subscriber * 7, Cannot Deliver, Phone is off / GSM Network error / Phone out of range / SIM card full, Query with subscriber * 8, Delivery Failure, Destination SIM Full or SMS receiving turned off on phone, Query with subscriber * 11, Abandoned, Invalid Destination Address, Fix destination mobile number * 25, Abandoned, Invalid Destination Address, Fix destination mobile number * 69, submit_sm failure, Maximum Delivery Number Exceeded, Reduce traffic to mobile number/Submit SMS later * 116,  Unknown SCP Error, Suspended subscriber account, Query with subscriber * 120, VAS Unavailable to Called Party, Barred subscriber/Black listed, Query with subscriber * 123, Reserved Error, Unknown failure, Contact Support Desk * 124, submit_sm failure, Maximum Delivery Number Exceeded, Reduce traffic to mobile number/Submit SMS later * 134, Reserved Error, Unknown failure, Contact Support Desk * 150, Invalid username or password. * 151, Reading of send / receive logs disabled on Gateway account. * 152, Sending SMS disabled on Gateway account. * 153, Not enough credits to send SMS. * 154, Attempted to submit an invalid number (format or banned). * 155, Duplicate message submitted within the last 15 minutes. * 156, There is no routing available for the destination number, which is usually due to an invalid number being submitted. * 157, Gateway DNS not found. * 158, No subscription to HTTP 2 SMS. * 159, Invalid path. * 160, Problem communicating with Gateway. * 161, Invalid query string. * 195, Missing OPT Param, Missing Optional Parameter, Contact Support Desk * 196, Invalid OPT Param, Invalid Optional, Parameter Contact Support Desk * 254, Delivery Failure, Failure on subscriber end, Query with subscriber * 1036, Called Party Not Existent or Incorrect State, Cancelled SIM/Porting not updated, Query with subscriber * 1037, Called Party Not Existent or Incorrect State, Cancelled SIM/Porting not updated, Query with subscriber * 1038, VAS Unavailable to Called Party, Barred subscriber/Black listed, Query with subscriber * 1039, Insufficient Balance of Calling Party, Suspended subscriber account, Query with subscriber * 1042 submit_sm failure, Maximum Delivery Number Exceeded, Reduce traffic to mobile number/Submit SMS later"},"submitresults":{"type":"object","properties":{"submitresult":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["enqueued","not enqueued"],"description":"Status of the message * enqueued - the message was accepted for delivery * not enqueud - the message was not accepted for delivery"},"key":{"type":"string","description":"The unique reference of this SMS"},"result":{"type":"integer","format":"int32","enum":[0,1],"description":"The result of the operation, * 1 - the message was accepted for delivery * 0 - the message was not accepted for delivery"},"number":{"type":"string","description":"The mobile number this message was sent to"},"error":{"$ref":"#/definitions/Error"}}}}}},"logresults":{"type":"object","properties":{"message":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["sent","received"],"description":"Incoming (received) or outgoing (sent) SMS"},"key":{"type":"string","description":"The internal key this SMS was assigned"},"tonumber":{"type":"string","description":"The number this SMS was sent to"},"message":{"type":"string","description":"The message text"},"timesent":{"type":"string","description":"If type=sent, this will contain the time this SMS was sent.  Format: dd-MMM-yyyy hh:mm:ss"},"timereceived":{"type":"string","description":"If type=received, this will contain the time this SMS was received.  Format: dd-MMM-yyyy hh:mm:ss"},"timedelivered":{"type":"string","description":"If type=sent, this will contain the time this SMS was delivered.  Format: dd-MMM-yyyy hh:mm:ss"},"delivered":{"type":"integer","format":"int32","enum":[0,1],"description":"SMS delivery state. * 1 - delivered * 0 - not delivered, check the status"},"status":{"$ref":"#/definitions/Error"},"statusdescription":{"type":"string","description":"Description of the status"}}}}}}},"securityDefinitions":{"basicAuth":{"type":"basic"}},"security":[{"basicAuth":[]}]}