Mobile Subscription Info API

Introduction to API usage

This API will allow the application to fetch information about a company's mobile subscriptions. Access is limited to the System User used.

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

corporate-mobile-subscriptions

GET /corporate-mobile-subscriptions/v2/mobile-subscriptions Search for subscriptions

Implementation notes

Get a list of mobile subscriptions by supplying a required search parameter. Use this resource to e.g get all mobile subscriptions with a given subscription type, or with a given add-on product. You also have the possibility to get all subscriptions that has been changed the last x seconds. In order to get a complete list of all your subscriptions you may use the corporate-accounts API. Please note that more data will be present on the MobileSubscription model when invoking the /mobile-subscriptions/{msisdn} endpoint

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
  • productId
  • Filter by product id. AddonProduct id must be Integer. Cannot be used in combination with 'since'
  • query
  • string
  • since
  • Filter by seconds since now. Cannot be used in combination with 'productId'
  • query
  • integer
  • ascending
  • Sort ascending. Value false equals descending
  • query
  • boolean
  • page
  • The page to start search from. Default is 0.
  • query
  • string
  • pageSize
  • The pageSize of results to use in the search. 1-1000.
  • query
  • string

Response class (Status 200)

msisdnstring
The msisdn of the main sim card
typeSubscriptionType
The subscription type
userReference1string
A text field that is free to use by the customer. May contain references or information that gives extra value for the customer and their systems. If userReference1 is used, it will be displayed instead of the name of the user on the invoice
userReference2string
A text field that is free to use by the customer. May contain references or information that gives extra value for the customer and their systems
userReference3string
A text field that is free to use by the customer. May contain references or information that gives extra value for the customer and their systems
validFromDatestring
Valid from date. Will always be set
validToDatestring
Valid to date. Will only be set if the subscription is terminated
statusstring
Indicates whether a subscription is active or barred
userUser
Information about the user of the subscription
payerPayer
Information about the payer of the subscription
ownerOwner
Information about the owner of the subscription. Will always be an organization
simCardsarray
The sim cards belonging to this subscription
settingsarray
Various settings for the subscription
addOnProductsarray
Details about add on products that the subscription has

SubscriptionType

idinteger
The id of the product offer used for this subscription type
namestring
The name of this subscription
paymentTypestring
The type of payment used for this subscription
textsarray
A list of texts related to this product. In norwegian or english, depending on what was asked for in the input
bindingsarray
A list of bindings that applies to this subscription product
usageQuoutasarray
A list of included usage quotas
accessTypestring

User

person
Will be set if the user is a person
organization
Will be set if the user is a company

Payer

person
Will be set if the payer is a person
organization
Will be set if the payer is a company

Owner

organization
The organization that owns the mobile subscription
[{
  "msisdn": "4795124144",
  "type": {
    "id": 76055,
    "name": "Bedrift Fri+ 20GB",
    "paymentType": "string",
    "texts": [
      {
        "type": "SUBSCRIPTION_INCLUDES",
        "value": "1GB inkludert data hver måned"
      }
    ],
    "bindings": [
      {
        "name": "IPhone 5S binding 12 months",
        "type": "string"
      }
    ],
    "usageQuoutas": [
      {
        "name": "Antall MB (datatrafikk)",
        "value": 100,
        "unit": "string",
        "trafficType": "string",
        "quotaType": "string",
        "validTo": "string"
      }
    ],
    "accessType": "string"
  },
  "userReference1": "482930/OLA NORDMANN",
  "userReference2": "SERVICE DESK",
  "userReference3": "OLA NORDMANN",
  "validFromDate": "2011-09-22",
  "validToDate": "2011-09-22",
  "status": "string",
  "user": {
    "person": {
      "firstName": "Ola",
      "middleName": "Mikkel",
      "lastName": "Nordmann",
      "birthDate": "01.01.1970"
    },
    "organization": {
      "orgNumber": "914742315",
      "name": "TELENOR",
      "address": {
        "streetName": "Olav Tryggvasons gate",
        "streetNumber": "9 A",
        "entranceCode": "42",
        "postalCode": "7049",
        "postalPlace": "Trondheim"
      }
    }
  },
  "payer": {
    "person": {
      "firstName": "Ola",
      "middleName": "Mikkel",
      "lastName": "Nordmann",
      "birthDate": "01.01.1970"
    },
    "organization": {
      "orgNumber": "914742315",
      "name": "TELENOR",
      "address": {
        "streetName": "Olav Tryggvasons gate",
        "streetNumber": "9 A",
        "entranceCode": "42",
        "postalCode": "7049",
        "postalPlace": "Trondheim"
      }
    }
  },
  "owner": {
    "organization": {
      "orgNumber": "914742315",
      "name": "TELENOR",
      "address": {
        "streetName": "Olav Tryggvasons gate",
        "streetNumber": "9 A",
        "entranceCode": "42",
        "postalCode": "7049",
        "postalPlace": "Trondheim"
      }
    }
  },
  "simCards": [
    {
      "msisdn": "4795124144",
      "iccId": "12345678901234567890",
      "type": "string"
    }
  ],
  "settings": [
    {
      "id": 12345,
      "name": "Datakontroll utland",
      "texts": "array",
      "active": "boolean",
      "canActivate": "boolean",
      "canDeactivate": "boolean"
    }
  ],
  "addOnProducts": [
    {
      "id": 698,
      "name": "Tvilling",
      "texts": "array",
      "usageQuotas": "array",
      "bindings": "array",
      "cancellable": "boolean",
      "orderTypes": "array",
      "validTo": "string"
    }
  ]
}]

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 400005 - One of the query parameters 'since' or 'productId' are required.
Error code 400017 - Invalid parameter combination. Verify that you have not provided parameters that do not match together, ref. the documentation
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 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
Error code 503300 - Bad data returned by external service
The Try-It functionality is only available when logged in to the portal.
GET /corporate-mobile-subscriptions/v2/mobile-subscriptions/{msisdn} Get a subscription

Implementation notes

Get a mobile subscription by supplying the msisdn. All your available subscriptions can be located by using the corporate-accounts API.

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
  • msisdn*
  • Provide a valid msisdn (phone number). Example: "4791234567"
  • path
  • string
  • language
  • Use this to choose which language shall be used in the description texts. Default is norwegian
  • query
  • string

Response class (Status 200)

msisdnstring
The msisdn of the main sim card
typeSubscriptionType
The subscription type
userReference1string
A text field that is free to use by the customer. May contain references or information that gives extra value for the customer and their systems. If userReference1 is used, it will be displayed instead of the name of the user on the invoice
userReference2string
A text field that is free to use by the customer. May contain references or information that gives extra value for the customer and their systems
userReference3string
A text field that is free to use by the customer. May contain references or information that gives extra value for the customer and their systems
validFromDatestring
Valid from date. Will always be set
validToDatestring
Valid to date. Will only be set if the subscription is terminated
statusstring
Indicates whether a subscription is active or barred
userUser
Information about the user of the subscription
payerPayer
Information about the payer of the subscription
ownerOwner
Information about the owner of the subscription. Will always be an organization
simCardsarray
The sim cards belonging to this subscription
settingsarray
Various settings for the subscription
addOnProductsarray
Details about add on products that the subscription has

SubscriptionType

idinteger
The id of the product offer used for this subscription type
namestring
The name of this subscription
paymentTypestring
The type of payment used for this subscription
textsarray
A list of texts related to this product. In norwegian or english, depending on what was asked for in the input
bindingsarray
A list of bindings that applies to this subscription product
usageQuoutasarray
A list of included usage quotas
accessTypestring

User

person
Will be set if the user is a person
organization
Will be set if the user is a company

Payer

person
Will be set if the payer is a person
organization
Will be set if the payer is a company

Owner

organization
The organization that owns the mobile subscription
{
  "msisdn": "4795124144",
  "type": {
    "id": 76055,
    "name": "Bedrift Fri+ 20GB",
    "paymentType": "string",
    "texts": [
      {
        "type": "SUBSCRIPTION_INCLUDES",
        "value": "1GB inkludert data hver måned"
      }
    ],
    "bindings": [
      {
        "name": "IPhone 5S binding 12 months",
        "type": "string"
      }
    ],
    "usageQuoutas": [
      {
        "name": "Antall MB (datatrafikk)",
        "value": 100,
        "unit": "string",
        "trafficType": "string",
        "quotaType": "string",
        "validTo": "string"
      }
    ],
    "accessType": "string"
  },
  "userReference1": "482930/OLA NORDMANN",
  "userReference2": "SERVICE DESK",
  "userReference3": "OLA NORDMANN",
  "validFromDate": "2011-09-22",
  "validToDate": "2011-09-22",
  "status": "string",
  "user": {
    "person": {
      "firstName": "Ola",
      "middleName": "Mikkel",
      "lastName": "Nordmann",
      "birthDate": "01.01.1970"
    },
    "organization": {
      "orgNumber": "914742315",
      "name": "TELENOR",
      "address": {
        "streetName": "Olav Tryggvasons gate",
        "streetNumber": "9 A",
        "entranceCode": "42",
        "postalCode": "7049",
        "postalPlace": "Trondheim"
      }
    }
  },
  "payer": {
    "person": {
      "firstName": "Ola",
      "middleName": "Mikkel",
      "lastName": "Nordmann",
      "birthDate": "01.01.1970"
    },
    "organization": {
      "orgNumber": "914742315",
      "name": "TELENOR",
      "address": {
        "streetName": "Olav Tryggvasons gate",
        "streetNumber": "9 A",
        "entranceCode": "42",
        "postalCode": "7049",
        "postalPlace": "Trondheim"
      }
    }
  },
  "owner": {
    "organization": {
      "orgNumber": "914742315",
      "name": "TELENOR",
      "address": {
        "streetName": "Olav Tryggvasons gate",
        "streetNumber": "9 A",
        "entranceCode": "42",
        "postalCode": "7049",
        "postalPlace": "Trondheim"
      }
    }
  },
  "simCards": [
    {
      "msisdn": "4795124144",
      "iccId": "12345678901234567890",
      "type": "string"
    }
  ],
  "settings": [
    {
      "id": 12345,
      "name": "Datakontroll utland",
      "texts": "array",
      "active": "boolean",
      "canActivate": "boolean",
      "canDeactivate": "boolean"
    }
  ],
  "addOnProducts": [
    {
      "id": 698,
      "name": "Tvilling",
      "texts": "array",
      "usageQuotas": "array",
      "bindings": "array",
      "cancellable": "boolean",
      "orderTypes": "array",
      "validTo": "string"
    }
  ]
}

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 400016 - Invalid MSISDN country code. The MSISDN must be prefixed with the Norwegian country code (47).
Error code 400018 - Invalid MSISDN provided.
Error code 40001 - Missing or invalid enduserId
Error code 400023 - User not found. Either the user does not exist or is not available for the system user
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 - Subscription 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
Error code 503300 - Bad data returned by external service
The Try-It functionality is only available when logged in to the portal.
GET /corporate-mobile-subscriptions/v2/mobile-subscriptions/{msisdn}/add-on-products Get orderable add on products for a subscription.

Implementation notes

Get a list off all the available products for this subscription. Add-ons can be ordered to enhance a subscription, for example by adding data packages. You may retrieve the mobile subscription in order to see which add-ons that are currently active. Some of the products may not be ordered multiple times, and will therefore not be listed as available if a subscription already has it.

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
  • msisdn*
  • Provide a valid msisdn (phone number). Example: "4791234567"
  • path
  • string
  • language
  • Use this to choose which language shall be used in the description texts. Default is norwegian
  • query
  • string

Response class (Status 200)

idinteger
The id of the add on product.
namestring
The product name
textsarray
A list of texts related to this product. In norwegian or english, depending on what was asked for in the input
usageQuotasarray
A list of usage quotas included with the product.
bindingsarray
A list of bindings that is subscribed or available for this product.
cancellableboolean
Whether or not this product can be cancelled
orderTypesarray
The order types that may be used when ordering this product through the /orders endpoint
validTostring
The date that this product is valid to if ordered today
[{
  "id": 698,
  "name": "Tvilling",
  "texts": [
    {
      "type": "SUBSCRIPTION_INCLUDES",
      "value": "1GB inkludert data hver måned"
    }
  ],
  "usageQuotas": [
    {
      "name": "Antall MB (datatrafikk)",
      "value": 100,
      "unit": "string",
      "trafficType": "string",
      "quotaType": "string",
      "validTo": "string"
    }
  ],
  "bindings": [
    {
      "name": "IPhone 5S binding 12 months",
      "type": "string"
    }
  ],
  "cancellable": "N/A",
  "orderTypes": "N/A",
  "validTo": "string"
}]

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 400018 - Invalid MSISDN provided.
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 - Subscription 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
Error code 503300 - Bad data returned by external service
The Try-It functionality is only available when logged in to the portal.
GET /corporate-mobile-subscriptions/v2/subscription-types Get available subscription types

Implementation notes

Get all subscription types for the given subscription category. This is will help you decide which kind of new subscription that can be ordered. If you want to change the subscription type of an existing subscription, keep in mind that the new subscription type must be of the same category as the previous one. E.g a regular mobile subscription cannot be changed to a mobile broadband subscription

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
  • accessType*
  • query
  • string
  • language
  • Use this to choose which language shall be used in the description texts. Default is norwegian
  • query
  • string

Response class (Status 200)

idinteger
The id of the product offer used for this subscription type
namestring
The name of this subscription
paymentTypestring
The type of payment used for this subscription
textsarray
A list of texts related to this product. In norwegian or english, depending on what was asked for in the input
bindingsarray
A list of bindings that applies to this subscription product
usageQuoutasarray
A list of included usage quotas
accessTypestring
[{
  "id": 76055,
  "name": "Bedrift Fri+ 20GB",
  "paymentType": "string",
  "texts": [
    {
      "type": "SUBSCRIPTION_INCLUDES",
      "value": "1GB inkludert data hver måned"
    }
  ],
  "bindings": [
    {
      "name": "IPhone 5S binding 12 months",
      "type": "string"
    }
  ],
  "usageQuoutas": [
    {
      "name": "Antall MB (datatrafikk)",
      "value": 100,
      "unit": "string",
      "trafficType": "string",
      "quotaType": "string",
      "validTo": "string"
    }
  ],
  "accessType": "string"
}]

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 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 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
Error code 503300 - Bad data returned by external service
The Try-It functionality is only available when logged in to the portal.