Introduction to API usage
This API will allow the application to fetch information about a company's agreements (for example Mobilt Bedriftsnett) and agreement product offers. 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
Please use only version 2 of corporate-accounts, corporate-mobile-subscriptions and corporate-agreements since version 1 of these APIs is deprecated.
corporate-agreements
GET
/corporate-agreements/v2/agreements
Get all agreements
Implementation notes
Get all agreements available for your organization.
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
Response class (Status 200)
- idstring
- The agreement id. Necessary to e.g get product offers and products for the agreement
- categorystring
- The agreement category
- validFromstring
- Valid from date. Will always be set
- validTostring
- Valid to date. May not be set
- ownerOrganization
- statusstring
- Agreement status.
Organization
- organizationNumberstring
- Org number
- namestring
- Name of the organization
[{ "id": "123456", "category": "Mobilt Bedriftsnett avtale", "validFrom": "2017-06-30", "validTo": "2017-06-30", "owner": { "organizationNumber": "987654321", "name": "Telenor ASA" }, "status": "string" }]
Error responses
- 400
- Bad Request:
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
GET
/corporate-agreements/v2/agreements/{agreementId}/products
Get agreement products
Implementation notes
Get all products that are currently ordered for an agreement.
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
-
agreementId*
-
-
path
-
integer
Response class (Status 200)
- orderedarray
- List containing products that are ordered on the agreement
- availablearray
- List containing products that are available to order on the agreement.
[{ "ordered": [ { "id": 1302567, "name": "Kø hoved nr", "status": "ORDERED", "billingAccountId": "7654321", "productOfferId": 404333, "productOfferName": "Kø", "subProducts": "array", "productConfigurations": "array" } ], "available": [ { "id": 404, "name": "Office 365 Business Premium", "configurations": "array" } ] }]
Error responses
- 400
- Bad Request:
Error code 400001 - Invalid agreement 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