Mobile Subscription Order API

Introduction to API usage

This API will enable you to perform changes to the company agreement product offers. Access rights are limited to your system user.

POST = create new

PUT = change/update

DELETE = remove

For developers, the raw swagger doc for the whole API product can be found in one place here

corporate-agreements

POST /corporate-agreements/v2/orders Place an order

Implementation notes

When placing an order it might take some time before the order is finished and the changes reflected in the API. This depends on the order. You will get an order id as a response which in the future may be used to enquire about the order status through the API.

In the examples shown for the payload for this endpoint, all possible orders are displayed. You may send only one of them at a time. Find the example for the order you wish to place, and then extract the payload.

Following is an example for updating the invoice account for a product belonging to an agreement. Start with finding the correct order, in this case "UpdateProductOrder" in the docs, and send the structure as the payload: { "type": "UPDATE_PRODUCT", "agreementId": 5538579, "productId": 2799029, "configurations": [ { "id": 6140, "value": "11175198" } ] }

Parameters

  • Authorization*
  • The authorization header containing the access token. See the oauth-v2 API for how to obtain the token. Example: "Authorization: Bearer 065d160140eea13e72cde31a7b857bbfa37390e5"
  • header
  • string
  • body*
  • body
  • updateProductOrderUpdateProductOrder
    The payload for ordering an update for an agreeement product
    addProductOrderAddProductOrder
    The payload for ordering a new product to an agreement

    UpdateProductOrder

    agreementIdinteger
    Id of the agreement to place order on. Valid agreement ids can be found by using relevant GET endpoint
    productIdinteger
    The id of the product you are updating
    configurationsarray
    List of product configurations
    typestring
    The type of order to create

    AddProductOrder

    productOfferingIdstring
    The id of the product offering you are adding
    agreementIdstring
    Id of the agreement to place an order on. Valid agreement ids can be found by using relevant GET endpoint
    configurationsarray
    List of product configurations
    typestring
    The type of order to create
    {
      "updateProductOrder": {
        "agreementId": 5538579,
        "productId": 2799029,
        "configurations": [
          {
            "id": 6420,
            "value": "john.doe@example.com"
          }
        ],
        "type": "string"
      },
      "addProductOrder": {
        "productOfferingId": "13883",
        "agreementId": "5538579",
        "configurations": [
          {
            "id": 6420,
            "value": "john.doe@example.com"
          }
        ],
        "type": "string"
      }
    }

Response class (Status 200)

orderIdstring
The order orderId. Keep this for future enquiries
[{
  "orderId": "010780005503"
}]

Error responses

400
Bad Request:
Error code 400001 - Invalid agreement id
Error code 400002 - Invalid product id
Error code 40001 - Missing or invalid enduserId
401
Unauthorized:
Error code 40101 - Invalid resource
Error code 40102 - Missing authorization header
Error code 40103 - No API product found
Error code 40104 - Not authorized to use given MSISDN
Error code 40105 - Invalid access token
Error code 40106 - Access token expired
Error code 40107 - Basic authentication not allowed for external access or not allowed for client
Error code 40108 - Invalid client id or secret for basic authentication
403
Forbidden:
Error code 40301 - Invalid scope
404
Not Found:
Error code 404001 - Agreement not found
Error code 40401 - Path or method not found
Error code 4042000 - Path or method not found on back-end server
429
Too Many Requests:
Error code 42901 - Rate limit quota violation
Error code 42902 - Spike arrest violation
500
Internal Server Error:
Error code 50001 - Internal Server Error
Error code 50002 - Failed to validate acr
Error code 50003 - Failed to validate subscription
Error code 500100 - Internal server error
503
Service Unavailable:
Error code 503200 - External server error
The Try-It functionality is only available when logged in to the portal.