.wpb_animate_when_almost_visible { opacity: 1; }
SMS Botswana
Engage with your users via SMS in Botswana. Purchase SMS bundles with your Orange SIM card and get started in minutes.

SMS A2P

SMS A2P RESTful documentation based on Swagger 2.0 specification
[BASE URL: /, API VERSION: 1.0, HOST: http://api.orange.com]
    • implementation notes

      The POST /smsmessaging/v1/outbound/{senderAddress}/requests URI sends a SMS message to one mobile terminal. This operation is based on GSMA OneAPI SMS RESTful NetAPI

      response class (status 201)
      {
        "outboundSMSMessageRequest": {
          "address": "string",
          "outboundSMSTextMessage": {
            "message": "string"
          },
          "senderAddress": "string",
          "senderName": "string"
        }
      }
      parameters
      parametervaluedescriptionparameter typedata type
      (required)
      The MSISDN of the sender, including the 'tel:' protocol identifier and the country code prefixed by '+', must be URL-escaped.pathstring
      Individual outbound SMS message requestbody
      {
        "outboundSMSMessageRequest": {
          "address": "string",
          "outboundSMSTextMessage": {
            "message": "string"
          },
          "senderAddress": "string",
          "senderName": "string"
        }
      }
      response messages
      List of common error codes
      HTTP status codereasonresponse model
      400List of error codes:
      - SVC0001: A service error occurred
      - SVC0002: Invalid input value for message part
      - SVC0003: Invalid input value for message part
      - SVC0004: No valid addresses provided for message part
      - SVC0280: Message too long
      {
        "requestError": {
          "serviceException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      403List of error codes:
      - POL0001: A policy error occurred
      - POL0003: Too many addresses specified in message part
      - POL0007: Nested groups specified in message part not allowed
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      404List of error codes:
      - POL0010: Requested information unavailable as the retention time interval has expired
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      406List of error codes:
      - POL0011: Media type not supported
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      503List of error codes:
      - SVC1000: No resources This exception is thrown if there are no server resources available to process the request
      {
        "requestError": {
          "serviceException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
    • implementation notes

      The POST /smsmessaging/v1/outbound/{senderAddress}/subscriptions URI allows the consumer to subscribe to SMS delivery receipt (DR) notification. This operation is based on GSMA OneAPI SMS RESTful NetAPI

      response class (status 201)
      {
        "deliveryReceiptSubscription": {
          "callbackReference": {
            "notifyURL": "string"
          },
          "resourceURL": "string"
        }
      }
      parameters
      parametervaluedescriptionparameter typedata type
      (required)
      The MSISDN of the sender, including the 'tel:' protocol identifier and the country code prefixed by '+', must be URL-escaped.pathstring
      Delivery Receipt subscription requestbody
      {
        "deliveryReceiptSubscription": {
          "callbackReference": {
            "notifyURL": "string"
          },
          "resourceURL": "string"
        }
      }
      response messages
      List of common error codes
      HTTP status codereasonresponse model
      400List of error codes:
      - SVC0001: A service error occurred
      - SVC0002: Invalid input value for message part
      - SVC0003: Invalid input value for message part
      - SVC0004: No valid addresses provided for message part
      - SVC0280: Message too long
      {
        "requestError": {
          "serviceException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      403List of error codes:
      - POL0001: A policy error occurred
      - POL0003: Too many addresses specified in message part
      - POL0007: Nested groups specified in message part not allowed
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      404List of error codes:
      - POL0010: Requested information unavailable as the retention time interval has expired
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      406List of error codes:
      - POL0011: Media type not supported
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      503List of error codes:
      - SVC1000: No resources This exception is thrown if there are no server resources available to process the request
      {
        "requestError": {
          "serviceException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
    • implementation notes

      The GET /smsmessaging/v1/outbound/{senderAddress}/subscriptions/{subscriptionId} URI retrieves information related to Delivery Receipt (DR) notification subscription according to a given subscription identifier

      response class (status 200)
      {
        "deliveryReceiptSubscription": {
          "callbackReference": {
            "notifyURL": "string"
          },
          "resourceURL": "string"
        }
      }
      parameters
      parametervaluedescriptionparameter typedata type
      (required)
      The MSISDN of the sender, including the 'tel:' protocol identifier and the country code prefixed by '+', must be URL-escaped.pathstring
      (required)
      Identifier of the DR notifications susbscription to retrievepathstring
      response messages
      List of common error codes
      HTTP status codereasonresponse model
      400List of error codes:
      - SVC0001: A service error occurred
      - SVC0002: Invalid input value for message part
      - SVC0003: Invalid input value for message part
      - SVC0004: No valid addresses provided for message part
      - SVC0280: Message too long
      {
        "requestError": {
          "serviceException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      403List of error codes:
      - POL0001: A policy error occurred
      - POL0003: Too many addresses specified in message part
      - POL0007: Nested groups specified in message part not allowed
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      404List of error codes:
      - POL0010: Requested information unavailable as the retention time interval has expired
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      406List of error codes:
      - POL0011: Media type not supported
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      503List of error codes:
      - SVC1000: No resources This exception is thrown if there are no server resources available to process the request
      {
        "requestError": {
          "serviceException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
    • implementation notes

      The GET /smsmessaging/v1/outbound/{senderAddress}/subscriptions/{subscriptionId} URI deletes information related to Delivery Receipt (DR) notification subscription according to a given subscription identifier

      parameters
      parametervaluedescriptionparameter typedata type
      (required)
      The MSISDN of the sender, including the 'tel:' protocol identifier and the country code prefixed by '+', must be URL-escaped.pathstring
      (required)
      Identifier of the DR notifications susbscription to deletepathstring
      response messages
      List of common error codes
      HTTP status codereasonresponse model
      204No Content
      400List of error codes:
      - SVC0001: A service error occurred
      - SVC0002: Invalid input value for message part
      - SVC0003: Invalid input value for message part
      - SVC0004: No valid addresses provided for message part
      - SVC0280: Message too long
      {
        "requestError": {
          "serviceException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      403List of error codes:
      - POL0001: A policy error occurred
      - POL0003: Too many addresses specified in message part
      - POL0007: Nested groups specified in message part not allowed
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      404List of error codes:
      - POL0010: Requested information unavailable as the retention time interval has expired
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      406List of error codes:
      - POL0011: Media type not supported
      {
        "requestError": {
          "policyException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
      503List of error codes:
      - SVC1000: No resources This exception is thrown if there are no server resources available to process the request
      {
        "requestError": {
          "serviceException": {
            "messageId": "string",
            "text": "string",
            "variables": "string"
          }
        }
      }
    • implementation notes

      The GET /sms/admin/v1/contracts URI lists the contracts of the partner. It allows filtering by country.

      response class (status 200)
      {
        "purchaseOrders": [
          {
            "partnerId": "string",
            "contracts": [
              {
                "service": "string",
                "contractDescription": "string",
                "serviceContracts": [
                  {
                    "country": "string",
                    "service": "string",
                    "contractId": "string",
                    "availableUnits": 0,
                    "expires": "string",
                    "scDescription": "string"
                  }
                ]
              }
            ]
          }
        ]
      }
      parameters
      parametervaluedescriptionparameter typedata type
      ISO 3166-1 alpha 3 country code (e.g. CIV, see https://fr.wikipedia.org/wiki/ISO_3166-1)querystring
      EN (default)
      Language of the labels. Default value is EN. Note that in V1.0, only the default language will be supported.querystring
      response messages
      List of common error codes
      HTTP status codereasonresponse model
      400List of error codes:
      - 232740000: Missing input
      - 232740001: Malformed request body
      - 232740002: Malformed URI
      - 232740003: Invalid input value
      {
        "error": {
          "code": "string",
          "message": "string",
          "description": "string"
        }
      }
      405Method not supported
      500List of error codes:
      - 232740004: Internal error
      {
        "error": {
          "code": "string",
          "message": "string",
          "description": "string"
        }
      }
    • implementation notes

      The GET /sms/admin/v1/purchaseorders URI lists the purchase history of a partner. It allows filtering by country.

      response class (status 200)
      {
        "partnerContracts": [
          {
            "purchaseOrderId": "string",
            "mode": "string",
            "bundleId": "string",
            "bundleDescription": "string",
            "partnerId": "string",
            "inputs": [
              {
                "type": "string",
                "value": "string"
              }
            ],
            "orderExecutionInformation": {
              "date": "string",
              "amount": 0,
              "currency": "string",
              "service": "string",
              "country": "string",
              "contractId": "string"
            }
          }
        ]
      }
      parameters
      parametervaluedescriptionparameter typedata type
      ISO 3166-1 alpha 3 country code (e.g. CIV, see https://fr.wikipedia.org/wiki/ISO_3166-1)querystring
      response messages
      List of common error codes
      HTTP status codereasonresponse model
      400List of error codes:
      - 232740000: Missing input
      - 232740001: Malformed request body
      - 232740002: Malformed URI
      - 232740003: Invalid input value
      {
        "error": {
          "code": "string",
          "message": "string",
          "description": "string"
        }
      }
      405Method not supported
      500List of error codes:
      - 232740004: Internal error
      {
        "error": {
          "code": "string",
          "message": "string",
          "description": "string"
        }
      }
    • implementation notes

      The GET /sms/admin/v1/statistics lists the usage statistics of a partner. It allows filtering by country.

      response class (status 200)
      {
        "partnerStatistics": [
          {
            "partnerId": "string",
            "statistics": [
              {
                "service": "string",
                "serviceStatistics": [
                  {
                    "country": "string",
                    "countryStatistics": [
                      {
                        "appid": "string",
                        "usage": 0
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
      parameters
      parametervaluedescriptionparameter typedata type
      ISO 3166 alpha 3 country code (e.g. CIV, see https://fr.wikipedia.org/wiki/ISO_3166-1)querystring
      response messages
      List of common error codes
      HTTP status codereasonresponse model
      400List of error codes:
      - 232740000: Missing input
      - 232740001: Malformed request body
      - 232740002: Malformed URI
      - 232740003: Invalid input value
      {
        "error": {
          "code": "string",
          "message": "string",
          "description": "string"
        }
      }
      405Method not supported
      500List of error codes:
      - 232740004: Internal error
      {
        "error": {
          "code": "string",
          "message": "string",
          "description": "string"
        }
      }
    • HTTP status codereasonresponse model
      400List of supported error codes:
      - 20: Invalid URL parameter value
      - 21: Missing body
      - 22: Invalid body
      - 23: Missing body field
      - 24: Invalid body field
      - 25: Missing header
      - 26: Invalid header value
      - 27: Missing query-string parameter
      - 28: Invalid query-string parameter value
      {
        "code": 28,
        "message": "Invalid query-string parameter value",
        "description": "One or more query-string parameters contain invalid values."
      }
      401List of supported error codes:
      - 40: Missing credentials
      - 41: Invalid credentials
      - 42: Expired credentials
      {
        "code": 42,
        "message": "Expired credentials",
        "description": "The requested service needs credentials, and the ones provided were out-of-date."
      }
      403List of supported error codes:
      - 50: Access denied
      - 51: Forbidden requester
      - 52: Forbidden user
      - 53: Too many requests
      {
        "code": 53,
        "message": "Too many requests",
        "description": "The application has made too many calls and has exceeded the rate limit for this service."
      }
      404List of supported error codes:
      - 60: Resource not found
      {
        "code": 60,
        "message": "Resource not found",
        "description": "The requested URI or the requested resource does not exist."
      }
      405List of supported error codes:
      - 61: Method not allowed
      {
        "code": 61,
        "message": "Method not allowed",
        "description": "The URI does not support the requested method. The available methods should be set in the response header 'Allow'"
      }
      406List of supported error codes:
      - 62: Not acceptable
      {
        "code": 62,
        "message": "Not acceptable",
        "description": "The Accept incoming header does not match any available content-type."
      }
      408List of supported error codes:
      - 63: Request time-out
      {
        "code": 63,
        "message": "Request time-out",
        "description": "The server timed out waiting for the incoming request."
      }
      411List of supported error codes:
      - 64: Length required
      {
        "code": 64,
        "message": "Length required",
        "description": "The request did not specify a Content-Length header, which is required by the requested resource."
      }
      412List of supported error codes:
      - 65: Precondition failed
      {
        "code": 65,
        "message": "Precondition failed",
        "description": "One of the precondition request headers (aka. 'If-None-Match', 'If-Match', 'If-Modified-Since', and 'If-Unmodified-Since') failed to match."
      }
      413List of supported error codes:
      - 66: Request entity too large
      {
        "code": 66,
        "message": "Request entity too large",
        "description": "The body of a request (PATCH, POST and PUT methods) is larger than the server is willing or able to process."
      }
      414List of supported error codes:
      - 67: Request-URI too long
      {
        "code": 67,
        "message": "Request-URI too long",
        "description": "The URI provided was too long for the server to process."
      }
      415List of supported error codes:
      - 68: Unsupported Media Type
      {
        "code": 68,
        "message": "Unsupported Media Type",
        "description": "The format of the posted body is not supported by the endpoint."
      }
      500List of supported error codes:
      - 1: Internal error
      {
        "code": 1,
        "message": "internal error",
        "description": "Generic failure message, used if no more precise code can be provided."
      }
      503List of supported error codes:
      - 5: The service is temporarily unavailable
      - 6: Orange API is over capacity, retry later !
      {
        "code": 6,
        "message": "Orange API is over capacity, retry later !",
        "description": "The service faces too much requests and can not handle the call."
      }