{"swagger":"2.0","info":{"title":"A2P Messaging","version":"1.0.0","description":"Spark Wholesale's A2P messaging API offers management of short code SMS connectivity to New Zealand's three mobile networks. The API also provides metrics to understand the near-real time performance of message carriage including message statuses, delivery rates, volumes and average delivery time across short codes. "},"servers":[{"url":"http://localhost:3000"}],"paths":{"/v1/services/a2p-messaging/customers/{customerNumber}":{"parameters":[{"schema":{"type":"string"},"name":"customerNumber","in":"path","required":true}],"get":{"summary":"Customers","tags":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"customers":{"type":"array","uniqueItems":true,"minItems":1,"items":{"required":["customerId","customerNumber","customerName"],"properties":{"customerId":{"type":"string","minLength":1},"customerNumber":{"type":"string","minLength":1},"customerName":{"type":"string","minLength":1}}}}},"required":["customers"]},"examples":{"Spark Internal":{"value":{"customers":[{"customerId":"1","customerNumber":"-1","customerName":"Telecom"}]}}}},"application/xml":{"schema":{"type":"object","properties":{}}},"multipart/form-data":{"schema":{"type":"object","properties":{}}}}}},"operationId":"get-v1-services-external-a2p-messaging-customers-customerNumber","description":"Return a single customer from the A2P repository"}},"/v1/services/a2p-messaging/customers/{customerNumber}/usage":{"parameters":[{"schema":{"type":"string"},"name":"customerNumber","in":"path","required":true}],"get":{"summary":"Usage","tags":[],"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"Last 7 days":{"value":{"usage":{"length":7,"interval":"days","dateTimeStart":"2020-12-25T00:00:00.000Z","dateTimeEnd":"2021-01-01T00:00:00.000Z","totalSmsCount":300,"sentSmsCount":100,"deliveredSmsCount":100,"failedSmsCount":100,"series":[{"dateTime":"2021-01-01T00:01:00.000Z","totalCount":3,"sentCount":1,"deliveredCount":1,"failedCount":1},{"dateTime":"2020-12-31T00:01:00.000Z","totalCount":3,"sentCount":1,"deliveredCount":1,"failedCount":1},{"dateTime":"2020-12-30T00:01:00.000Z","totalCount":3,"sentCount":1,"deliveredCount":1,"failedCount":1},{"dateTime":"2020-12-29T00:01:00.000Z","totalCount":3,"sentCount":1,"deliveredCount":1,"failedCount":1},{"dateTime":"2020-12-28T00:01:00.000Z","totalCount":3,"sentCount":1,"deliveredCount":1,"failedCount":1},{"dateTime":"2020-12-27T00:01:00.000Z","totalCount":3,"sentCount":1,"deliveredCount":1,"failedCount":1},{"dateTime":"2020-12-26T00:01:00.000Z","totalCount":3,"sentCount":1,"deliveredCount":1,"failedCount":1},{"dateTime":"2020-12-25T00:01:00.000Z","totalCount":282,"sentCount":94,"deliveredCount":94,"failedCount":94}]}}}}}}}},"parameters":[{"schema":{"type":"string","enum":["last7days","last30days","last6months","last12months"]},"in":"query","name":"dateRange","description":"Date Range","required":true}],"operationId":"get-v1-services-external-a2p-messaging-customers-customerNumber-usage"}},"/v1/services/a2p-messaging/usage/dateRanges":{"get":{"summary":"Available usage date ranges","tags":[],"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"All":{"value":{"dateRanges":["last7days","last30days","last6months","last12months"]}}}}}}},"operationId":"get-v1-services-a2p-messaging-usage-interval"},"parameters":[]},"/v1/services/a2p-messaging/shortcodes/{shortcodeNumber}/usage":{"parameters":[{"schema":{"type":"string"},"name":"shortcodeNumber","in":"path","description":"Shortcode number","required":true}],"get":{"summary":"Shortcodes usage","tags":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"shortcodes":{"type":"array","uniqueItems":true,"minItems":1,"items":{"required":["customerNumber","customerName","shortCodeNumber","status","type"],"properties":{"customerNumber":{"type":"number"},"customerName":{"type":"string","minLength":1},"shortCodeNumber":{"type":"number"},"status":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"actionTypes":{"type":"array"}}}}},"required":["shortcodes"]},"examples":{"Shortcodes by customer":{"value":{"shortcodes":[{"customerNumber":1,"customerName":"Spark","shortCodeNumber":1243,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"],"usage":{"length":7,"interval":"days","dateTimeStart":"2020-12-25T00:00:00.000Z","dateTimeEnd":"2021-01-01T00:00:00.000Z","totalSmsCount":300,"sentSmsCount":100,"deliveredSmsCount":100,"failedSmsCount":100}},{"customerNumber":1,"customerName":"Spark","shortCodeNumber":5463,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"],"usage":{"length":7,"interval":"days","dateTimeStart":"2020-12-25T00:00:00.000Z","dateTimeEnd":"2021-01-01T00:00:00.000Z","totalSmsCount":300,"sentSmsCount":100,"deliveredSmsCount":100,"failedSmsCount":100}},{"customerNumber":1,"customerName":"Spark","shortCodeNumber":5654,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"],"usage":{"length":7,"interval":"days","dateTimeStart":"2020-12-25T00:00:00.000Z","dateTimeEnd":"2021-01-01T00:00:00.000Z","totalSmsCount":300,"sentSmsCount":100,"deliveredSmsCount":100,"failedSmsCount":100}},{"customerNumber":1,"customerName":"Spark","shortCodeNumber":7545,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"],"usage":{"length":7,"interval":"days","dateTimeStart":"2020-12-25T00:00:00.000Z","dateTimeEnd":"2021-01-01T00:00:00.000Z","totalSmsCount":300,"sentSmsCount":100,"deliveredSmsCount":100,"failedSmsCount":100}},{"customerNumber":1,"customerName":"Spark","shortCodeNumber":4543,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"],"usage":{"length":7,"interval":"days","dateTimeStart":"2020-12-25T00:00:00.000Z","dateTimeEnd":"2021-01-01T00:00:00.000Z","totalSmsCount":300,"sentSmsCount":100,"deliveredSmsCount":100,"failedSmsCount":100}}]}}}}}}},"operationId":"get-v1-services-a2p-messaging-shortcodes?customerNumber=-customerNumber-customerNumber-usage","parameters":[{"schema":{"type":"string"},"in":"query","name":"customerNumber","description":"Customer number"}],"description":""}},"/v1/services/a2p-messaging/shortcodes/{shortcodeNumber}":{"parameters":[{"schema":{"type":"string"},"name":"shortcodeNumber","in":"path"}],"get":{"summary":"Shortcodes","tags":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"shortcodes":{"type":"array","uniqueItems":true,"minItems":1,"items":{"required":["customerNumber","customerName","shortCodeNumber","status","type"],"properties":{"customerNumber":{"type":"number"},"customerName":{"type":"string","minLength":1},"shortCodeNumber":{"type":"number"},"status":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"actionTypes":{"type":"array"}}}}},"required":["shortcodes"]},"examples":{"Shortcodes":{"value":{"shortcodes":[{"customerNumber":1,"customerName":"Spark","shortCodeNumber":1243,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"]},{"customerNumber":1,"customerName":"Spark","shortCodeNumber":5463,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"]},{"customerNumber":1,"customerName":"Spark","shortCodeNumber":5654,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"]},{"customerNumber":1,"customerName":"Spark","shortCodeNumber":7545,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"]},{"customerNumber":1,"customerName":"Spark","shortCodeNumber":4543,"status":"Active","type":"Standard","actionTypes":["View","Edit","Deactivate"]}]}}}}}}},"operationId":"get-v1-services-a2p-messaging-shortcodes-shortcodeNumber","parameters":[{"schema":{"type":"string"},"in":"query","name":"customerNumber","description":"Customer number"}],"description":""}}},"components":{"schemas":{},"responses":{}},"host":"virtserver.swaggerhub.com","basePath":"/equalexperts4/a2p/1.0.0","schemes":["https"]}