Plugin Integrators
Welcome to the CRM.COM Application Programming Interface (API) documentation for Provisioning Provider Integrations
CRM.COM BackOffice API uses either API keys to authenticate requests or an authentication JWT token obtained from a user successful logging in
API keys can be accessed and managed in the CRM.COM Dashboard. Such API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code and so forth
All API requests must be made over HTTPS. API requests made over plain HTTP or without authentication will fail. API keys authentication is made using -H “api_key : crm_test_;dwfwgiuhjr412edws”, while User Bearer Auth is achieved using -H “Authorization: Bearer JWT_TOKEN”
CRM.COM uses conventional HTTP response codes and human-readable messages in JSON format to indicate the success or failure of an API request
- 2xx success status codes confirm that your request worked as expected
- 4xx error status codes indicate an error because of the information provided (e.g., a required parameter was omitted)
- 5xx error status codes are rare and indicate an error with Stripe’s servers
Please note that some 4xx errors that could be handled programmatically (e.g. a contact already exists) contain the following informaiion
- HTTP Code (programmatic consumption)
- Message (human-readable)
- Attribute (attribute that caused the error)
Below is a list of our common error codes that can be returned, along with additional information about how to resolve them
The request has succeeded
The input request was invalid or incorrect, often due to missing a required parameter
The provided API Key or Token is invalid
The API key or Token does not have permissions to perform the request
The requested resource does not exist
The server encountered an unexpected condition which prevented it from fulfilling the request
The server received an invalid response from the upstream server it accessed in attempting to fulfill the request
The server is currently unable to handle the request due to a temporary overloading or maintenance
The server did not receive a timely response from the upstream server
Send to the adepter whenever there’s a change in the set of subscirption services (e.g. whenever an authorisation or a de-authorisation signal must be sent)
Request headers
The secret api key required for API calls to ensure that the client is trusted
Request body
The subscription that groups together the services
The unique identifier of the subsription
The subscription’s code
The date on which the subscription was first activated
Responses
The request has succeeded
POST https://sandbox.crm.com/backoffice/v1/provisioning/entitlements HTTP/1.1
Content-Type: application/json
{
"existing_services": [
{
"caid": "Premium",
"authorisation_state": "AUTHORISED",
"autohrisation_date": 123456788,
"devices": [
""
],
"metadata_attributes": [
{
"key": "",
"value": ""
}
]
}
],
"new_services": [
{
"caid": "Premium",
"state_date": 123456788,
"end_date": 123456788,
"devices": [
""
]
},
{
"caid": "FIlms",
"state_date": 123456788,
"end_date": 123456788,
"devices": [
""
]
}
],
"removed_services": [
{
"caid": "Premium",
"devices": [
""
]
}
],
"subscription_metadata": [
{
"key": "",
"value": ""
}
]
}
HTTP/1.1 200 OK
Request headers
The secret api key required for API calls to ensure that the client is trusted
Request body
The devices (serial numbers) that provisioning message will be sent to
[
"SN1234","SN09123"
]
The message (from the communication plan) that will be sent
Defines on which communication channel the message will be sent
Message will be shown On Screen Display (OSD)
Message will be send via email
Responses
The request has succeeded
POST https://sandbox.crm.com/backoffice/v1/provisioning/message HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"devices": [
"SN1234"
],
"message": "Free Trial Period Expires Soon",
"type": "MAIL"
}
HTTP/1.1 200 OK
Retireve a list of IRD commands implemetned in the adapter To be moved under configuration
Request headers
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
Any IRD command
Request headers
The secret api key required for API calls to ensure that the client is trusted
Request body
Responses
The request has succeeded
POST https://sandbox.crm.com/backoffice/v1/provisioning/services HTTP/1.1
Content-Type: application/json
{
"services": [
{
"caid": "123",
"start_date": 12345678,
"end_date": 12345645,
"devices": [
"abc123"
]
}
]
}
HTTP/1.1 200 OK
Send the required provider attributes (as defined in the provisioning provider adapter) as specified within CRM
Request headers
The secret api key required for API calls to ensure that the client is trusted
Request body
A set of parameters required for successfully integrating with the 3rd party provider
The parameter key
The parameter value
Responses
PUT https://sandbox.crm.com/backoffice/v1/provisioning_providers HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"parameters": [
{
"key": "hostname",
"value": "crm.com/provider"
}
]
}
HTTP/1.1 200 OK
Retrieve the required attributes (as defined in the provisioning provider adapter) that need to be set within CRM, when setting up the provider. Part of the reponse, the provider media (image) is returned as well (if any)
Request headers
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
The provisioning provider media URL
A set of parameters required for successfully integrating with the 3rd party provider
The parameter key
The parameter value
The parameter label, used for display purposes
The parameter type
GET https://sandbox.crm.com/backoffice/v1/provisioning_providers HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"media_url": "crm.com/provider.png",
"parameters": [
{
"key": "hostname",
"value": "crm.com/provider",
"label": "Hostname",
"type": "STRING"
}
]
}
Send the required provider attributes (as defined in the provisioning provider adapter) as specified within CRM
Request body
The organisation (ext identifier) on which the provider will be associated with
The organisation (name) on which the provider will be associated with
Responses
Body
The non-encrypted api key value that will be used for subsuquent provisioning authentication
POST https://sandbox.crm.com/backoffice/v1/provisioning/apikeys HTTP/1.1
Content-Type: application/json
{
"organisation_id": "ccc740f9-7482-b689-54ee-bd78e065d550",
"organisation_name": "crm"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"key": "key-123456789"
}