Mobile Subscription Order API

Introduction to API usage

This API will enable you to perform changes to the company mobile subscriptions. 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-mobile-subscriptions

POST /corporate-mobile-subscriptions/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. Example to add an add on product to a subscription:

Find "AddProductOrder" in the docs, and send the structure as the payload: { "productId": "50795", "msisdn": "4799885577", "type": "ADD_PRODUCT" }

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
  • The order data that should be submitted. Note that only a single order payload can be sent, so select one order type and send the corresponding order payload. Please see the implementation notes for an example
  • body
  • removeSubscriptionProductOrderRemoveProductOrder
    The payload for sending a remove subscription product order. This will remove an add-on product from a subscription. Not all add-ons may be removed. Retrieve a subscription to see which products that are currently ordered, and to see which one that may be removed. The order usually takes a couple of seconds to finish.
    activateSettingOrderActivateSettingOrder
    The payload for ordering a setting activation. A setting can be activated or deactivated for a subscription. Settings can be activated to e.g set usage limits and reservations. All settings and whether they are active or not are listed out when retrieving a mobile subscription. The order usually takes a couple of seconds to finish.
    activateAddonSimProductOrderActivateAddonSimProductOrder
    The payload for ordering a new addon SIM product (e.g. twin or datacard) and activating it together with a given unused SIM card. The order may take a couple of minutes to finish.
    activateSimCardOrderActivateSimCardOrder
    The payload for ordering activation of a SIM card. This will effectively replace the SIM card currently associated with the given msisdn with a new SIM card ICC id. The order may take a couple of minutes to finish.
    addProductOrderAddProductOrder
    The payload for ordering an addon product for a subscription. Addons can be ordered to enhance a subscription, for example by adding data packages. You may retrieve a mobile subscription in order to see which add-ons that are currently active. Some of the products may not be ordered multiple times. Retrieve the available addon products in order to find valid products that may be ordered. The order usually takes a couple of seconds to finish.
    fixedTerminalOrderFixedTerminalOrder
    The payload for ordering a fixed terminal product for a subscription. You must supply a number for the fixed terminal (ISDN or IPT). Valid number series that can be used is part of your agreement with Telenor, and only those numbers may be used when ordering this product.The order usually takes a couple of seconds to finish.
    changeAccountOrderChangeAccountOrder
    The payload for ordering a change of the invoice account for a subscription. Changing the account that a subscription is associated with will affect such things as which invoice the subscription will be listed on. Valid accounts can be found using the corporate-accounts API. The order may take a couple of minutes to finish.
    changeSubscriptionProductOrderChangeSubscriptionTypeOrder
    The payload for ordering a change of subscription type for a subscription. Find available subscription types by invoking GET /subscription-types/. The order usually takes a couple of seconds to finish.
    changeUserOrderChangeUserOrder
    The payload for ordering a change of subscription user. The user can either be a person or an organization. Please note that this might take up to 30 minutes before the order is fulfilled. The subscription will not be retrievable through the APIs for that period.
    changeUserReferencesOrderChangeUserReferencesOrder
    The payload for ordering a change of user references. User references are text fields that are free to use by the customer. May contain references or information that gives extra value for the customer and their systems. Changes should be visible within seconds.
    deactivateSettingOrderDeactivateSettingOrder
    The payload for ordering a setting deactivation. A setting can be activated or deactivated for a subscription. This make it possible to e.g set usage limits and reservations. All settings and whether they are active or not are listed out when retrieving a mobile subscription. The order usually takes a couple of seconds to finish.
    deleteSubscriptionOrderDeleteSubscriptionOrder
    The payload for ordering a termination of a subscription. The order may take a couple of minutes to finish.
    newSimCardOrderSimCardOrder
    The payload for ordering a replacement SIM card sent to the given address. The SIM card must be activated before it can be used. Expect up to 5 working days before the SIM card is received.
    subscriptionOrderCorporateUserActivateSimSubscriptionOrderCorporateUserActivateSim
    The payload for ordering a new subscription with an organizational user and a SIM card activation. You must provide a valid ICCID for an existing SIM card
    subscriptionOrderPersonalUserActivateSimSubscriptionOrderPersonalUserActivateSim
    The payload for ordering a new subscription with a personal user and a SIM card activation
    subscriptionOrderCorporateUserNewSimSubscriptionOrderCorporateUserNewSim
    The payload for ordering a new subscription with a corporate user and a new SIM card. The SIM card will be sent to the given address and is ready to be used. Please except up to 5 working days before the SIM card is received.
    subscriptionOrderPersonalUserNewSimSubscriptionOrderPersonalUserNewSim
    The payload for ordering a new subscription with a personal user and a new SIM card. The SIM card will be sent to the given address and is ready to be used. Please except up to 5 working days before the SIM card is received.

    RemoveProductOrder

    msisdnstring
    The msisdn of the subscription
    productIdstring
    The id of the add on product to remove from the subscription.
    typestring
    The type of order to create

    ActivateSettingOrder

    settingIdstring
    The id of the setting to activate for the subscription
    msisdnstring
    The msisdn of the subscription
    typestring
    The type of order to create

    ActivateAddonSimProductOrder

    productId
    The product ID of the SIM card addon product. Use the /mobile-subscriptions/{msisdn}/add-on-products endpoint and filter by orderType 'ACTIVATE_ADDON_SIM_PRODUCT' to find available addon products for this order type.
    iccIdstring
    Integrated circuit card identifier (ICC Id) for the SIM card to activate. Is found on the SIM card, or in the letter the SIM card came with.Must be exactly 20 digits
    msisdnstring
    The msisdn of the subscription
    typestring
    The type of order to create

    ActivateSimCardOrder

    iccIdstring
    Integrated circuit card identifier (ICC Id) for the SIM card to activate. Is found on the SIM card, or in the letter the SIM card came with.Must be exactly 20 digits
    msisdnstring
    The msisdn to activate the SIM card for. There are different msisdns for main and addon SIM cards (e.g. twin and data cards). Refer to the list of SIM cards from the /mobile-subscriptions/{msisdn} endpoint.
    typestring
    The type of order to create

    AddProductOrder

    msisdnstring
    The msisdn of the subscription
    productIdstring
    The id of the product offer to add to the subscription. Use the /mobile-subscriptions/{msisdn}/add-on-products endpoint and filter by orderType 'ADD_PRODUCT' to find available addon products for this order type.
    typestring
    The type of order to create

    FixedTerminalOrder

    msisdnstring
    The msisdn of the subscription
    fixedTerminalNumberstring
    The number used for the fixed terminal ("fastterminal"). Should be part of a number series that is provided for the organization.
    typestring
    The type of order to create

    ChangeAccountOrder

    accountIdstring
    The id of the new account for the subscription
    msisdnstring
    The msisdn of the subscription
    typestring
    The type of order to create

    ChangeSubscriptionTypeOrder

    subscriptionTypeIdstring
    The id of the subscription type to change to
    msisdnstring
    The msisdn of the subscription
    typestring
    The type of order to create

    ChangeUserOrder

    personalUser
    Provide this property if you want the subscription to have a personal user.
    organizationNumberstring
    Provide this property if you want the subscription to have one of your organizations as user. 9 digits.
    msisdnstring
    The msisdn of the subscription
    typestring
    The type of order to create

    ChangeUserReferencesOrder

    userReference1string
    User reference 1 (displayed on invoice). Max 30 characters. Only letters, numbers and some punctuation "/.,-" are valid characters. Please note that all text for user references will appear as upper case when retrieved
    userReference2string
    User reference 2. Max 30 characters. Only letters, numbers and some punctuation "/.,-" are valid characters. Please note that all text for user references will appear as upper case when retrieved
    userReference3string
    User reference 3. Max 30 characters. Only letters, numbers and some punctuation "/.,-" are valid characters. Please note that all text for user references will appear as upper case when retrieved
    msisdnstring
    The msisdn of the subscription
    typestring
    The type of order to create

    DeactivateSettingOrder

    settingIdstring
    The id of the setting to activate for the subscription
    msisdnstring
    The msisdn of the subscription
    typestring
    The type of order to create

    DeleteSubscriptionOrder

    msisdnstring
    The msisdn of the subscription
    typestring
    The type of order to create

    SimCardOrder

    customAddress
    The address that will be used when shipping the SIM card
    simCardFormstring
    Choose NANO if you want the nano format, otherwise choose DEFAULT to get a SIM with adjustable sizes.
    msisdnstring
    The msisdn to order a replacement SIM card for. There are different msisdns for main and addon SIM cards (e.g. twin and data cards). Refer to the list of SIM cards from the /mobile-subscriptions/{msisdn} endpoint.
    typestring
    The type of order to create

    SubscriptionOrderCorporateUserActivateSim

    subscriptionTypeIdstring
    The subscription type id. Use GET /subscription-types to see the possible subscription products that the user can order for a new subscription. Digits only
    accountIdstring
    The account to use for the new subscription. Your options may be obtained by using the GET /accounts resource in the corporate-accounts API. Digits only
    typestring
    The type of order to create
    iccIdstring
    Integrated circuit card identifier (ICC Id) for the SIM card. Is found on the SIM card, or in the letter the SIM card came with.Must be exactly 20 digits

    SubscriptionOrderPersonalUserActivateSim

    subscriptionTypeIdstring
    The subscription type id. Use GET /subscription-types to see the possible subscription products that the user can order for a new subscription. Digits only
    accountIdstring
    The account to use for the new subscription. Your options may be obtained by using the GET /accounts resource in the corporate-accounts API. Digits only
    typestring
    The type of order to create
    iccIdstring
    Integrated circuit card identifier (ICC Id) for the SIM card. Is found on the SIM card, or in the letter the SIM card came with.Must be exactly 20 digits
    personalUser
    The user of the subscription.

    SubscriptionOrderCorporateUserNewSim

    subscriptionTypeIdstring
    The subscription type id. Use GET /subscription-types to see the possible subscription products that the user can order for a new subscription. Digits only
    accountIdstring
    The account to use for the new subscription. Your options may be obtained by using the GET /accounts resource in the corporate-accounts API. Digits only
    typestring
    The type of order to create
    customAddress
    The address that will be used when shipping the SIM card
    simCardFormstring
    Choose NANO if you want the nano format, otherwise choose DEFAULT to get a SIM with adjustable sizes.

    SubscriptionOrderPersonalUserNewSim

    subscriptionTypeIdstring
    The subscription type id. Use GET /subscription-types to see the possible subscription products that the user can order for a new subscription. Digits only
    accountIdstring
    The account to use for the new subscription. Your options may be obtained by using the GET /accounts resource in the corporate-accounts API. Digits only
    typestring
    The type of order to create
    customAddress
    The address that will be used when shipping the SIM card
    simCardFormstring
    Choose NANO if you want the nano format, otherwise choose DEFAULT to get a SIM with adjustable sizes.
    personalUser
    The personalUser of the subscription.
    {
      "removeSubscriptionProductOrder": {
        "msisdn": "4799887766",
        "productId": "5585",
        "type": "string"
      },
      "activateSettingOrder": {
        "settingId": "663",
        "msisdn": "4799885577",
        "type": "string"
      },
      "activateAddonSimProductOrder": {
        "productId": {
          "value": "int"
        },
        "iccId": "89470006058070171161",
        "msisdn": "4799885577",
        "type": "string"
      },
      "activateSimCardOrder": {
        "iccId": "89470006058070171161",
        "msisdn": "4799885577",
        "type": "string"
      },
      "addProductOrder": {
        "msisdn": "4799887766",
        "productId": "50795",
        "type": "string"
      },
      "fixedTerminalOrder": {
        "msisdn": "4799887766",
        "fixedTerminalNumber": "61297300",
        "type": "string"
      },
      "changeAccountOrder": {
        "accountId": "10886354",
        "msisdn": "4799885577",
        "type": "string"
      },
      "changeSubscriptionProductOrder": {
        "subscriptionTypeId": "76055",
        "msisdn": "4799885577",
        "type": "string"
      },
      "changeUserOrder": {
        "personalUser": {
          "person": {
            "firstName": "Ola",
            "middleName": "Mikkel",
            "lastName": "Nordmann",
            "birthDate": "01.01.1970"
          },
          "postalCode": "0001"
        },
        "organizationNumber": "982463718",
        "msisdn": "4799885577",
        "type": "string"
      },
      "changeUserReferencesOrder": {
        "userReference1": "482930/OLA NORDMANN",
        "userReference2": "SERVICE DESK",
        "userReference3": "OLA NORDMANN",
        "msisdn": "4799885577",
        "type": "string"
      },
      "deactivateSettingOrder": {
        "settingId": "663",
        "msisdn": "4799885577",
        "type": "string"
      },
      "deleteSubscriptionOrder": {
        "msisdn": "4799885577",
        "type": "string"
      },
      "newSimCardOrder": {
        "customAddress": {
          "firstName": "Ola",
          "middleName": "Fredrik",
          "lastName": "Nordmann",
          "address": {
            "streetName": "Olav Tryggvasons gate",
            "streetNumber": "9 A",
            "entranceCode": "42",
            "postalCode": "7049",
            "postalPlace": "Trondheim"
          }
        },
        "simCardForm": "string",
        "msisdn": "4799885577",
        "type": "string"
      },
      "subscriptionOrderCorporateUserActivateSim": {
        "subscriptionTypeId": "76057",
        "accountId": "10886354",
        "type": "string",
        "iccId": "89470006058070171161"
      },
      "subscriptionOrderPersonalUserActivateSim": {
        "subscriptionTypeId": "76057",
        "accountId": "10886354",
        "type": "string",
        "iccId": "89470006058070171161",
        "personalUser": {
          "person": {
            "firstName": "Ola",
            "middleName": "Mikkel",
            "lastName": "Nordmann",
            "birthDate": "01.01.1970"
          },
          "postalCode": "0001"
        }
      },
      "subscriptionOrderCorporateUserNewSim": {
        "subscriptionTypeId": "76057",
        "accountId": "10886354",
        "type": "string",
        "customAddress": {
          "firstName": "Ola",
          "middleName": "Fredrik",
          "lastName": "Nordmann",
          "address": {
            "streetName": "Olav Tryggvasons gate",
            "streetNumber": "9 A",
            "entranceCode": "42",
            "postalCode": "7049",
            "postalPlace": "Trondheim"
          }
        },
        "simCardForm": "string"
      },
      "subscriptionOrderPersonalUserNewSim": {
        "subscriptionTypeId": "76057",
        "accountId": "10886354",
        "type": "string",
        "customAddress": {
          "firstName": "Ola",
          "middleName": "Fredrik",
          "lastName": "Nordmann",
          "address": {
            "streetName": "Olav Tryggvasons gate",
            "streetNumber": "9 A",
            "entranceCode": "42",
            "postalCode": "7049",
            "postalPlace": "Trondheim"
          }
        },
        "simCardForm": "string",
        "personalUser": {
          "person": {
            "firstName": "Ola",
            "middleName": "Mikkel",
            "lastName": "Nordmann",
            "birthDate": "01.01.1970"
          },
          "postalCode": "0001"
        }
      }
    }

Response class (Status 200)

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

Error responses

400
Bad Request:
Error code 400000 - Bad request. Check that the provided values are valid as described in the API documentation.
Error code 400006 - The subscription has been changed too recently
Error code 400014 - Msisdn is already owned by user. Use resource for changing subscription instead
Error code 400018 - Invalid MSISDN provided.
Error code 400019 - Invalid ICC ID provided.
Error code 40001 - Missing or invalid enduserId
Error code 400020 - SIM card not supported
Error code 400021 - Subscription not found
Error code 400022 - AddonProduct offer not found
Error code 400023 - User not found. Either the user does not exist or is not available for the system user
Error code 400024 - Add-on product not found
Error code 400025 - Account not found
Error code 400026 - Sim card not found
Error code 400040 - Illegal name provided. Need at least a first and last name.
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 403001 - AddonProduct not available for subscription
Error code 403002 - AddonProduct(s) cannot be ordered. Only products that are offered is available for order
Error code 403003 - Add on product(s) cannot be cancelled. Only products with isCancellable = true can be cancelled
Error code 40301 - Invalid scope
404
Not Found:
Error code 40401 - Path or method not found
Error code 4042000 - Path or method not found on back-end server
409
Conflict:
Error code 409001 - Last order not completed. Please try again in a little while
Error code 409002 - Another order is in progress. Please try again later
Error code 409003 - The order validation failed. Ensure that you are using valid ids.
Error code 409004 - Sim card was used recently on another subscription and cannot be activated
Error code 409005 - SIM card is already in activation process
Error code 409006 - SIM card is already activated for this subscription
Error code 409007 - SIM card has been inactive for to long and cannot be activated yet
Error code 409008 - SIM card is in use by another subscription
Error code 409009 - The order validation failed. The subscription cannot be moved to the requested account
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
Error code 503300 - Bad data returned by external service
The Try-It functionality is only available when logged in to the portal.