Mobile Subscription Order API

Introduction to API usage

This API will enable you to add new company accounts. Access rights are limited to your system user.

POST = create new

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

corporate-accounts

POST /corporate-accounts/v2/accounts Create a new account

Implementation notes

Some of the required parameters can be obtained by invoking other resources. Which ones are explained on each parameter in the request body documentation. Expect a minute before the new account is retrievable from other endpoints.

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
  • accountReference1string
    Will be used as account name. Max 30 characters. Only letters, numbers and some punctuation "/.,-" are valid characters
    accountReference2string
    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. Max 30 characters. Only letters, numbers and some punctuation "/.,-" are valid characters
    accountReference3string
    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. Max 30 characters. Only letters, numbers and some punctuation "/.,-" are valid characters
    addressCardIdstring
    If the organization that will be registered as the payer of this account has multiple invoice addresses, an address card id will also need to be supplied when creating a new account. Use GET /organizations/{orgNumber}/address-cards to list out available address cards that may be used for the payer organization. If the payer organization only has one listed address card, this parameter does not need to be supplied as that will be the default invoice address.
    ownerOrganizationNumberstring
    Organization number (9 digits). Use the GET /organizations/ in the organizations API inorder to list your organizations
    payerOrganizationNumberstring
    Organization number (9 digits). Use the GET /organizations/ in the organizations API inorder to list your organizations
    {
      "accountReference1": "Telenor ASA/ IT department",
      "accountReference2": "Local account id",
      "accountReference3": "Local account id",
      "addressCardId": "664158",
      "ownerOrganizationNumber": "987654321",
      "payerOrganizationNumber": "987654321"
    }

Response class (Status 200)

idstring
A number containing up to 8 digits – at the invoice this is shown with the prefix 55
accountReference1string
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. This reference will occur at the 2. line on the invoice address field. Note that this is visible in the channel where invoice information is displayed. This reference will also be mapped to "deres referanse" in the ehf-format
ownerOrganization
The juridical owner of the account. Will always be an organization
personalPayerPerson
Will be set if the payer is a person
invoiceInvoice
Post address and format of invoice
statusstring
Status of the account. Will show PASSIVE if account has been created but not activated, OPEN if both created and activated, and CANCELLED if cancelled
typestring
NORMAL means that there may be multiple subscriptions on the account. RESERVED means that only onesubscription is allowed on the account. RING_KONTANT means pre-paid subscriptions on the account
accountReference2string
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. Note that this will also be visible in invoice reports
accountReference3string
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. Note that this will also be visible in invoice reports

Organization

orgNumberstring
The organization number
namestring
The organization name

Person

firstNamestring
First name
lastNamestring
Last name
middleNamestring
Middle name.

Invoice

address
The address that the invoice will be sent to
formatstring
The format in which the invoice will be sent. This will usually be EHF (Elektronisk handelsformat) for organizations.
{
  "id": "1234567",
  "accountReference1": "Telenor ASA - IT department",
  "owner": {
    "orgNumber": "914742315",
    "name": "TELENOR"
  },
  "personalPayer": {
    "firstName": "Ola",
    "lastName": "Nordmann",
    "middleName": "Roger"
  },
  "companyPayer": {
    "orgNumber": "914742315",
    "name": "TELENOR"
  },
  "invoice": {
    "address": {
      "streetName": "Innherredsveien",
      "streetAddress": "1A",
      "entranceCode": "H0101",
      "postalCode": "7018",
      "postalPlace": "Trondheim"
    },
    "format": "string"
  },
  "status": "string",
  "type": "string",
  "accountReference2": "DevOps team",
  "accountReference3": "Linus Torvalds"
}

Error responses

400
Bad Request:
Error code 400007 - Organization not found
Error code 400009 - Address card not found
Error code 40001 - Missing or invalid enduserId
Error code 400024 - Invalid organization number provided
Error code 400032 - Invalid address card id
Error code 400033 - Invalid reference
Error code 400036 - Empty input
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
The Try-It functionality is only available when logged in to the portal.