BackOffice Admin
Welcome to CRM.COM Application Programming Interface (API) documentation
The CRM.COM API is designed around REST, allowing you to access and extend the software’s current functionality in a simple, programmatic way using intuitive URL endpoints, conventional HTTP requests, response codes, authentication and verbs.
Back-Office API is designed with a main focus on users and external systems that desire to access and extend the functionality found in CRM.COM.
For the Mobile/Web based Applications API please refer to the Self-Service API documentation that provides more details how to allow contacts to manage their subscription and/or reward accounts.
CRM.COM is built on a domain based micro-service architecture. Our primary resources such as Contact, Account, Wallet, Products and Subscriptions are all created with a unique identifier that uses a performant time based GUID. These are generated when a new resource such as a contact is created. However in some cases external integration may wish to use a unique identfier that is stored in an external system, such as a Bank CIF or Credit Card fingerprint.
Some systems allow from their create APIs to supply a unique identifier as part of the request body. CRM.COM has decided to provide an alternative approach and make an alternative unique identifier available on resources (e.g. on Contacts we provide the contact.code). If such attribute is specified during the create operation it wil be available on subsequent operations as a resource’s identifier, alongside with the GUID that is returned in the response body.
CRM.COM API is organized around REST. Our API has specific resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses and uses standard HTTP response codes, authentication & verbs.
You can use the entire API in test mode, which does not affect your live data. The API Key used to authenticate any of your requests will determine whether the request is on live mode or test mode.
The API may differ based on each CRM.COM release. For every new release with noticable changes that might alter backwards compatibility, a new version will be created.
CRM.COM Back-Office API uses either API Keys to authenticate requests or an authentication JWT token obtained from a user successful logging in.
All API requests must be made over HTTPS. Any request made over plain HTTP or without authentication will fail. In addition, 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 or client-side code.
API KEY AUTHORIZATION HEADER EXAMPLE
curl -X $HTTP_METHOD -H "api_key: 2189341e-981e-9ad5-9912-11101670314a"
AUTH TOKEN AUTHORIZATION HEADER EXAMPLE
curl -X $HTTP_METHOD -H "authorization: Bearer JWT_TOKEN"
API requests should be made using the HTTPS protocol so that traffic is encrypted. The interface responds to different methods depending on the action required.
| Method | Usage |
|---|---|
| POST | To create a new object, your request should specify the POST method. The POST request includes all of the attributes necessary to create a new object to the targeted endpoint. |
| PUT | To update the information on an existing object, the PUT method should be used. This will update the specified object if it is found using the provided values, regardless of their current values. If it is not found, the operation will return a response indicating that the object was not found. This idempotency means that you do not have to check for a resource’s availability prior to issuing an update command, the final state will be the same regardless of its existence. Requests using the PUT method do not need to check the current attributes of the object. |
| DELETE | To remove an existing object from your environment, the DELETE method should be used. Similar to PUT method, the DELETE method is idempotent. |
| GET | For retrieving information about customers, purchases or orders, the GET method should be used. Any requested information will be returned as a JSON object. The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the retrieved objects. |
Along with the HTTP methods that the API responds to, CRM.COM uses conventional HTTP response codes and human-readable messages in JSON format to indicate the success or failure of an API request.
In the event of a problem, the status will contain the error code, while the body of the response will usually contain additional information about the problem that was encountered.
| HTTP Status | Description |
|---|---|
| 2XX | Return codes in the 200 range indicate that the request was fulfilled successfully and that no error was encountered. |
| 4XX | Return codes in the 400 range, typically, indicate that there was an issue with the request that was sent. Most common reasons could be an invalid authentication method, unauthorised requests or the object that you are requesting does not exist. |
| 5XX | Return codes in the 500 range indicate that there is a server-side problem and CRM.COM cannot fulfill your request at the moment. |
Most of our 4XX range errors that could be handled programmatically contain all the necessary details for a better integration handling. Such details are
- HTTP Status Code & Error are used for programmatic consumption
- Message is human-readable and can be used as a default error message
- Parameters are used for programmatic consumption and can be used for enhancing the interface error message with additional information
4XX ERROR RESPONSE EXAMPLE
An example of a customer not found error is as follows
HTTP/1.1 404 Not Found
{
"status": 404,
"message": "Record not found.",
"error": "CRM.EXCEPTIONS.NOTFOUNDEXCEPTION",
"parameters": [
"contact",
"789dacae-cf71-414f-9483-ca88acaa46432"
]
}
The request has succeeded
The request has succeeded
The input request was invalid or incorrect, often due to missing a required parameter
The client request has not been completed because it lacks valid authentication credentials for the requested resource
The API key or Token does not have permissions to perform the request
The requested resource does not exist
The server is unwilling to process a request because it may be replayed
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
The ledger of customer financial transactions such as invoices and payments. An account has a set currency and credit terms and outputs balances such as running balance, overdue amount and pending balance per accounting period. Many processes within CRM.COM are carried out against an account, such as placing an order or creating a subscription.
{id}{id}{id}/accounts{id}/accounts{id}/actions{id}Get a single Account with its financial information
Path variables
The unique identifier of the Account
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
The unique identifier of the account
The account’s name
The account’s number
Defines whether the account is the primary one of the contact
Contact is able to perform transactions
Contact blocked from ordering/purchases but still allowed to make Payments
Contact can no longer perform any kind of transactions using this account(financial, ordering, rewards etc)
The account’s running balance
The unpaid amount that is passed its due date
The account’s credit limit.
The account’s payment terms
Payment terms unique identifier
Payment terms nane
Details about the event classification
The classification identifier
The classification name
The id of the billing address
Address line 1
Address line 2
GET https://sandbox.crm.com/backoffice/v2/accounts/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"name": "AC00123456 John Smith",
"number": "AC00123456",
"is_primary": "true",
"state": "ACTIVE",
"currency_code": "EUR",
"balance": 99.99,
"overdue_amount": 9.99,
"credit_limit": 99.99,
"payment_terms": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Net 7"
},
"classification": {
"id": "c8d83493-3f50-40df-adb0-762ec5f41863",
"name": "Delivery Purchase"
},
"billing_address": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"address_line_1": "2265 Oak Street",
"address_line_2": "",
"state_province_county": "New York",
"town_city": "Old Forge",
"postal_code": "13420",
"country_code": "CYP"
}
}
{id}Update the account of a contact or organisation. A single account can be updated per Web API call. Select to update at least one of the account’s basic attributes
Path variables
The account (identifier) that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
If set to true, then this account will be set as the primary one, unmarking the previous account from being the primary.
The account’s classification identifier
The unique identifier of a contact address which will be set as the billing address of the account.
Sets the credit limit of the account. The credit limit is set in the account’s currency
Sets the Account’s Payment Terms.
Responses
The request has succeeded
Body
The account identifier
PUT https://sandbox.crm.com/backoffice/v2/accounts/a2c0809f-ed91-4b68-b912-5bd6064d602a HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"is_primary": true,
"classification_id": "d230809f-ed91-4b68-b912-5bd6064d602a",
"billing_address_id": "a345fb9f-ed91-4b68-b912-5bd6064d602a",
"credit_limit": 20.99,
"payment_terms_id": "d230809f-ed91-4b68-b912-5bd6064d602a"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "d230809f-ed91-4b68-b912-5bd6064d602a"
}
{id}/accountsGet a list of Contact Accounts. Normally a contact will have a single account but multiple accounts can be used to service different currencies. All accounts of the contact are retrieved by default, regardless of their state
Path variables
The contact identifier whose accounts will be retrieved
Request parameters
Defines on which attribute the results should be sorted
The page number that should be retrieved
The size (total records) of each page
Defines how the results will be ordered
If set to true, then only the primary account of the contact will get retrieved. If not specified, then all accounts are retrieved including terminated ones
Filter accounts based on whether they are Active, Suspended and or Terminated. If not specified then all contact accounts are retrieved, even terminated ones.
[
"ACTIVE"
]Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
The account identifier
Indicates if this is the primary account of the contact
The account name
The Account number. This is a unique number across all Accounts
Contact is able to perform transactions
Contact blocked from ordering/purchases but still allowed to make Payments
Contact can no longer perform any kind of transactions using this account(financial, ordering, rewards etc)
Details about the event classification
The classification identifier
The classification name
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v2/contacts/a2c0809f-ed91-4b68-b912-5bd6064d602a/accounts HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"is_primary": true,
"name": "AC123456 John Smith",
"number": "AC123456",
"state": "ACTIVE",
"currency_code": "EUR",
"classification": {
"id": "c8d83493-3f50-40df-adb0-762ec5f41863",
"name": "Delivery Purchase"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/accountsCreate a new Account for a contact. A contact can have multiple accounts, each one having a different currency. A contact can own a single primary account.
Path variables
The unique identifier of the contact for which the new account is created
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Mark the new account as the contact’s primary account. If contact has another account marked as the primary, then this setting will enforce the new account to be the primary, unmarking the other one from being the primary.
The account’s name. If not specified, then a name will be assigned by CRM.COM based on account name rules
The account’s classification. If not specified, then the default Classification is set
The unique identifier of a contact address which will be set as the billing address of the account.
Responses
Created
Body
The account identifier
POST https://sandbox.crm.com/backoffice/v2/contacts/3ec0809f-ed91-4458-b912-5bd6064dabf1/accounts HTTP/1.1
Content-Type: application/json
{
"is_primary": true,
"currency_code": "EUR",
"name": "John Smith Main account",
"classification_id": "a2c0809f-ed91-4b68-b912-5bd6064d602a",
"billing_address_id": "e230809f-ed91-4b68-b912-5bd6064d602a"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "b4c0809f-ed91-4b68-b912-5bd60545902a"
}{id}/actionsUse this Web API to update the account’s state. The new state to which the account will be updated to also denotes the action performed on it, for example terminating or reactivating the account.
Path variables
The account identifier on which the action is performed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Contact is able to perform transactions
Contact blocked from ordering/purchases but still allowed to make Payments
Contact can no longer perform any kind of transactions using this account(financial, ordering, rewards etc)
The account to which any account balance will get transfered, in case of Termination. Applicable and required when terminating the account. If not specified on terminating the account, the terminated account’s balance is lost
Responses
Successful Request
Body
The unique identifier of the account
POST https://sandbox.crm.com/backoffice/v2/accounts/1eaa809f-ed91-4b68-b912-5bd6064d3400/actions HTTP/1.1
Content-Type: application/json
{
"state": "ACTIVE",
"account_id": "2ee0809f-ed91-4b68-b912-5bd6064d602a"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "b560809f-ed91-4b68-b912-5bd6064d602a"
}{id}{id}{id}Create a new activity
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The activity name
The activity description
The activity type (identifier)
The contact address (identifier) associated to the activity
Use the entity address as the Activity address. In cases where an Activity is being created for an entity which has an address (e.g. Contact, Order, Service Request) then use that address as the default Activity address. Either the address_id or the use_entity_address can be specified, not both
The scheduled from date/time
The scheduled to date/time
The related entities for the activity. Contact should always be specified and optionally one of the the rest entities (orders, service requests, leadds) can be specified as well
[
{
"type": "ORDER",
"id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
},
{
"type": "CONTACT",
"id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
}
]The type of related entity.
The related entity identifier
The user identifier
The team identifier
The custom field’s unique key
The custom field’s value
Responses
The request has succeded
Body
The activity identifier
POST https://sandbox.crm.com/backoffice/v2/activities HTTP/1.1
Content-Type: application/json
{
"name": "Call customer",
"description": "We need to call the contact (after 4pm) in order to schedule a demo",
"type_id": "cdd8e232-ddce-87c0-44fd-27f44035a252",
"address_id": "4d1b276d-6ae9-eca3-8c61-aedd35ebb9a4",
"use_entity_address": "false",
"scheduled_on": {
"from_date": 1592809457,
"to_date": 11653396172
},
"linked_to": [
{
"type": "ORDER",
"id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
}
],
"assign_to": {
"user_id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
"team_id": "a43f08ca-998b-afbc-6ed4-c9dc2d136935"
},
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "81b8d150-1196-6e6a-1df9-aaf23adc757d"
}
{id}Update an existing activity
Path variables
The activity (identifier) that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The activity name
The activity description
The activity state
The contact address (identifier) associated to the activity
The scheduled from date/time
The scheduled to date/time
The related entities for the activity, contact cannot be updated
[
{
"type": "ORDER",
"id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
}
]The type of related entity.
The related entity identifier
The user identifier
The team identifier
The custom field’s unique key
The custom field’s value
Responses
The request has succeded
Body
The activity identifier
PUT https://sandbox.crm.com/backoffice/v2/activities/43bf8b4a-6b7c-f86d-6faf-454b7e99a8e2 HTTP/1.1
Content-Type: application/json
{
"name": "Approve Offers",
"description": "Require 4 approvals for an offer",
"state": "CANCELLED",
"address_id": "6cbe314d-9f32-d3c7-4be6-f453e7b8e77e",
"scheduled_on": {
"from_date": 1592809457,
"to_date": 11653396172
},
"linked_to": [
{
"type": "ORDER",
"id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
}
],
"assign_to": {
"user_id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
"team_id": "a43f08ca-998b-afbc-6ed4-c9dc2d136935"
},
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "43bf8b4a-6b7c-f86d-6faf-454b7e99a8e2"
}
{id}Delete an existing activity
Path variables
The activity (identifier) that will be deleted
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
DELETE https://sandbox.crm.com/backoffice/v2/activities/52cbb887-a61a-9b1e-63df-1303f7b5718a HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 204 No Content Retrieve a list of activities based on search criteria (e.g. all open activities)
Request parameters
Filter based on search values, such as name (behave as like)
Filter based on activity type(s)
Filter based on related contact
Filter based on related service request
Filter based on related lead
Filter based on related order
Filter based on activity state
Filter based on activity tags
Defines whether tags should be retrieved or not
Filter based on the created date, which may fall within a given date range. The value can be a string with a date in epoch format. Each option must also include an operator. Use up to two options based on the required search (e.g. created_on[gte]=1618395497&created_on[lt]=1618395497).
Returns results where the created date is greater than this value
Returns results where the created date is greater than or equal to this value
Returns results where the created date is less than this value
Returns results where the created date is less then or equal to this value
Filter based on the completed date, which may fall within a given date range. The value can be a string with a date in epoch format. Each option must also include an operator. Use up to two options based on the required search (e.g. completed_on[gte]=1618395497&completed_on[lt]=1667890564).
Returns results where the date is greater than this value
Returns results where the date is greater than or equal to this value
Returns results where the date is less than this value
Returns results where the date is less then or equal to this value
Filters based on specific assign to user
Filters based on specific assign to team
Filters based on custom fields (key/value set should be semicolon separated)
Defines whether custom fields should be retrieved or not (via List/Get APIs)
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeded
Body
The activity identifier
The activity name
The activity description
The activity state
The date that the activity was created
The date/time that the activity is scheduled
The scheduled from date
The scheduled to date
The activity type
The activity type identifier
The activity type name
The activity type color (hex code), used for visual purposes
Details about the related contact
The contact identifier
The contact full name
The contact unique code
The lead identifier
The lead title
The order identifier
The order number
Details about the user that the record is assigned to
The user identifier
The user name
The username of the user
Details about team
The team identifier
The team name
The custom field (unique) key
The custom field’s (provided) value
Tag unique id
Tag name
The colour of the tag - for list view only
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v2/activities/ HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "1cf0d458-b799-1d99-52e4-d7f5081b3c01",
"name": "Call customer",
"description": "We need to call the customer to arrange a demo",
"state": "CANCELLED",
"key_dates": {
"created_on": 1592809457,
"scheduled_on": {
"from_date": 1592809457,
"to_date": 1592809457
}
},
"type": {
"id": "HGJDHGSJDHG",
"name": "site visit",
"color": "876FD5"
},
"contact": {
"id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
"name": "John Doe",
"code": "C123"
},
"lead": {
"id": "2760043d-c671-a428-9b35-2f27b0623fa1",
"title": "ASOS"
},
"service_request": {
"id": "JHGHGF7576HGFTGD564654",
"number": "SRV78001"
},
"order": {
"id": "2760043d-c671-a428-9b35-2f27b0623fa1",
"number": "O101367"
},
"assign_to": {
"user": {
"id": "47ac694d-6281-b873-bf46-3fd8da334a3a",
"name": "John Doe",
"username": "j_doe@crm.com"
},
"team": {
"id": "bf1370a1-73ad-0bbf-6fef-f2ce1938d4fe",
"name": "Support"
}
},
"custom_fields": [
{
"key": "back_office",
"value": "Back Office"
}
],
"tags": {
"id": "609a369e-3f10-492a-8332-679ecbe56b65",
"name": "Maintenance",
"colour": "FR547F"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Retrieve detailed information for an activity
Path variables
The activity (identifier) that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeded
Body
The activity identifier
The activity name
The activity description
The date that the activity was created
The date/time that the activity is scheduled
The scheduled from date
The scheduled to date
The activity type
The activity type identifier
The activity type name
The activity type color (hex code), used for visual purposes
Details about the related contact
The contact identifier
The contact full name
The contact unique code
The lead identifier
The lead title
The order identifier
The order number
The address line 1
The address line 2
The address state/province/county
The address town/city
The address postal code
The address country (based on ISO 3 char code)
The latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies an address
The activity states history
The activity state
The date on which the state was reached
Details about the user that the record is assigned to
The user identifier
The user name
The username of the user
Details about team
The team identifier
The team name
The custom field (unique) key
The custom field’s (provided) value
GET https://sandbox.crm.com/backoffice/v2/activities/6215f115-321a-c3d4-8809-59ca5f502433 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "6215f115-321a-c3d4-8809-59ca5f502433",
"name": "Call customer",
"description": "Arrange a call with the customer after 4pm to schedule a demo for next week",
"key_dates": {
"created_on": 1592809457,
"scheduled_on": {
"from_date": 1592809457,
"to_date": 1592809457
}
},
"type": {
"id": "HGJDHGSJDHG",
"name": "site visit",
"color": "876FD5"
},
"contact": {
"id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
"name": "John Doe",
"code": "C123"
},
"service_request": {
"id": "JHGHGF7576HGFTGD564654",
"number": "SRV78001"
},
"lead": {
"id": "2760043d-c671-a428-9b35-2f27b0623fa1",
"title": "ASOS"
},
"order": {
"id": "2760043d-c671-a428-9b35-2f27b0623fa1",
"number": "O101367"
},
"address": {
"address_line_1": "Elia Papakyriakou",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2015",
"country": "CYP",
"lat": 35.157115,
"lon": 33.313719,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
},
"states": [
{
"state": "COMPLETED",
"date": 1653400142
}
],
"assign_to": {
"user": {
"id": "47ac694d-6281-b873-bf46-3fd8da334a3a",
"name": "John Doe",
"username": "j_doe@crm.com"
},
"team": {
"id": "bf1370a1-73ad-0bbf-6fef-f2ce1938d4fe",
"name": "Support"
}
},
"custom_fields": [
{
"key": "back_office",
"value": "Back Office"
}
]
}
{id}/tags{id}/tags{id}/tagsUpdate the tags associated with the activity
Path variables
The activity (identifier) on which tags will be upaded
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The tags that will be associated with the activity
Responses
The request has succeded
Body
The activity identifier
PUT https://sandbox.crm.com/backoffice/v2/activities/d4187991-4d1a-4aa2-fa3e-ce5fe7fdb7d9/tags HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"tags": [
"96c3cb52-c68f-6ba6-e886-ed28f2b594cb"
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "d4187991-4d1a-4aa2-fa3e-ce5fe7fdb7d9"
}{id}/tagsRetrieve a list of tags that are associated with the activity
Path variables
The activity (identifier) of which tags will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeded
Body
The tag identifier
The tag name
The tag color (hex code) that will be used for visual purposes
GET https://sandbox.crm.com/backoffice/v2/activities/d82881e9-a909-9d44-4f28-4b30fc1ac276/tags HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "1abe9097-d46a-d2ed-3415-fd3e1439d8d4",
"name": "VIP",
"colour": "#0000FF"
}
]
}{id}/analytics{id}/analytics{id}{id}/{id}{id}/events{id}/filters{id}/breakdowns{id}/results{id}/preview{id}/exportsCreate a new insight
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The insight name
The insight description
Responses
Body
The insight identifier
POST https://sandbox.crm.com/backoffice/v1/insights HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"name": "Marketing customers",
"description": "A list of customers that own an account"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05"
}{id}Updates the basic information of an insight
Path variables
The insight identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The insight name
The insight’s description
Responses
Body
The insight identifier
PUT https://sandbox.crm.com/backoffice/v1/insights/c0d4712e-6688-4604-b3d6-d084e4d2dc05 HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"name": "Rewards Award",
"description": "List of contacts owning a non-terminated account",
"refresh_frequency": 1
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05"
}{id}/Delete an existing insight
Path variables
The insight identifier that will be deleted
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
DELETE https://sandbox.crm.com/backoffice/v1/insights/c0d4712e-6688-4604-b3d6-d084e4d2dc05/ HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK Returns a list of insights
Request parameters
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Search using Insights name
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
The insights unique identifier
The insight’s name
The insights’s description
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v1/insights HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Marketing customers",
"descripion": "List customers owning an account"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}{id}Get all data for a single insight
Path variables
The insight identifier that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
The insight identifier
The insight name
The event identifier
["Costa Coffee Nicosia"]The filter identifier
The breakdown identifier
simple naming A, B, C used for ordering
GET https://sandbox.crm.com/backoffice/v1/insights/c0d4712e-6688-4604-b3d6-d084e4d2dc05 HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05",
"name": "Rewards Award",
"events": [
{
"id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05",
"name": "Purchases",
"event_name": "SPEND",
"totals": {
"is_frequency": true,
"property_name": "amount"
},
"criteria": [
{
"name": "A",
"property": {
"property": "venue.name",
"operator": "IS",
"value_list": [
"Costa Coffee Nicosia"
]
}
}
]
}
],
"filters": [
{
"id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05",
"name": "",
"type": "CONTACT",
"property_name": "",
"operator": "NOT_EQUAL",
"min_value": "",
"max_value": "",
"value_list": [
""
]
}
],
"breakdowns": [
{
"id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05",
"name": "",
"type": "CONTACT",
"property_name": "city"
}
]
}
{id}/eventsAdds a set of events on an insight
Path variables
Request body
if the measurement is Freqency or Total of property
Name of the property to sum for a total or count frequency
List of selection operators
List of values if the operator is contains or single item if matching
Responses
POST https://sandbox.crm.com/backoffice/v1/insights/{id}/events HTTP/1.1
Content-Type: application/json
{
"events": [
{
"name": "Purchases",
"event_name": "SPEND",
"totals": {
"is_frequency": false,
"property_name": "amount"
},
"criteria": [
{
"name": "A",
"property": {
"property": "venue.name",
"operator": "IS",
"value_list": [
"Costa Coffee Nicosia"
]
}
}
]
}
]
}
{id}/filtersAdds a set of filters on an insight
Path variables
Request body
Use Operator
Venue1,Venue2Responses
POST https://sandbox.crm.com/backoffice/v1/insights/{id}/filters HTTP/1.1
Content-Type: application/json
{
"filters": [
{
"name": "",
"type": "EVENT",
"property_name": "",
"operator": "IS_NOT",
"min_value": "",
"max_value": "",
"value_list": [
""
]
}
]
}
HTTP/1.1 201 Created {id}/breakdownsAdds a set of breakdowns on an insight
Path variables
The insight identifier which breakdown will be set
Request body
name of the property to create the breakdown
Responses
POST https://sandbox.crm.com/backoffice/v1/insights/{id}/breakdowns HTTP/1.1
Content-Type: application/json
{
"breakdowns": [
{
"name": "",
"type": "CONTACT",
"property_name": ""
}
]
}
HTTP/1.1 201 Created {id}/resultsRetrieve results of a specific insight
Path variables
The insight identifier which results will be retrieved
Request parameters
The start date of the insight sequence
The end date of the insight sequence
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
A temporary identifier to link child levels
The identifier of the previous level
The breakdown level 0 = EVENTS
The name of the property within the group
The value of the property
The name of the event
The number of points can be used for frequency
The decimal amounts for the level
Applicable only if the property is a list and represents the list name
GET https://sandbox.crm.com/backoffice/v1/insights/04f28639-5ceb-a25e-1e44-b1109e533f42/results HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"breakdown": {
"id": "bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f",
"parent_id": "bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f",
"level": 1,
"property_name": "venue.name",
"property_value": "Costa Coffee Larnaca",
"event_name": "",
"count": 1,
"amount": 12.8,
"list_name": "products"
}
}
]
}
{id}/previewPreview the results of a specific insight
Path variables
The insight identifier which results will be previewed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The start date of the insight sequence
The end date of the insight sequence
if the measurement is Freqency or Total of property
Name of the property to sum for a total or count frequency
List of selection operators
List of values if the operator is contains or single item if matching
Use Operator
Venue1,Venue2name of the property to create the breakdown
Responses
Body
A temporary identifier to link child levels
The identifier of the previous level
The breakdown level 0 = EVENTS
The name of the property within the group
The value of the property
The name of the event
The number of points can be used for frequency
The decimal amounts for the level
Applicable only if the property is a list and represents the list name
POST https://sandbox.crm.com/backoffice/v1/insights/62cb9ada-3a7b-cafb-b7a7-7c103011fa48/preview HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"start_date": 1612953199,
"end_date": 1612953199,
"events": [
{
"name": "Purchases",
"event_name": "PURCHASE",
"totals": {
"is_frequency": true,
"property_name": ""
},
"criteria": [
{
"name": "A",
"property": {
"property": "venue.name",
"operator": "IS_NOT",
"value_list": [
""
]
}
}
]
}
],
"filters": [
{
"name": "",
"type": "CONTACT",
"property_name": "",
"operator": "DOES_NOT_CONTAIN",
"min_value": "",
"max_value": "",
"value_list": [
""
]
}
],
"breakdowns": [
{
"name": "",
"type": "CONTACT",
"property_name": ""
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"breakdown": {
"id": "bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f",
"parent_id": "bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f",
"level": 1,
"property_name": "venue.name",
"property_value": "Costa Coffee Larnaca",
"event_name": "",
"count": 1,
"amount": 12.8,
"list_name": "products"
}
}
]
}
Get a list of distinct values for a contact or event property
Request parameters
Contact or Event collectioons
city
Responses
Body
Value of the property
GET https://sandbox.crm.com/backoffice/v1/distincts HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"property_value": "London"
}
]{id}/exportsExport the results of a specific insight
Path variables
The insights (identifier) that will be exported
Request headers
Authorization Token
Request body
Defines what data should be exported from the related insight results
Export results in a tabular format, excluding underlying data
Export all underlying granular data that were used for this Insight
Defines the file format in which the exported data should be exported
CSV file
Responses
POST https://sandbox.crm.com/backoffice/v1/insights/efc5c8af-56ba-3d6f-d180-18be6dd04cc8/exports HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"type": "UGD",
"format": "csv"
}
HTTP/1.1 200 OK CRM.COM provides a pre-defined list of Reports.
{name}/preview{name}{id}{id}{id}{name}/previewRuns the report in preview mode. The Web API returns a subset of the report’s results for preview purposes (max 10 records included in the response).
Path variables
The report (unique name) that will be previewed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Set of filters based on which the report runs
The filter’s name
The filter’s value as this was specified by the user
Set of columns that will be included in the report’s preview. Up to 10 columns are included by default
Number, NameThe field’s key name
Responses
Body
List of fields and their values. Each object in this list represents a row in the report’s preview. Up to 10 records are returned
The field’s key
The key’s value
POST https://sandbox.crm.com/backoffice/v2/reports/contacts_summary/preview HTTP/1.1
Content-Type: application/json
{
"filters_set": [
{
"key": "period_from",
"value": "This month"
}
],
"columns_set": [
{
"key": "product_code"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"fields": [
{
"key": "name",
"value": "Jane Smith"
}
]
}
]
}
{name}Runs the requested report and sends an email to the User that ran it. User receives a link through which the report can be downloaded. The download link will be available for 2 days. The Report can also be scheduled via this Web API, i.e. schedule to run and send its results on a frequent basis.
Path variables
The report (unique name) that will be scheduled
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The report’s format
Set of filters based on which the report runs
[
{
"label": "Registration date",
"key": "period_from",
"value": "THIS_MONTH",
"type": "NUMBER"
}
]The filter’s label
The filter’s name
The filter’s value as this was specified by the user
The data type of the filter
Set of columns that will be included in the report
Number, NameThe ordering of the columns from left to right
The column’s label as this will be displayed on the report
The field’s name
The data type of the filter
Set of fields to be used to group the report’s results
The grouping’s ordering
The group by field’s label as this will be displayed on the report
The field’s name
The data type of the filter
Defines the report’s name (if not provided will be set based on the report’s unique name, e.g. Contacts Summary). Specify a meaningfull name if reprot is to be scheduled. This report name appears in the email’s subject.
Defines the scheduler settings that will send a report on a recurring basis (if not specified, report will be generated and send only once)
Defines the period when report generation will take place
The repeat frequency provided as a cron expression pattern
Defines the recipients that will receive the report results (if not specified, will be sent to the user that requested such report). Applicable only on scheduling the report.
The type of recipients that will retrieve the report
Applicable only to Business organisations
The recipients that will retrieve the report
Responses
Runs a report and sends its results via email to the user who runs it
POST https://sandbox.crm.com/backoffice/v2/reports/contacts_summary HTTP/1.1
Content-Type: application/json
{
"format": "PDF",
"filters_set": [
{
"label": "Registration date",
"key": "period_from",
"value": "THIS_MONTH",
"type": "TEXT"
}
],
"columns_set": [
{
"order": 1,
"label": "Code",
"key": "product_code",
"type": "TEXT"
}
],
"group_by_set": [
{
"order": 1,
"label": "Type",
"key": "product_type",
"type": "DATE"
}
]
}
Schedule a report to be sent on a recurring basis and send to users of a specific team
POST https://sandbox.crm.com/backoffice/v2/reports/contacts_summary HTTP/1.1
Content-Type: application/json
{
"format": "CSV",
"filters_set": [
{
"label": "Registration date",
"key": "period_from",
"value": "THIS_MONTH",
"type": "INTEGER"
}
],
"columns_set": [
{
"order": 1,
"label": "Code",
"key": "product_code",
"type": "NUMBER"
}
],
"group_by_set": [
{
"order": 1,
"label": "Type",
"key": "product_type",
"type": "TEXT"
}
],
"name": "VIP Contacts",
"scheduler_options": {
"period": "WEEKLY",
"frequency": "0 0 12 * * ?"
},
"recipients": [
{
"type": "TEAM",
"id": "b52f4dbb-0ccf-db7a-93b6-2cc35af9fc39"
}
]
}
{id}Update a Report’s scheduling options.
Path variables
The scheduled report’s identifier
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The report’s format
Defines the scheduler settings that will send a report on a recurring basis (if not specified, report will be generated and send only once)
Defines the period when report generation will take place
The repeat frequency provided as a cron expression pattern
Defines the recipients that will receive the report results. A scheduled reprot requires at least one recipient.
The type of recipients that will retrieve the report
Applicable only to Business organisations
The recipients that will retrieve the report
Responses
Body
The report identifier
PUT https://sandbox.crm.com/backoffice/v2/reports/81228876-09c6-cc46-638d-be2a7a6867bf HTTP/1.1
Content-Type: application/json
{
"format": "PDF",
"scheduler_options": {
"period": "WEEKLY",
"frequency": "0 0 12 * * ?"
},
"recipients": [
{
"type": "TEAM",
"id": "b52f4dbb-0ccf-db7a-93b6-2cc35af9fc39"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "81228876-09c6-cc46-638d-be2a7a6867bf"
}{id}Deletes a scheduled report. The selected report will no longer be sent to any recipients.
Path variables
The schedulued report’s identifier
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
DELETE https://sandbox.crm.com/backoffice/v2/reports/1193d47e-f079-3f03-299b-50b7419459af HTTP/1.1
HTTP/1.1 204 No Content Retrieves a list of all scheduled reports
Request parameters
Filter based on report name
Filter based on report type
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
The type of the event
The scheduled report name
Defines the scheduler settings that will send a report on a recurring basis (if not specified, report will be generated and send only once)
Defines the period when report generation will take place
The repeat frequency provided as a cron expression pattern
The next scheduled period to run the report
Defines the recipients that will receive the report results
The type of recipients that will retrieve the report
Applicable only to Business organisations
The recipient name
The recipient username (applicable for recipients of type == USER)
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v2/reports HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"type": "organisations_rewards_analysis",
"name": "VIP Contacts",
"scheduler_options": {
"period": "WEEKLY",
"frequency": "0 0 12 * * ?",
"next_scheduled": 1639123750
},
"recipients": [
{
"type": "TEAM",
"name": "John Doe",
"username": "johndoe@crm.com"
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Get details for a specific scheduled report
Path variables
The scheduled report’s identifier that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
The (scheduled) report (identifier) that will be retrieved
The scheduled report name
The type of the event
The report’s format
Details about the filters based on which the report runs
The filter’s label
The filter’s name
The filter’s value as this was specified by the user
The data type of the filter
Details about the columns that will be included in the report
The ordering of the columns from left to right
The column’s label as this will be displayed on the report
The field’s name
The data type of the filter
Details about the fields to be used to group the report’s results
The grouping’s ordering
The group by field’s label as this will be displayed on the report
The field’s name
The data type of the filter
Defines the scheduler settings that will send a report on a recurring basis (if not specified, report will be generated and send only once)
Defines the period when report generation will take place
The repeat frequency provided as a cron expression pattern
The next scheduled period to run the report
Details about the recipients that will receive the report results
The type of recipients that will retrieve the report
Applicable only to Business organisations
The recipients that will retrieve the report
GET https://sandbox.crm.com/backoffice/v2/reports/df97fe77-84f0-d761-39d6-6d9e1ddf4962 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "df97fe77-84f0-d761-39d6-6d9e1ddf4962",
"name": "VIP Contacts",
"type": "devices_summary",
"format": "PDF",
"filters_set": [
{
"label": "Registration date",
"key": "period_from",
"value": "THIS_MONTH",
"type": "INTEGER"
}
],
"columns_set": [
{
"order": 1,
"label": "Code",
"key": "product_code",
"type": "NUMBER"
}
],
"group_by_set": [
{
"order": 1,
"label": "Type",
"key": "product_type",
"type": "DATE"
}
],
"scheduler_options": {
"period": "WEEKLY",
"frequency": "0 0 12 * * ?",
"next_scheduled": 1639123750
},
"recipients": [
{
"recipient_type": "USER",
"recipient_id": "b52f4dbb-0ccf-db7a-93b6-2cc35af9fc39"
}
]
}
{id}/analyticsGet analytics for an organisation
Path variables
The organisation identifier that is optionally a parent. If the organisation is a Parent an optional paramter can request children in the same response.
Request parameters
Which metrics are required. A list of metrics can be included in the request, comma separated. At least one must be specified.
Total Awarded Amount and Total Number of Awards and Previous Period Values
Total Spent Amount and Total Number of Spends and Previous Period Values
Frequency denotes which metric will be applied for example get the daily or monthly metrics
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
The number of contacts auth’d against a WiFi platform
The number of devices auth’d against a WiFi platform
Details about data allowance (data should be aggregated from child organisations as well)
The consumed data allownace
The remaining data allownace
The total data allownace (consumed + remaining)
Details about the top 10 organisations that allowance was consumed
The organisation identifier
The organisation name
The total allowance consumed on the organisation
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v1/organisations/babc8d45-50be-4259-b1bf-c85dee46642f/analytics HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "",
"organisation_id": "64824e45-ad64-40c5-9ef4-81cb4d88d9b5",
"organisation_name": "Subscription-Billing",
"merchants": 1,
"venues": 1,
"trials": 1,
"new_sign_ups": 1,
"referred_by": 1,
"reward_participants": 1,
"reward_participants_per_tier": 1,
"open_loop_reward_participants": 1,
"close_loop_reward_participants": 1,
"active_offers": 1,
"most_awarded_offer": "",
"total_awards": 1,
"total_spends": 1,
"given_awards": 1,
"awards_spend": 1,
"average_spend_per_visit": 1,
"top_10_best_offers": [
{
"offer_id": "034de72f-2006-4a80-ba49-13c4de5cc31b",
"offer_name": "Register to Sports channel and win 21 BDT",
"total_award_amount": 26.25
}
],
"total_purchase_amount": 1,
"total_visits": 1,
"most_visited_venues": "",
"total_applications_usage": 1,
"wallets_open_balance": 1,
"wallets_commerse_balance": 1,
"active_subscribers": 1,
"inactive_subscribers": 1,
"new_services": 1,
"cancelled_services": 1,
"regretted_services": 1,
"upgraded_services": 1,
"downgraded_services": true,
"services_in_trial": 1,
"deactivated_services": 1,
"activated_services": 1,
"paid_services_in_trial": 1,
"cancelled_services_in_trial": 1,
"new_subscribers": 1,
"reactivated_subscriptions": 1,
"removed_services_after_expiration": 1,
"cancelled_services_in_contract": 1,
"cancelled_services_not_in_contract": 1,
"renewed_services": 1,
"expired_services": 1,
"subscriber_churn_rate": 1,
"active_subscriptions_per_billing_period": 1,
"active_services_per_month": 1
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/analyticsGet analytics for a contact
Path variables
The contact (identifier) of which analytics will be retrieved
Request parameters
Filters based on which metrics will be retrieved (a list of metrics can be included in the request, comma separated - and at least one metric should be specified)
Frequency denotes which metric will be applied for example get the daily or monthly metrics
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
Details about the contact
The contact identifier
The contact (full) name
Details about contact’s usage
The usage that is already consumed
The remaining usage that can be consumed
The percentage relation between consumed and allowed usage
GET https://sandbox.crm.com/backoffice/v1/contacts/babc8d45-50be-4259-b1bf-c85dee46642f/analytics?metrics=USAGE&frequency=OVERALL HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"contact": {
"id": "fa3360fa-a246-7d1e-1c41-eda3c093dcc9",
"name": "John R. Doe"
},
"usage": {
"consumed_usage": 20,
"remaining_usage": 80,
"usage_percentage": 20
}
}Create an upload signature for files
Notes
Integrating file upload for Service Requests should be based on the following APIs
- Upload File Signature
- Connect File to a “Module” Entity, such as Service Request Files
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
File contents provided via multipart/form-data
Responses
The request has succeeded
Body
The file identifier that will be used for connecting the file with a module
POST https://sandbox.crm.com/backoffice/v2/files HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"file": "file object"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "7279fecf-b0a6-0aab-6bcd-37881fe8c10e"
}{id}Delete an existing file
Path variables
The file (identifier) to be deleted
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
DELETE https://sandbox.crm.com/backoffice/v2/files/5f21680e-2ce4-7b4b-7221-42cc2a41bc05 HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK {id}Retrieve a specific file
Path variables
The file (identifier) to be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The file identifier
The URL that can be used to access the actual content of the file
The mime type of the uploaded file
GET https://sandbox.crm.com/backoffice/v2/files/5f21680e-2ce4-7b4b-7221-42cc2a41bc05 HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "3ae9d64a-8a3b-f1e1-eed6-05b307f926fb",
"content_url": "crm.com/file",
"mime": "txt"
}{id}Create a new group for upcoming uploaded media
Notes
Uploading media for an entity requires the execution of the following APIs
- Create new Media Group
- Create “Module” Media Group, such as Product Media Groups
- Upload Media
- Perform Cloudinary Upload (where CRM will send all signature details)
- Cloudinary service calls back CRM media group (using an internal callback)
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The media group name
The media group description
The media group external identifier
Responses
The request has succeeded
Body
The media group identifier
POST https://sandbox.crm.com/backoffice/v1/media_groups HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"name": "Marketing",
"description": "Marketing Media Group for Creatives",
"external_id": "747e5a96-24a2-7aca-7b28-da5e996ad54c"
}
HTTP/1.1 200 OK Create an upload media
Notes
Uploading media for an entity requires the execution of the following APIs
- Create new Media Group
- Create “Module” Media Group, such as Product Media Groups
- Upload Media
- Perform Cloudinary Upload (where CRM will send all signature details)
- Cloudinary service calls back CRM media group (using an internal callback)
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The media group (identifier) to associate the media item with once uploaded (external id is based on the response of Create new Media Group)
Information about the creative type
Partner logos configurable by SO, applicable for Business, Merchant, Venue
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
The related Cloudinary folder (within CRM the folder is set as the media related organisation-id)
The key to track upload (random UUID)
Responses
The request has succeeded
Body
The API key that is used for uploading media
The name of the cloudinary instance
The uploaded signature context
The uploaded signature value
The date/time on which such upload was made
Details about the upload options
The folder in which media will be uploaded (and located)
The media group external identifier
Information about the creative type
Partner logos configurable by SO, applicable for Business, Merchant, Venue
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Defines how media will be used
The option type (defaults to upload)
Details that will be used in the signature
The folder in which media will be uploaded (and located)
Defines what action will be performed on the media (always is set to “upload”)
The key to track the current upload
POST https://sandbox.crm.com/backoffice/v2/media HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"media_group_external_id": "e66896ba-db0a-41e2-8093-9aca2ae02f29",
"media_usage_type": "LOGO",
"folder": "offers/hero",
"tracking_key": "26c32dfe-f8ea-9cf3-a5af-5096be4a164b"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"api_key": "698271538719998",
"cloud_name": "crm-com",
"context": "uploadStrategy=MEDIA_UPLOAD|organisationId=8062c26a-c05f-47ca-81e4-566b3c279320|trackingKey=e3ffca89-902f-4bd6-b503-c7dcf59dd725|mediaGroupExternalId=1d7b73d2-a324-4cee-a97a-492050b101ef|usageType=ATTACHMENT",
"signature": "8f38472a40d8466f11852bd9d3a19c23bfe12f91",
"timestamp": 1616056261,
"upload_options": [
{
"folder": "35d7d0a4-9846-73a7-8707-26d2507edc51",
"media_group_external_id": "35d7d0a4-9846-73a7-8707-26d2507edc51",
"media_usage_type": "MARKETING",
"options": {
"type": "upload"
},
"needed_signature_options": {
"folder": "6ff2469c-e473-e370-c86e-16633434607a",
"type": "upload"
},
"tracking_key": "6ff2469c-e473-e370-c86e-16633434607a"
}
]
}
Create an upload signature
Notes
Uploading media into CRM is made based on the following flow & API calls
- Create new Media Group
- Create “Module” Media Group, such as Product Media Groups
- Upload Media
- Perform Cloudinary Upload (where CRM will send all signature details)
- Cloudinary service calls back CRM media group (using an internal callback)
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The media group (identifier) to associate the media item with once uploaded (external id is based on the response of Create new Media Group)
Information about the creative type
Partner logos configurable by SO, applicable for Business, Merchant, Venue
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
The related Cloudinary folder (within CRM the folder is set as the media related organisation-id)
The key to track upload (random UUID)
Responses
The request has succeeded
Body
The API key that is used for uploading media
The name of the cloudinary instance
The uploaded signature context
The uploaded signature value
The date/time on which such upload was made
Details about the upload options
The folder in which media will be uploaded (and located)
The media group external identifier
Information about the creative type
Partner logos configurable by SO, applicable for Business, Merchant, Venue
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
The option type
The key to track the current upload
POST https://sandbox.crm.com/backoffice/v2/signature HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
Content-Type: application/json
{
"media_group_external_id": "e66896ba-db0a-41e2-8093-9aca2ae02f29",
"media_usage_type": "APPLE_LOCKSCREEN_ICON",
"folder": "offers/hero",
"tracking_key": "26c32dfe-f8ea-9cf3-a5af-5096be4a164b"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"api_key": "698271538719998",
"cloud_name": "crm-com",
"context": "uploadStrategy=MEDIA_UPLOAD|organisationId=8062c26a-c05f-47ca-81e4-566b3c279320|trackingKey=e3ffca89-902f-4bd6-b503-c7dcf59dd725|mediaGroupExternalId=1d7b73d2-a324-4cee-a97a-492050b101ef|usageType=ATTACHMENT",
"signature": "8f38472a40d8466f11852bd9d3a19c23bfe12f91",
"timestamp": 1616056261,
"upload_options": [
{
"folder": "35d7d0a4-9846-73a7-8707-26d2507edc51",
"media_group_external_id": "35d7d0a4-9846-73a7-8707-26d2507edc51",
"media_usage_type": "APPLE_LOCKSCREEN_ICON",
"options": {
"type": "upload"
},
"needed_signature_options": {
"folder": "6ff2469c-e473-e370-c86e-16633434607a",
"type": "upload"
},
"tracking_key": "6ff2469c-e473-e370-c86e-16633434607a"
}
]
}
{id}Delete an existing media
Path variables
The media (identifier) that will be deleted
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
DELETE https://sandbox.crm.com/backoffice/v2/media/5f21680e-2ce4-7b4b-7221-42cc2a41bc05 HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 204 No Content Approval is a type of workflow which comprises a series of steps that an event must pass in order to be approved. A request for approval prevents a specific record from further amendment or process unless it is approved by a number of authorised user(s) or contact. Approval requests are created when an automation is triggered and can be processed (approved/rejected) by an authorised user or by a contact.
{id}/actions{token}Retrieve a list of approval requests based on search criteria (e.g. all pending approval requests)
Request parameters
Filter based on search value (case insensitive) across entity and entity reference
Filter based on approval request state
Filter based on automations that triggered such request (applicable only when org_requests is set to NETWORK_REQUESTS)
Filter based on a single user that is authorised to approve/reject such request
Filter based on a single contact that is authorised to approve/reject such request
Filter based on the condition type that are authorised to approve/reject such requests
Filter based on the entity (contact/user) that requested such approval
Filter based on the entity type that such requests are applied to
Filter based on entity record that such request is applied to
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The approval request identifier
The approval request state
Details about the entity that an approval request was applied to
The entity identifier
The approval entity type
The entity reference name/code/number
Details about the automation
The automation identifer
The automation name
Details about approval requests responses
The authorised user/contact response message on this request
The response state
Details about the person (user/contact) who approved/rejected such request
The authorised person identifier
The authorised person full name
The authorised type of person
The date/time when such request was approvded/rejected
Details about the authorised by type who can approve/reject such requests
The authorised condition identifier
The authorised condition name (e.g. contact full name, user role name)
The authorised condition type
The date that the approval was requested
Defines how many should approve/reject the approval
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v1/approval_requests HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"state": "APPROVED",
"description": "The award of the offer has been changed to 100% from what it was 50%",
"response": "Approved",
"authorised_by": {
"id": "23490b97-dd93-3eb4-c3bc-e6828e12e2c1",
"name": "John Doe",
"type": "USER"
},
"authorised_on": 1611930210,
"automations": {
"id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
"name": "Request approval on newly activated offers"
},
"entity": {
"id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
"type": "REWARD_OFFER",
"reference": "5% discount"
},
"authorised_conditions": [
{
"id": "18eb40c8-ba71-fa51-9de7-5b7017962ccf",
"name": "John Doe",
"type": "USER"
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/actionsPerform actions on existing approval requests (e.g. approve a request)
Path variables
The approval request (identifier) that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The approval request state that will be changed to
The reason why the approval request was approved or rejected
Responses
The request has succeeded
Body
The approval request identifier
PUT https://sandbox.crm.com/backoffice/v2/approval_requests/23cf989a-47b5-6019-d0c9-b4a50a13f847/actions HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"state": "REJECTED",
"response": "Award cannot be 100%"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "23cf989a-47b5-6019-d0c9-b4a50a13f847"
}{token}Accept or reject a pending approval request (using an action link send via a communication)
Path variables
The token that will verify that the client is trusted and will approve/reject the related request
Responses
The request has succeeded
Body
An HTML based landing page is returned and rendered
Retrieve a list of pending approval requests based on search criteria that the signed-in user is authorised to approve/reject (e.g. all pending reward offer approval requests)
Request parameters
Filter based on search value (case insensitive) across entity and entity reference
Filter based on entity type that such requests are applied to
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
Responses
The request has succeeded
Body
The approval request identifier
The date that the approval was requested
Details about the entity that an approval request was applied to
The entity identifier
The approval entity type
The entity reference name/code/number
Details about the automation
The automation identifer
The automation name
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v1/approval_requests/my_pending_approvals HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"entity": {
"id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
"type": "SERVICE_REQUEST",
"reference": "CO1234"
},
"automations": {
"id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
"name": "Request approval on newly activated offers"
},
"created_date": 1642508197
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
Retrieve a list of approvals based on search criteria that were requested by the signed-in user (e.g. all pending approvals)
Request parameters
The value of the search (case insensitive) across entity and entity reference
Filter based on approval request state
Filter based on the entity type that such requests are applied to
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
Responses
The request has succeeded
Body
The approval request identifier
The approval request state
The date that the approval was requested
Defines how many should approve/reject the approval
Details about the entity that an approval request was applied to
The entity identifier
The approval entity type
The entity reference name/code/number
Details about the automation
The automation identifer
The automation name
Details about approval requests responses
[
{
"message": "This is a response message",
"state": "APPROVED",
"authorised_by": {
"id": "23490b97-dd93-3eb4-c3bc-e6828e12e2c1",
"name": "John Doe",
"type": "USER"
},
"authorised_on": 1611930210
}
]The authorised user/contact response message on this request
The response state
Details about the person (user/contact) who approved/rejected such request
The authorised person identifier
The authorised person full name
The authorised type of person
The date/time when such request was approvded/rejected
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v1/approval_requests/my_requests HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"state": "APPROVED",
"entity": {
"id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
"type": "ORDER",
"reference": "CO1234"
},
"automations": {
"id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
"name": "Request approval on newly activated offers"
},
"responses": [
{
"message": "This is a response message",
"state": "APPROVED",
"authorised_by": {
"id": "23490b97-dd93-3eb4-c3bc-e6828e12e2c1",
"name": "John Doe",
"type": "USER"
},
"authorised_on": 1611930210
}
],
"created_date": 1642508197,
"pending_requests": 2
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
An automation is a predefined sequence of steps that allow a business to automate repeatable tasks that are required to carry its operations. An automation starts with an event trigger (an action within CRM.COM, such as contact registration, award contact) and is completed with a series of actions via internal and/or external adaptors (e.g. send contacts an outbound email communication) executed in the sequential order defined.
Each adaptor is designed to carry out a specific business action (e.g. Mailchimp to send an email to a contact; or the CRM.COM assignment adaptor to fulfil an order by a venue).
{id}{id}{id}Create a new automation
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The automation name
The automation description
The automation state
Defines the entity that its events will trigger this automation
Defines the event that will trigger this automation (filtered based on the selected entity)
Approvals
Approvals
Contacts
Contacts
Contacts
Contacts
Contacts
Contacts & Users
Orders
Orders
Orders
Orders
Passes
Passes
Rewards
Rewards
Rewards
Reward Offers
Reward Schemes
Service Requests
Organisations
Organisations
Users
Users
Products
Financial Transactions
Financial Transactions
Financial Transactions
Financial Transactions
Financial Transactions
Customer Events
Customer Events
Customer Events
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Usage
Usage
Orders
Orders
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Activities
Activities
Activities
Products
Products
Financial Transactions
Financial Transactions
Orders
Financial Transactions
The automation actions (adaptors and filters) that will be performed
The automation action
The automation action order
Details about adaptor (and its action/parameters)
The automation adaptor
Activity Provision
Approval Requests
Automatic Content Updates
Communications
Customer Event Provision
Order Provision
Order Provision
Service Request Provision
Webhooks
MICROS Simphony Order Provision
NCR Aloha Order Provision
Twinsoft Order Provision
The automation adaptor action (each action is applicable for specific adaptors)
Request User Appoval
Request Contact Appoval
Update Content
Communicate Contact
Communicate User
Assign to a specific user
Fulfilled By specific organisation
Assign to specific team adaptor)
Fulfilled by nearest location
Fulfilled based on postal code
Post Webhook
Put Webhook
Assign to user of a specific team
Assign to user of a specific user role
Fulfilled by a user of a specific user role
Fulfilled by a specific user
Provision (create) order to Simphony POS
Provision (create) order to Aloha POS
Provision (void) order to Aloha POS
Create a purchase event
Cancel a purchase event
Webhooks
Schedule an activity
Provision (create) order to Twinsoft POS
Provision (print receipt) order to an external POS based on IP and port
Create an achievement event
Details about the adaptor’s actions parameters
The parameter identifier
The parameter type
The parameter group (used when more than one parameters should be specified for an adaptor’s action)
The parameter key
The parameter from value
The parameter to value
Details about the filters to be applied (required when type is based on Filter)
Details about applicable filter attributes
The filter identiifer
The attribute that its value will be compared based on the related operator
The type of the key
The filter operator to compare the attribute actual value with the filtered one
Applicable for type of number/integer/date
Applicable for type of string
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
The attribute value to apply the filter condition (either value or value_list should be specified)
The supported list of values (either value or value_list should be specified)
The custom field that its value will be compared based on the related operator
Responses
The request has succeeded
Body
The automation identifier
POST https://sandbox.crm.com/backoffice/v2/automations HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"name": "Communicate contact on service request",
"description": "actions on new service request",
"state": "INACTIVE",
"entity": "ORGANISATIONS",
"event": "NEW_ORDER",
"actions": [
{
"order": 1,
"adaptor": {
"adaptor": "APPROVAL_REQUESTS",
"action": "FF_BY_USER_OF_SPEC_USER_ROLE",
"parameters": [
{
"id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
"type": "INTEGER",
"group": "1",
"key": "FULFILL_ORDER_DISTANCE",
"from_value": "123",
"to_value": "1234"
}
]
}
}
]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "c69b54fc-644b-1dc9-65b2-f0b3672cf46e"
}
{id}Update an existing automation
Path variables
The automation (identifier) that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The automation name
The automation description
The automation state
The automation actions (adaptors and filters) that will be performed
The automation action
The automation action order
Details about adaptor (and its action/parameters)
The automation adaptor
Activity Provision
Approval Requests
Automatic Content Updates
Communications
Customer Event Provision
Order Provision
Order Provision
Service Request Provision
Webhooks
MICROS Simphony Order Provision
NCR Aloha Order Provision
Twinsoft Order Provision
The automation adaptor action (each action is applicable for specific adaptors)
Request User Appoval
Request Contact Appoval
Update Content
Communicate Contact
Communicate User
Assign to a specific user
Fulfilled By specific organisation
Assign to specific team adaptor)
Fulfilled by nearest location
Fulfilled based on postal code
Post Webhook
Put Webhook
Assign to user of a specific team
Assign to user of a specific user role
Fulfilled by a user of a specific user role
Fulfilled by a specific user
Provision (create) order to Simphony POS
Provision (create) order to Aloha POS
Provision (void) order to Aloha POS
Create a purchase event
Cancel a purchase event
Webhooks
Schedule an activity
Provision (create) order to Twinsoft POS
Provision (print receipt) order to an external POS based on IP and port
Create an achievement event
Details about the adaptor’s actions parameters
The parameter identifier
The parameter type
The parameter group (used when more than one parameters should be specified for an adaptor’s action)
The parameter key
The parameter from value
The parameter to value
Details about the filters to be applied (required when type is based on Filter)
Details about applicable filter attributes
The filter identiifer
The attribute that its value will be compared based on the related operator
The type of the key
The filter operator to compare the attribute actual value with the filtered one
Applicable for type of number/integer/date
Applicable for type of string
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
The attribute value to apply the filter condition (either value or value_list should be specified)
The supported list of values (either value or value_list should be specified)
The custom field that its value will be compared based on the related operator
Responses
The request has succeeded
Body
The automation identifier
PUT https://sandbox.crm.com/backoffice/v2/automations/c69b54fc-644b-1dc9-65b2-f0b3672cf46e HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"name": "Approve Offers",
"description": "Require 4 approvals for an offer",
"state": "INACTIVE",
"actions": [
{
"order": 1,
"adaptor": {
"adaptor": "CUSTOMER_EVENTS",
"action": "FULFILLED_BY_SPECIFIC_USER",
"parameters": [
{
"id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
"type": "NUMBER",
"group": "1",
"key": "FULFILL_ORDER_POSTAL_CODE",
"from_value": "123",
"to_value": "1234"
}
]
}
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "c69b54fc-644b-1dc9-65b2-f0b3672cf46e"
}
{id}Delete an existing automation
Path variables
The automation (identifier) that will be deleted
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
DELETE https://sandbox.crm.com/backoffice/v2/automations/3c72e7d1-e763-1db7-a776-6dd0295f728c HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 204 No Content Retrieve a list of automations based on search criteria (e.g. all active automations)
Request parameters
Filter based on search value (case insensitive) across name
Filter based on automation name
Filter based on automation state
Filter based on the entity that its event will trigger the automation
Filter based on the event that will trigger the automation
Approvals
Approvals
Contacts
Contacts
Contacts
Contacts
Contacts
Contacts & Users
Orders
Orders
Orders
Orders
Passes
Passes
Rewards
Rewards
Rewards
Reward Offers
Reward Schemes
Service Requests
Organisations
Organisations
Users
Users
Products
Financial Transactions
Financial Transactions
Financial Transactions
Financial Transactions
Financial Transactions
Customer Events
Customer Events
Customer Events
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Usage
Usage
Orders
Orders
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Activities
Activities
Activities
Products
Products
Financial Transactions
Financial Transactions
Orders
Financial Transactions
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The automation identifier
The automation name
The automation description
The automation state
Defines the entity that its events will trigger this automation
Defines the event that will trigger this automation (filtered based on the selected entity)
Approvals
Approvals
Contacts
Contacts
Contacts
Contacts
Contacts
Contacts & Users
Orders
Orders
Orders
Orders
Passes
Passes
Rewards
Rewards
Rewards
Reward Offers
Reward Schemes
Service Requests
Organisations
Organisations
Users
Users
Products
Financial Transactions
Financial Transactions
Financial Transactions
Financial Transactions
Financial Transactions
Customer Events
Customer Events
Customer Events
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Usage
Usage
Orders
Orders
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Activities
Activities
Activities
Products
Products
Financial Transactions
Financial Transactions
Orders
Financial Transactions
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v2/automations HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "efc5389d-ae3f-9b94-73f9-5f916e8b350e",
"name": "communicate contact",
"description": "Lorem Ipsum",
"state": "INACTIVE",
"entity": "REWARD_OFFERS",
"event": "INVITE_EXISTING_USER"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Retrieve detailed information for an automation
Path variables
The automation (identifier) that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The automation identifier
The automation name
The automation description
The automation state
Defines the entity that its events will trigger this automation
Defines the event that will trigger this automation (filtered based on the selected entity)
Approvals
Approvals
Contacts
Contacts
Contacts
Contacts
Contacts
Contacts & Users
Orders
Orders
Orders
Orders
Passes
Passes
Rewards
Rewards
Rewards
Reward Offers
Reward Schemes
Service Requests
Organisations
Organisations
Users
Users
Products
Financial Transactions
Financial Transactions
Financial Transactions
Financial Transactions
Financial Transactions
Customer Events
Customer Events
Customer Events
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Subscriptions
Usage
Usage
Orders
Orders
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Service Requests
Activities
Activities
Activities
Products
Products
Financial Transactions
Financial Transactions
Orders
Financial Transactions
The automation actions (adaptors and filters) that will be performed
Defines the sequence’s action
Details about adaptor (and its action/parameters)
The automation adaptor
Activity Provision
Approval Requests
Automatic Content Updates
Communications
Customer Event Provision
Order Provision
Order Provision
Service Request Provision
Webhooks
MICROS Simphony Order Provision
NCR Aloha Order Provision
Twinsoft Order Provision
The automation adaptor action (each action is applicable for specific adaptors)
Request User Appoval
Request Contact Appoval
Update Content
Communicate Contact
Communicate User
Assign to a specific user
Fulfilled By specific organisation
Assign to specific team adaptor)
Fulfilled by nearest location
Fulfilled based on postal code
Post Webhook
Put Webhook
Assign to user of a specific team
Assign to user of a specific user role
Fulfilled by a user of a specific user role
Fulfilled by a specific user
Provision (create) order to Simphony POS
Provision (create) order to Aloha POS
Provision (void) order to Aloha POS
Create a purchase event
Cancel a purchase event
Webhooks
Schedule an activity
Provision (create) order to Twinsoft POS
Provision (print receipt) order to an external POS based on IP and port
Create an achievement event
Details about the adaptor’s actions parameters
The parameter identifier
The parameter key
The parameter from value
The parameter to value
The parameter type
The parameter group (used when more than one parameters should be specified for an adaptor’s action)
Details about the filters to be applied (required when type is based on Filter)
The action filter identifier
Details about applicable filter attributes
The filter identiifer
The attribute that its value will be compared based on the related operator
The type of the key
The filter operator to compare the attribute actual value with the filtered one
Applicable for type of number/integer/date
Applicable for type of string
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
The attribute value to apply the filter condition (either value or value_list should be specified)
The supported list of values (either value or value_list should be specified)
The custom field that its value will be compared based on the related operator
GET https://sandbox.crm.com/backoffice/v2/automations/37160c87-3c37-9a00-0716-4933fe6b76f4 HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "37160c87-3c37-9a00-0716-4933fe6b76f4",
"name": "communicate contact",
"description": "On customer award an outbound email communication will be triggered",
"state": "INACTIVE",
"entity": "PASSES",
"event": "APPROVE_ALL_REQUESTS",
"actions": [
{
"order": 1,
"adaptor": {
"adaptor": "CUSTOMER_EVENTS",
"action": "ASSIGN_USER_OF_SPECIFIC_TEAM",
"parameters": [
{
"id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
"key": "FULFILL_ORDER_POSTAL_CODE",
"from_value": "123",
"to_value": "1234",
"type": "DATE",
"group": "1"
}
]
}
}
]
}
Bulk Data Operations is a usefull utility tool that enables the ability to import and export a sizeable volumes of data, such as contacts and products, into and out of CRM.COM.
{id}/actionsPreview the content of a file that will be imported
Notes
Importing Data should be made based on the following API order
- Upload File Signature
- Optionally, preview the content of the uploaded file via Import Preview
- Submit a request to import the content of the uploaded file, including a couple behavorial options via Import Data
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The file (identiifer) that will be previewed
Defines the number of rows that will be previewed (header row is excluded)
Defines whether the header row values will be excluded from import or not
Defines the mapping between the imported file attribures and system attributes
The imported file attribute that will be mapped to the system’s one
The system attribute that will be mapped to the imported file’s one
Defines whether the system attribute key is a custom one or not
Responses
The request has succeeded
Body
Details about the file preview per row
The header attribute of the specific row
The previewed values of the specific row
[
"CRM", "CRMI"
]GET https://sandbox.crm.com/backoffice/v2/imports/preview HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"file_id": "f56f9cd8-9cb2-bbe6-d4d9-ae14bb1f0399",
"preview_rows": 5,
"exclude_header": "false",
"data_mapping": [
{
"import_key": "contact first name",
"attribute_key": "first_name",
"is_custom": "false"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"header": "Organisation Name",
"values": [
"CRM"
]
}
]
}
Submit a request for importing data along with processing options
Notes
Importing Data should be made based on the following API order
- Upload File Signature
- Optionally, preview the content of the uploaded file via Import Preview
- Submit a request to import the content of the uploaded file, including a couple behavorial options via Import Data
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The file (identifier) that will be used for importing data
The type of the entity that data will be imported
Defines whether the header row values will be excluded from import or not
Defines whether existing records will be updated or not
Defines whether missing attributes will be created automatically
Defines the mapping between the imported file attribures and system attributes
The imported file attribute that will be mapped to the system’s one
The system attribute that will be mapped to the imported file’s one
Defines whether the system attribute key is a custom one or not
Responses
The request has succeeded
Body
The import definition identifier
POST https://sandbox.crm.com/backoffice/v2/imports HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"file_id": "1e347d4d-ab96-6957-fdb6-35e72b3d9185",
"type": "DEVICES",
"exclude_header": true,
"update_data": "false",
"auto_generate_config": true,
"data_mapping": [
{
"import_key": "contact first name",
"attribute_key": "first_name",
"is_custom": "false"
}
]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "1e347d4d-ab96-6957-fdb6-35e72b3d9185"
}
Retrieve a list of import data definitions based on search criteria (e.g. all completed imports)
Request parameters
Filter imports based on state
Import is queued to be processed
Import is currently processing
Import is completed
Import is failed
Filter imports based on imported record type
Filter based on the imported date, which may fall within a given date range. The value can be a string with a date in epoch format. Each option must also include an operator. Use up to two options based on the required search (e.g. imported_on[gte]=1618395497&imported_on[lt]=1618395497).
Returns results where the imported date is greater than this value
Returns results where the imported date is greater than or equal to this value
Returns results where the imported date is less than this value
Returns results where the imported date is less then or equal to this value
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The import definition identifier
The export definition status
Import is queued to be processed
Import is currently processing
Import is completed
Import is failed
The type of the entity that data will be imported
The date that such import was made
Details how the import file content will be processed
Defines whether the header row values will be excluded from import or not
Defines whether existing records will be updated or not
Defines whether missing attributes will be created automatically
Details about the uploaded file that was used for import
The file identifier
The file name
Details about the file that contain all failed imported data
The file identifier
The file name
Details about the processed data
The records that were created successfully
The records that were updated successfully
The records that were not changed
The records that were failed to be processed
The total number of records that were imported
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v2/imports HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "507c17d2-3976-d1e5-ccf5-cf3c1334acc7",
"status": "FAILED",
"type": "DEVICES",
"imported_on": 1623677135,
"options": {
"exclude_header": true,
"update_data": true,
"auto_generate_config": "false"
},
"file": {
"id": "507c17d2-3976-d1e5-ccf5-cf3c1334acc7",
"name": "contacts.csv"
},
"error_file": {
"id": "507c17d2-3976-d1e5-ccf5-cf3c1334acc7",
"name": "contacts_errors.csv"
},
"processed_results": {
"new": 19,
"updated": 4,
"unchanged": 4,
"errors": 1,
"total": 28
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/actionsPerform actions on existing import definition (e.g. re-submit a failed import)
Path variables
The import definition (identifier) on which an action will be performed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The type of action that will be performed
Re-submit an import with FAILED state
Responses
The request has succeeded
Body
The import definition identifier
PUT https://sandbox.crm.com/backoffice/v2/imports/0e2e1e37-b118-7bbc-db46-6cd954e01a89/actions HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"action": "REPLAY"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "0e2e1e37-b118-7bbc-db46-6cd954e01a89"
}Business Network is a group of participating entities, collaborating to accomplish a business operation and provide a service to the end customer. The Business Network is configured as a hierarchical structure with varying levels of ownership, privileges and permissions depending on the level of hierarchy.
{id}{id}{id}/network{id}{id}/activity_feed{id}/switch{id}/masquerade{id}/actions{id}/statement{id}/statement_details{id}/export_statementCreates a business semantic parent as the primary business.
Request headers
The public api key required for API calls to identify the organisation
Request body
The organisation name
The organisation type
The parent organisation (identifier) that the newly registered organisation belongs to (applicable only when type is merchant)
Information about the owner (admin user) of the organisation
The user’s first name
The user’s last name
The user’s email address
The phone country code (based on ISO 3 char code)
The phone number
The user’s identity
The provider of the identity
The identity challenge
The identity value (e.g. password) - applicable only for EMAIL based identities
The organisation’s base currency (applicable only for business)
The organisation timezone (applicable only for business)
The custom field’s unique key
The custom field’s value
Responses
The request has succeeded
Body
The organisation identifier
POST https://sandbox.crm.com/backoffice/v2/organisations/register HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"name": "Delicious Food Group",
"type": "MERCHANT",
"organisation_id": "4bd55b60-2c2a-d588-7a94-0890ced7e0ba",
"owner": {
"first_name": "John",
"last_name": "Doe",
"email_address": "john@crm.com",
"identity": {
"type": "PHONE",
"challenge": "jd@crm.com",
"value": "Crm.comPassword1234"
}
},
"currency_code": "EUR",
"timezone": "EUROPE/ATHENS",
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "ae5cf529-83e5-8b6b-06f0-54dee9d38b20"
}
Create a new organisation, expanding the current business network
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The organisation name
The type of the organisation
The organisation description
The organisation’s country of agreement code (applicable only for service owner/business)
The group that such organisation will belong to (only Merchant/Service Provider and Venue/Service Point can be grouped)
The organisation’s contact (email/phone) details
Information about the owner (admin user) of the organisation
The name of the contact information
The type of the organisation’s contact detail
The contact information value
The country code of the related contact detail of type phone
The organisation address(es)
Information about the organisation’s location
The name of the location
The address of the location
Additional address information about the location
The state/province/county of the location
The town/city of the location
The postal code of the location
The country code of the location
The care of information of the location
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
The parent organisation (identifier) that this organisation belongs to
The name that the organisation will have on the cloud (applicable for Service Owner organisations; special characters not allowed)
Defines whether organisation will support contact registry or not (applicable for Service Owner and Business)
The organisations (service owners) that the organisation (transaction processor) serves (applicable only for Transaction Processors)
Defines whether the new organisation will have the same industry, industry sectors and business activities as its parent organisation (applicable only for Venues)
The organisation industry
The organisation industry sectors
The organisation business activities
Details about provisioning an organisation over to WiFi
The integration identifier that organisation will be provisioned for WiFi
The site identifier that will be used to identify the organisation over to WiFi platform
The custom field’s unique key
The custom field’s value
Information about the owner (admin user) of the organisation
The user’s first name
The user’s last name
The user’s email address
The phone country code (based on ISO 3 char code)
The phone number
The user’s identity
The provider of the identity
The identity challenge
The identity value (e.g. password) - applicable only for EMAIL based identities
Responses
The request has succeeded
Body
The organisation identifier
POST https://sandbox.crm.com/backoffice/v2/organisations HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"name": "Delicious Food Group",
"type": "SERVICE_OWNER",
"description": "Lorem Ipsum",
"country_agreement": "CYP",
"groups": [
"7d699221-b38a-6484-f739-b7670c1973c6"
],
"contact_info": [
{
"name": "Main Office",
"type": "EMAIL",
"value": "johndoe@deliciousfood.com",
"country_code": "CYP"
}
],
"addresses": [
{
"name": "Head Office",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"care_of": "c/o Company",
"lat": 35.157115,
"lon": 33.313719,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
],
"organisation_id": "e7251be4-89f2-8cea-7a4a-65b679cf6131",
"cloud_name": "crmdotcom",
"contact_registry": "true",
"service_organisations": [
"7c56cc02-48cf-9832-e412-a4ae022cd547"
],
"inherit_from_parent": "false",
"industry_id": "b7fae8bd-018a-796f-e509-34c39e478a3f",
"industry_sectors": [
"d22cf1fb-5b47-1da9-7be7-c6a70a4f0ed3"
],
"business_activities": [
"331d2da8-4a41-2b58-f58d-936296c13aaf"
],
"wifi_platform": {
"integration_id": "88165da9-58a9-74cd-3da5-593b901fc0ec",
"site_id": "88quh2m6"
},
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "bd92a0b2-1a8d-026b-e01e-41212b105f0f"
}
{id}Update a single organisation
Path variables
The organisation (identifier) that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The organisation name
The organisation description
The organisation’s contact (email/phone) details
Information about the owner (admin user) of the organisation
The organisation’s contact information identifier
The organisation’s contact information name
The type of the organisation’s contact detail
The organisation’s contact information value
The organisation’s contact information country code (applicable for phones)
The organisation industry
The organisation industry sectors
The organisation business activities
The organisation groups (applicable only for Merchant/Service Provider and Venue/Service Point)
Defines whether the new organisation will have the same industry, industry sectors, business activities and reward tags as its parent organisation (applicable only for Venue/Service Point)
The organisation profile infromation (applicable only for Business)
The organisation’s registration number
The organisation’s TAX reference number
The organisation’s VAT reference number
The company’s registrationc country code
The name (special characters not allowed) that the organisation will have on the cloud (applicable for Service Owner)
The organisations (service owners) that the organisation (transaction processor) serves (applicable only for Transaction Processors)
1daf80b1-134b-36eb-7146-76dec04e6c5d
Defines whether organisation supports contact registry or not (applicable for Service Owner and Business)
Information about the organisation’s location
The location identifier that will be updated
The name of the location
The address of the location
Additional address information about the location
The state/province/county of the location
The town/city of the location
The postal code of the location
The country code of the location
The care of information of the location
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
The custom field’s unique key
The custom field’s value
Defines the partners (their logos will appear on the backend) assigned on this organisation by the service owner. (applicable only for Business)
The partner identifier
The organisation subscription details
The (business) organisation (identifier) that the organisation will be charged from
The default service (identifier) that the organisation subscribed to
Responses
The request has succeeded
Body
The organisation identifier
PUT https://sandbox.crm.com/backoffice/v1/organisations/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Content-Type: application/json
{
"name": "Delicious Food Group",
"description": "Lorem Ipsum",
"contact_info": [
{
"id": "CK1234567890123456789012345678",
"type": "PHONE",
"value": "info@crm.com",
"name": "Head Office"
}
],
"industry_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"industry_sectors": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"business_activities": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"groups": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"inherit_from_parent": "false",
"organisation_profile": {
"registration_number": "1234",
"tax_reference_number": "TAX1234",
"vat_reference_number": "VAT1234",
"registration_country": "CYP"
},
"cloud_name": "crmdotcom",
"organisation_tags": [
"Accounting"
],
"service_organisations": [
"1daf80b1-134b-36eb-7146-76dec04e6c5d"
],
"contact_registry": "true",
"locations": {
"id": "a6cc4f88-cab1-4ab2-98d3-4655789277e2",
"name": "Head Office",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"care_of": "",
"lat": 35.157115,
"lon": 33.313719,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
},
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
],
"partners": [
{
"id": "43f394c0-ece1-43a5-ab7d-b54ce9065fe7"
}
]
}
{id}Delete an organisation
Path variables
The organisation (identifier) that will be deleted
Notes
Only Business organisations can be deleted and as a result of such action the entire network (e.g. merchants and venues) of such business is deleted as well
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
DELETE https://sandbox.crm.com/backoffice/v2/organisations/bf2fd7b1-5454-a38e-23ad-88498dc4fb25 HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 204 No Content {id}/networkRetrieve a list of organisations based on search criteria (e.g. all merchants under business)
Path variables
Parent organisation (identifier) whose child organisations will be retrieved
Request parameters
Filter based on the organisation’s name (behaves as like)
Filter based on the organisation’s relationship
Defines the free text search parameter based on the provided type (e.g. name)
Defines the entitiy type that the search will be applied
Filter based on the organisation group(s)
Filter based on the organisation industry(ies)
Filter based on the organisation industry sector(s)
Filter based on the organisation business activity(ies)
Filter based on (organisation) tags
Filter based on the organisation (address) area(s)
Filter based on the organisation (address) country(ies)
Filter based on the organisation (address) town(s)/city(ies)
Defines whether child organisations total number should be returned
Defines whether organisations creatives should be returned
Defines whether the organisation group should be returned as part of the response
Defines whether the operation details of such organisations should be retrieved or not
Defines whether custom fields should be retrieved or not (via List/Get APIs)
Filters based on custom fields (key/value set should be semicolon separated)
Filter based on organisation state
Filter based on TAP code
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The organisation identifier
The organisatio name
The organisation description
Information about the child organisations
The type of the organisation
The total number of child organisations
The organisation groups
The organisation group identifier
The organisation group name
The organisation addresses
Information about the organisation’s location
The location identifier
The name of the location
The address of the location
Additional address information about the location
The state/province/county of the location
The town/city of the location
The postal code of the location
The country code of the location
The care of information of the location
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
The creative identifier
Information about the creative type
Partner logos configurable by SO, applicable for Business, Merchant, Venue
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information about the organisation’s industry
The industry identifier
The industry name
The organisation industry sectors
Information about the industry sectors
The industry sector identifier
The industry sector name
The organisation business activities
Information about the business activity
The business activity identifier
The business activity name
The organisation operation details
Details about the organisation’s working hours
The day of the week that the organisation is open
The time that the organisation opens
The time that the organisation closes
The opening hours for each organisation’s operation type
Details about the organisation’s availability to offer its services
The organisation’s operation type
Defines whether the organisation is temporary closed for offering its services
Defines whether organisation supports contact registry
The custom field’s unique key
The custom field’s value
The status of the organisation
The date that such organisation was created
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v2/organisations/d332dd8a-254e-47c9-ba1f-3f369877a9b3/network HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "8265f357-9399-2536-8bb1-4a8343d7d554",
"name": "CRM.COM Cyprus",
"description": "Lorem Ipsum",
"child_organisations": [
{
"type": "BUSINESS",
"count": 21
}
],
"groups": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Seasonal"
}
],
"addresses": [
{
"id": "LOC123456234567345674567895678IK",
"name": "Head Office",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"care_of": "c/o Company",
"lat": 35.157115,
"lon": 33.313719,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
],
"creatives": [
{
"id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
"usage_type": "LANDING_PAGE_IMAGE",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/logo.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
}
]
}
],
"industry": {
"id": "59106518-092e-8a08-7769-29f40dced0d1",
"name": "Restaurant"
},
"industry_sectors": [
{
"id": "9a857635-5ef3-aa4c-bd2c-90434070cb5a",
"name": "Bar"
}
],
"business_activities": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Bar & Grill"
}
],
"operation_details": {
"opening_hours": [
{
"day_of_week": "MONDAY",
"opens": "09:00",
"closes": "20:00",
"operation": "DELIVERY"
}
],
"short_term_operations": [
{
"operation": "DELIVERY",
"is_closed": "false"
}
]
},
"contact_registry": "true",
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
],
"state": "INACTIVE",
"created_date": 1663841080
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Retrieve detailed information for an organisation
Path variables
The organisation (identifier) that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The organisation identifier
The organisation name
The organisation description
The type of the organisation
The organisation groups
The organisation group identifier
The organisation group name
The organisation contact (email/phone) details
Information about the owner (admin user) of the organisation
The contact detail identifier
The name of the contact information
The type of the contact information
The value of the specific contact information
The country code related to the contact detail of type phone
The organisation addresses
Information about the organisation’s location
The location identifier
The name of the location
The address of the location
Additional address information about the location
The state/province/county of the location
The town/city of the location
The postal code of the location
The country code of the location
The care of information of the location
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
Information about the organisation’s industry
The industry identifier
The industry name
The organisation industry sectors
Information about the industry sectors
The industry sector identifier
The industry sector name
The organisation business activities
Information about the business activity
The business activity identifier
The business activity name
Defines whether the organisation has the same industry, industry sectors and business activities as its parent organisation
The parent organisation identifier that this organisation belongs to
The name that the organisation will have on the cloud (applicable for Service Owner organisations; special characters not allowed)
The organisations (service owners) that the organisation (transaction processor) serves
Details about the organisation from where such event was posted
The organisation identifier
The organisation name
The creative identifier
Information about the creative type
Partner logos configurable by SO, applicable for Business, Merchant, Venue
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
Applicable only for Applications
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Defines whether the organisation supports contact registry
The custom field’s unique key
The custom field’s value
The status of the organisation
Defines the partners that are assigned to this organisation and their logos will be shown on the back-end SPA. Applicable only for organisations of type Business, where Service Owners will be responsible for assigning such information
The partner identifier
The partner name
The date that such entity was created
The organisation subscription details
The billing (businesS) organisation
The organisation identifier
The organisation name
The default service assigned to the organisation
The product identifier
The product name
The product SKU
The organisation profile infromation (applicable only for Business)
The organisation’s registration number
The organisation’s TAX reference number
The organisation’s VAT reference number
The company’s registrationc country code
The organisation’s MRR metrics
The organisation’s total MRR
GET https://sandbox.crm.com/backoffice/v2/organisations/9866964d-6892-6700-5f39-09492c9e714e HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "9866964d-6892-6700-5f39-09492c9e714e",
"name": "Delicious Bite",
"description": "Lorem Ipsum",
"type": "BUSINESS",
"groups": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Seasonal"
}
],
"contact_info": [
{
"id": "CON123456234567345674567895678IK",
"name": "Main Office",
"type": "PHONE",
"value": "johndoe@deliciousfood.com",
"country_code": "CYP"
}
],
"addresses": [
{
"id": "LOC123456234567345674567895678IK",
"name": "Head Office",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"care_of": "c/o Company",
"lat": 35.157115,
"lon": 33.313719,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
],
"industry": {
"id": "59106518-092e-8a08-7769-29f40dced0d1",
"name": "Restaurant"
},
"industry_sectors": [
{
"id": "9a857635-5ef3-aa4c-bd2c-90434070cb5a",
"name": "Bar"
}
],
"business_activities": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Bar & Grill"
}
],
"inherit_from_parent": "false",
"organisation_id": "7e8e39de-2f80-d2fe-b1f9-25b0cf4b2fbf",
"cloud_name": "crmdotcom",
"service_organisations": [
{
"id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
"name": "Bravo Coffee"
}
],
"creatives": [
{
"id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
"usage_type": "HERO",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/logo.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
}
]
}
],
"contact_registry": "true",
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
],
"state": "INACTIVE",
"partners": [
{
"id": "f4942b1d-efe2-258e-ebc2-6be805ce8b7c",
"name": "Best Partner"
}
],
"created_date": 1,
"subscription": {
"organisation": {
"id": "8f2b27a5-b7c4-5b73-564c-4c5b4530ba96",
"name": "CRM"
},
"service": {
"id": "26684853-42d4-44d2-601a-48a6e6990ef8",
"name": "Enterprise",
"sku": "ES00323"
}
},
"organisation_profile": {
"registration_number": "1234",
"tax_reference_number": "TAX1234",
"vat_reference_number": "VAT1234",
"registration_country": "CYP"
}
}
{id}/activity_feedGet the activity feed of a single organisation
Path variables
The organisation (identifier) whose activity will be retrieved
Request parameters
Filter based on activity type
Filter based on the performed date, which may fall within a given date range. The value can be a string with a date in epoch format. Each option must also include an operator. Use up to two options based on the required search (e.g. performed_on[gte]=1618395497&performed_on[lt]=1618395497).
Returns results where the performed date is greater than this value
Returns results where the performed date is greater than or equal to this value
Returns results where the performed date is less than this value
Returns results where the performed date is less then or equal to this value
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The activity (feed) identifier
The entity’s type name
The entity’s number
The entity’s reference number
The entity’s code
The entity’s state
The entity’s created date
The entity’s due date in case of Invoices
The activity (feed) direction
The activity (feed) notes
The entity’s total amount
The currency (code) of such amount
The associated topup
The top up identifier
The top up number
The top up entity type
The associated order
The order queue
The order queue identifier
The order queue name
The order stage
The order stage identifier
The order stage name
The entity’s subject
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v2/organisations/33c11c8a-60a9-159a-c25c-ada7a9e2edbd/activity_feed HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "cb6ad302-e27c-5a1a-3092-396b2fd40682",
"type": "INVOICE",
"number": "I10003",
"reference_number": "Ref12345678",
"code": "123456789ABE2364",
"state": "POSTED",
"created_date": 1576486645,
"due_date": 1576486645,
"direction": "OUTGOING",
"notes": "This Invoice is created for November 2019",
"total_amount": 200,
"currency_code": "EUR",
"top_up": {
"id": "018482c9-3af3-2076-5285-c51092ff30b9",
"number": "AC00123 John Johnson",
"type": "ACCOUNT"
},
"order": {
"queue": {
"id": "359652c2-8152-ea3e-0c52-a13adfff1566",
"name": "Up-Front Orders"
},
"stage": {
"id": "ad4c71f9-9964-f445-3104-e5f0a3526c4a",
"name": "In Progress"
}
},
"subject": "Invoice Sent"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/switchSwitch the user to another organisation
Path variables
The organisation (identifier) that will be switched to
Notes
As part of “changing organisations that a user belongs to” flow, the user will have a different role as assigned when such user was invited to the organisation that switched to
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
Authentication information provided for an admin user
The token that can be used in subsequent API calls
The token that can be used to generate a new access token (when previous is expired)
The token expiration date
The authenticated user details
{
"first_name": "John",
"last_name": "Doe",
"email": "johndoe@crm.com"
}The first name
The last name
The email address
The organisation mode
Organisation was not live enabled
Organisation is in test mode (therefore User is signed in test mode)
Organisation supports live mode (therefore User is signed in live mode)
The organisations that the user is a member at
The organisation identifier
The type of the organisation
The organisation name
The organisation status
The organisation progress status
Defines whether a user (other than the owner) is invited
Defines whether a contact is created (applicable only for business)
Defines whether a reward scheme is created (applicable only for business)
Defines whether a reward offer is created
Defines whether a merchant is created (applicable only for business)
Defines whether a venue is created
Defines whether password has been expired or not
Defines the date on which the user’s lockout will be expired
Defines whether two factor authentication is required or not (true only for authentication API, false to all others)
The two-factor method that is used and all user’s (configured) two-factor methods
The method that is used for the two-factor authentication
Defines the type of the user 2FA method
The two-factor method obfuscated value (applicable only for email and phone based two-factor methods)
The user’s (configured) two-factor methods
The user’s (configured) two-factor methods
Defines the type of the user 2FA method
The two-factor method obfuscated value (applicable only for email and phone based two-factor methods)
Defines the number of days that are left until password is expired
POST https://sandbox.crm.com/backoffice/v2/organisations/9f70eae6-8465-8add-8702-6871a36a85de/switch HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhY2U5ZDRkMi0wYjhkLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJ0eXBlIjoiYWNjZXNzIiwicHJpbWFyeU9yZ2FuaXNhdGlvbiI6IjhkY2MzNjgwLTBiOGEtMTFlYS05NTE4LTQyMDEwYTlhMDAwMyIsImN1cnJlbnRPcmdhbmlzYXRpb24iOiI4ZGNjMzY4MC0wYjhhLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJzY29wZSI6WyJjdXN0b21lci13cml0ZSIsIm9yZGVyLXJlYWQiXSwicHJlZmVycmVkX3VzZXJuYW1lIjoiamQiLCJlbWFpbCI6ImpkQGNybS5jb20iLCJleHAiOjE1Nzk4ODA2Mjl9.-uJyEW-Y_QgHb1q-WHBBMew3J_TnUfvqy-NDFmIzFhbS3gkerE5QAqp4cgNMr5BiGcyt174UVhYGXp2Fg7BKcw",
"refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhY2U5ZDRkMi0wYjhkLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJ0eXBlIjoicmVmcmVzaCIsInByaW1hcnlPcmdhbmlzYXRpb24iOiI4ZGNjMzY4MC0wYjhhLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJjdXJyZW50T3JnYW5pc2F0aW9uIjoiOGRjYzM2ODAtMGI4YS0xMWVhLTk1MTgtNDIwMTBhOWEwMDAzIiwic2NvcGUiOlsiY3VzdG9tZXItd3JpdGUiLCJvcmRlci1yZWFkIl0sInByZWZlcnJlZF91c2VybmFtZSI6ImpkIiwiZW1haWwiOiJqZEBjcm0uY29tIiwiZXhwIjoxNTc5ODgwNjI5fQ.cW_g6ozy2OaP5Tx3l2QuzNeRBSXnNrP1AN6QoOqf6s95eVoUrld6bHRUdBt3H74CZyrxhp7Rs_uXtv17GhVz5w",
"expiration_date": 1579880629,
"user": {
"first_name": "John",
"last_name": "Doe",
"email": "johndoe@crm.com"
},
"mode": "TRIAL",
"organisations": [
{
"id": "b907f6f0-5f3c-9b67-bcf1-9ee13d747294",
"type": "TRANSACTION_PROCESSOR",
"name": "CRM.COM"
}
],
"progress": {
"invite_user": "true",
"create_contact": "false",
"create_scheme": "true",
"create_offer": "false",
"create_merchant": "false",
"create_venue": "false"
},
"password_expired": true,
"lockout_date": 1615897181,
"two_factor_required": true,
"two_factor_methods": {
"send_method": {
"method": "TOTP",
"value": "jo****@crm.com"
},
"options": [
{
"method": "EMAIL",
"value": "jo****@crm.com"
}
]
}
}
{id}/masqueradeSwitch the user to another organisation
Path variables
The organisation (identifier) that will be masqueraded to
Notes
As part of “masquerade” flow, the masqueraded user will have the same role as the one from the initial organisation that such user signed in.
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
Authentication information provided for an admin user
The authenticated user details
The first name
The last name
The two-factor method that is used and all user’s (configured) two-factor methods
The method that is used for the two-factor authentication
Defines the type of the user 2FA method
The two-factor method obfuscated value (applicable only for email and phone based two-factor methods)
The user’s (configured) two-factor methods
The user’s (configured) two-factor methods
Defines the type of the user 2FA method
The two-factor method obfuscated value (applicable only for email and phone based two-factor methods)
POST https://sandbox.crm.com/backoffice/v2/organisations/CAD1E31269B76D7A65ACCE45B2E68DFD/masquerade HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"user": {
"first_name": "John",
"last_name": "Doe"
},
"two_factor_methods": {
"send_method": {
"method": "EMAIL",
"value": "jo****@crm.com"
},
"options": [
{
"method": "PHONE",
"value": "jo****@crm.com"
}
]
}
}
{id}/actionsPerform an action on an existing organisation
Path variables
The organisation (identifier) that an action will be applied on it
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The action that will be applied on the organisation
Switch between test/live mode (if not already live, first time switch will set such organisation as live)
Copy a business and its business network (applicable only for Business)
Set the organisation state to active
Set the organisation state to inactive
Set the organisation state to suspend
The organisation name that will be set on the copied (new) organisation (applicable only on COPY action)
Responses
The request has succeeded
Body
The organisation identifier
POST https://sandbox.crm.com/backoffice/v2/organisations/2513ff06-b55c-724f-048f-fb6bb16f5fb2/actions HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"action": "COPY",
"name": "CRM"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "4872e81e-4866-2eb2-bbd3-8a5a8c276290"
}{id}/statementRetrieves all financial events of a Merchant or Service Provider based on an account and the selected period for the signed-in organisation. Used in conjunction with Get Account Statement Details to produce the Merchant or Service Provider complete statement.
Path variables
The organisation identifier to retrieve account balances for
Request parameters
Merchant or Service Provider’s account id to retrieve balance information for. If not specified, then use the primary account
Specify the account currency for which the statement will be produced. Default is the primary account’s currency
Starting statement period month
Ending statement period month
Starting statement period year
Ending statement period year
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
Account unique identifier
Account number
Statement period
Statement period months
Starting month
Ending month
Statement period year
Starting year
Ending year
Opening balance for account
Closing balance for account
Total credited amount for the selected period
Total debited amount for the selected period
The Account’s Ageing Analysis. The ageing balance is based on the selected Account but it
The total aged balance of the account
Aged balanc eof th eaccount, separated in 5 buckets, each one having a 30 days duration.
Aged balance over 121 days
Balance aged by up to 30 days
Aged balanc eby 31 to 60 days
Aged balanc eby 61 to 90 days
Aged balanc eby 91 to 120 days
GET https://sandbox.crm.com/backoffice/v2/organisations/76D7A65ACCE45B2E68DFDCAD1E31269B/statement HTTP/1.1 {id}/statement_detailsRetrieves all the statement detail lines for a single Merchant or Service Provider, for the given period, used in conjunction with Get Accounts Statement API to create a Merchant or Service Provider statement
Path variables
The organisation identifier for which to retrieve account journals for
Request parameters
Merchant or Service Provider’s account id to retrieve balance information for
Specify the 3-char account currency for which the statement will be produced
Starting statement period month
Ending statement period month
Starting statement period year
Ending statement period year
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
Statement detail lines
Account unique idetifier
Transaction date
Type of financial transaction
Transaction amount
Financial activity information
The reference number of the transaction if available (e.g. reference number of a payment or a transfer)
The activity entity unique id number (e.g. id of an invoice)
Transaction details
Running balance of account right after the financial event was performed.
GET https://sandbox.crm.com/backoffice/v2/organisations/76D7A65ACCE45B2E68DFDCAD1E31269B/statement_details HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "d2ea1d75-0805-4d8c-b212-f31064ee3bff",
"date": "2343342445",
"type": "CREDIT",
"amount": 3.59,
"currency_code": "EUR",
"activity": {
"type": "PASS_REDEMPTON",
"number": "90508992",
"id": "61c943c8-dfeb-4c09-a25c-b054f48bf244"
},
"details": "Sally's Flower Shop",
"running_balance": 14.99
}
]
}
{id}/export_statementUse this API to export the Merchant or Service Provider statement in PDF or CSV format to the user’s email, or send to the contact’s email address
Path variables
The organisation’s id to export statement for
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Request body
The identifier of the account for which the export will be performed
Statement period starting month
Statement period starting year
Statement period ending month
Statement period ending year
How the statement will be sent
Sent to user’s email
Sent to user’s email
Sent to the Contact’s email address
Responses
POST https://sandbox.crm.com/backoffice/v2/contacts/da60dd8f-b124-439d-a7fe-e1bdbd484c71/export_statement HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"account_id": "da60dd8f-b124-439d-a7fe-e1bdbd484c71",
"currency_code": "EUR",
"from_month": 3,
"from_year": 2022,
"to_month": 3,
"to_year": 2022,
"format": "PDF"
}{id}/billing{id}/billingRetrieves a relationship between an organisation as the billing business and a contact
Path variables
The organisation (identifier) that billing relationship will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The organisation that performs the billing
The organisation identifier
The organisation name
The billing organisation’s public API key
The billing contact (contact information and authentication details) that will be billed due to its billing relation to the billing organisation
The jwt token associated to the contact of the billing organisation that can be used for subsequent API requests
The refresh token that can be used to issue a new access token, after the previous one is expired
The access token expiration date
The billing contact details
The contact identifier
The contact (full) name
GET https://sandbox.crm.com/backoffice/v2/organisations/db560dec-4097-655e-25b3-d0fe95698bd0/billing HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"organisation": {
"id": "db560dec-4097-655e-25b3-d0fe95698bd0",
"name": "CRM billing",
"api_key": "5bd2fd1d-3f49-3f51-fddc-76bb419880c7"
},
"contact": {
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"expiration_date": 11664276644,
"contact": {
"id": "4f87056c-9fba-2902-779f-f47e4c833a4f",
"name": "CRM.COM Media Group Ltd"
}
}
}
Set of operations that allow setting up and managing an Organisation’s Account. Businesses, Merchants/Service Providers can have an Account as Contacts do. Merchants/Service Providers can place Orders and the Business is delivering the rdered items to them.
{id}/accounts{id}/accounts{id}/accounts/{account_id}/actions{id}/accountsCreate an account for a specific organisation. An account can only be created for a Business or a Merchant/Service Provider. Once created, the account will be set in Active state. Only one account per supported currency can be created per organisation.
Path variables
The organisation (identifier) that an account will be created
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The account name (if not specified, defaults to account name rules)
The account classification (identifier)
The billing address (identifier)
Defines whether the account is the primary one (if it’s the first one, defaults to primary)
Responses
The request has succeeded
Body
The organisation account identifier
POST https://sandbox.crm.com/backoffice/v2/organisations/c6e6bcc8-ef76-45a9-a7c1-b45efaa6fdb4/accounts HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"name": "Good Burgers Main Account",
"currency_code": "EUR",
"classification_id": "bacffd55-e3d8-ded4-30dc-99375312302e",
"billing_address_id": "bf91070e-1f23-a8ec-31b5-be1e62638180"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "c6e6bcc8-ef76-45a9-a7c1-b45efaa6fdb4"
}
{id}/accountsGet a list of accounts for a specific organisation. Normally an organisation will have a single account, but multiple accounts can be used to service different currencies. All accounts of the organisation are retrieved by default, regardless of their state
Path variables
The organisation (identifier) which accounts wil be retrieved
Request parameters
Retrieve only the primary account of the organisation
Filter account based on state(s)
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The account identifier
Defines whether the account is the primary one
The account name
The account number
The account state
The account classification
The classification identifier
The classification name
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v2/organisations/c6e6bcc8-ef76-45a9-a7c1-b45efaa6fdb4/accounts HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"is_primary": true,
"name": "Default",
"number": "AC123456",
"state": "ACTIVE",
"currency_code": "EUR",
"classification": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"name": "VIP"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/accounts/{account_id}/actionsPerform actions on an existing organisation account (e.g. suspend account)
Path variables
The organisation (identifier) on which the account will be updated
The account (identifier) on which the action is performed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Contact is able to perform transactions
Contact blocked from ordering/purchases but still allowed to make Payments
Contact can no longer perform any kind of transactions using this account(financial, ordering, rewards etc)
Responses
Successful Request
Body
The organisation account identifier
PUT https://sandbox.crm.com/backoffice/v2/organisations/1eaa809f-ed91-4b68-b912-5bd6064d3400/accounts/18e0e170-a19c-4448-a9c6-b5737ad238e8/actions HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"state": "ACTIVE"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "18e0e170-a19c-4448-a9c6-b5737ad238e8"
}{id}/media_groups{id}/media_groupsLink an organisation with one or many media groups
Path variables
The organisation (identifier) that media groups will be set
Notes
Uploading media for an organisation requires the execution of the following APIs
- Create new Media Group
- Create Organisation Media Groups
- Upload Media
- Perform Cloudinary Upload (where CRM will send all signature details)
- Cloudinary service calls back CRM media group (using an internal callback)
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The media group identifier
Responses
The request has succeeded
POST https://sandbox.crm.com/backoffice/v2/organisations/sdfsfsdf-32-fwef-wef-wefwef23/media_groups HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
[
{
"media_group_id": "3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb"
}
]
HTTP/1.1 204 No Content {id}/operation_details{id}/operation_details{id}/operation_detailsUpdate an organisation’s operational details (e.g. opening hours)
Path variables
The organisation (identifier) of which operation details will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Details about the organisation’s working hours
The day of the week that the organisation is open
The time that the organisation opens
The time that the organisation closes
The opening hours for each organisation’s operation type
Details about the organisation’s availability to offer its services
The organisation’s operation
Defines whether the organisation is temporary closed for offering its services
Responses
The request has succeeded
Body
The organisation identifier
PUT https://sandbox.crm.com/backoffice/v2/organisations/711f82b5-0728-bee7-5f8b-a2d1fcb1cd7c/operation_details HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"opening_hours": [
{
"day_of_week": "SUNDAY",
"open": "09:00",
"close": "20:00",
"operation": "PICK_UP"
}
],
"short_term_operations": [
{
"operation": "PICK_UP",
"is_closed": "false"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "711f82b5-0728-bee7-5f8b-a2d1fcb1cd7c"
}
{id}/operation_detailsRetrieve an organisation’s operational details (e.g. opening hours)
Path variables
The organisation (identifier) whose operation details will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
Details about the organisation’s working hours
The day of the week that the organisation is open
The time that the organisation opens
The time that the organisation closes
The opening hours for each organisation’s operation type
Details about the organisation’s availability to offer its services
The organisation’s operation type
Defines whether the organisation is temporary closed for offering its services
GET https://sandbox.crm.com/backoffice/v2/organisations/CAD1E31269B76D7A65ACCE45B2E68DFD/operation_details HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 200 OK
Content-Type: application/json
{
"opening_hours": [
{
"day_of_week": "MONDAY",
"open": "09:00",
"close": "20:00",
"operation": "DELIVERY"
}
],
"short_term_operations": [
{
"operation": "DELIVERY",
"is_closed": "false"
}
]
}
{id}/addresses{id}/addresses/{address_id}{id}/addresses/{address_id}{id}/addresses{id}/addressesAdd a new location for an existing Organisation
Path variables
The organisation (identifier) whose locations will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The name of the address
The address line 1 of the address
The address line 2 of the address
The state/province/county of the address
The town/city of the address
The postal code of the address
The country of the address
The care of information of the address
The latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies a address
Responses
The request has succeeded
Body
The organisation’s address identifier
POST https://sandbox.crm.com/backoffice/v2/organisations/53420b7f-b114-690b-0513-bc15a8904d34/addresses HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"name": "Head Office",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"care_of": "",
"lat": 33.313719,
"lon": 33.313719,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "ff8f8be9-db79-cd8f-1bae-4a81c007f856"
}
{id}/addresses/{address_id}Update an existing address for an organisation
Path variables
The organisation (identifier) of which address will be updated
The organisation’s address (identifier) that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The name of the address
The address line 1 of the address
The address line 2 of the address
The state/province/county of the address
The town/city of the address
The postal code of the address
The country of the address
The care of information of the address
The latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies a address
Responses
The request has succeeded
Body
The organisation’s address identifier
PUT https://sandbox.crm.com/backoffice/v2/organisations/53a399c8-58ed-77bd-ca8f-265072b028d7/addresses/a044a3f9-7e3c-4229-6ec5-0fbac9b27fda HTTP/1.1
Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
{
"name": "Head Office",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"care_of": "",
"lat": 35.157115,
"lon": 33.313719,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "a044a3f9-7e3c-4229-6ec5-0fbac9b27fda"
}
{id}/addresses/{address_id}Delete an address from an organisation
Path variables
The organisation (identifier) whose address will be removed
The organisation’s address (identifier) that will be deleted
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
DELETE https://sandbox.crm.com/backoffice/v2/organisations/9ef933f3-976f-32f7-6746-12faf9e41964/addresses/a6f6506f-a3b7-da53-f34d-33fc749e5a9f HTTP/1.1
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e
HTTP/1.1 204 No Content {id}/addressesRetrieves all addresses associated with a single organisation
Path variables
The organisation (identifier) which addresses will be retrieved
Request parameters
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
Information about the organisation’s location
The location identifier
The name of the location
The address of the location
Additional address information about the location
The state/province/county of the location
The town/city of the location
The postal code of the location
The country code of the location
The care of information of the location
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v2/organisations/83e1563f-cb0c-08cc-535e-10f8e8619e63/addresses HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "LOC123456234567345674567895678IK",
"name": "Head Office",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"care_of": "c/o Company",
"lat": 35.157115,
"lon": 33.313719,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/payment_methods{id}/payment_methods/{payment_method_id}{id}/payment_methods/{payment_method_id}{id}/payment_methods{id}/payment_methodsAdd a new payment method for an organisation
Path variables
The organisation (identifier) that a payment method will be created
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The name of the payment method
The payment method’s type
Marks the payment method as the organisation’s primary one
Marks the payment method as the backup
Notes related to te payment method
The account’s main information. Required and applicable if the payment method type is ACCOUNT
The account name
Information regarding the account’s payment gateway
The payment gateway related to the payment method
The identifier used on payment gateway
The bank details.Required and applicable if the payment method is set to BANK
The bank account number.
The IBAN code.
The name of the customer’s bank
Institution number of the customer’s bank.
The identifier of the bank branch
The bank account swift number
The sort code
The mandate (sequence) type
The type of the event
The payment gateway’s integration identifier
The country the bank account is located in.
The card’s main information. Required and applicable if the payment method type is CARD
The card’s name
The card’s brand
The card’s first 6 digits
The card’s lat 4 digits
The card’s expiration month
The card’s expiration year
The card’s coutry of issue (3 code based)
Details about the cardholder owner
The name of the card holder
The address related to the card
Additional address information related to the card
The city related to the card
The zip code related to the card
The state related to the card
The country related to the card
Details about the gateway that a card related token was issued
Defines the gateway that issued such token
The gateway integration (identifier)
The card related token
Responses
The request has succeeded
Body
The payment method identifier
POST https://sandbox.crm.com/backoffice/v1/organisations/4db61210-49b0-0267-6de6-82ca63a35903/payment_methods HTTP/1.1
Content-Type: application/json
{
"name": "Primary payment method",
"type": "SETTLEMENT_ACCOUNT",
"is_primary": "true",
"is_backup": "false",
"notes": "some notes",
"settlement_account": {
"name": "Primary Account",
"payment_gateway": {
"gateway": "JCC_MERCHANT",
"gateway_identifier": "0000257"
}
},
"account_debit": {
"account_name": "",
"account_number": "001002001",
"iban": "0143240434320434",
"bank": "Barclays",
"bank_code": "0032933-1123",
"branch": "Ascot",
"swift": "12345678",
"sort_code": "20-02-53",
"mandate": {
"reference": "",
"sign_date": 1
},
"account_type": "SAVINGS",
"integration_id": ""
},
"card": {
"name": "Default Card",
"brand": "VISA",
"first6": "424242",
"last4": "4242",
"expiration_month": 1,
"expiration_year": 2020,
"country_of_issue": "CYP",
"card_holder_details": {
"card_holder_name": "John Doe",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "7 Tower Star",
"address_city": "Nicosia",
"address_zip": "2415",
"address_state": "Nicosia",
"address_country": "CYP"
},
"gateway_token": [
{
"gateway": "SETTLE",
"integration_id": "bce504a4-f712-5262-183c-f58218a7a0ed",
"token": "Xt5EWLLDS7FJjR1c"
}
]
}
}
{id}/payment_methods/{payment_method_id}Update an existing payment method for an organisation
Path variables
The organisation (identifier) whose paymeny method will be updated
The payment method (identifier) that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Marks the payment method as the organisation’s primary one
Marks the payment method as the backup
The payment method notes
The account’s main information. Required and applicable if the payment method type is ACCOUNT
The account name
Information regarding the account’s payment gateway
The payment gateway related to the payment method
The identifier used on payment gateway
The bank details.Required and applicable if the payment method is set to BANK
The bank account number.
The IBAN code.
The name of the customer’s bank
Institution number of the customer’s bank.
The identifier of the bank branch
The bank account swift number
The sort code
The mandate (sequence) type
The type of the event
The payment gateway’s integration identifier
The country the bank account is located in.
Responses
The request has succeeded
Body
The payment method identifier
PUT https://sandbox.crm.com/backoffice/v1/organisations/2b2460d3-9753-148e-2f5b-f30c0562f5a5/payment_methods/5a56dec4-144c-0d73-f749-9030879280ca HTTP/1.1
Content-Type: application/json
{
"name": "",
"is_primary": "true",
"is_backup": "false",
"notes": "some notes",
"settlement_account": {
"name": "Primary Account",
"payment_gateway": {
"gateway": "JCC_MERCHANT",
"gateway_identifier": "0000257"
}
},
"account_debit": {
"account_name": "",
"account_number": "001002001",
"iban": "0143240434320434",
"bank": "Barclays",
"bank_code": "0032933-1123",
"branch": "Ascot",
"swift": "12345678",
"sort_code": "20-02-53",
"mandate": {
"reference": "",
"sign_date": 1
},
"account_type": "SAVINGS",
"integration_id": ""
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "5a56dec4-144c-0d73-f749-9030879280ca"
}
{id}/payment_methods/{payment_method_id}Remove a payment method from an organisation
Path variables
The organisation (identifier) whose payment method will be removed
The payment method (identifier) that will be removed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted