Self Service
Welcome to the CRM.COM Application Programming Interface (API) documentation
The CRM.COM API is designed around REST, allowing you to manage subscription and/or rewards commerce in a simple, programmatic way using intuitive URL endpoints, conventional HTTP requests, response codes, authentication and verbs.
Self-Service API is designed with the main focus on developers of Mobile or Web based Applications, while being secure and performant.
For the management API please refer to the Back-Office API documentation that provides access and extensibilty to the functionality found in the CRM.COM.
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.
The CRM.COM Self Service API uses a JWT token that is returned from a contact authentication call either using username & password or one time password request.
All API requests must be made over HTTPS. Any request made over plain HTTP or without authentication will fail. A pubic api key should be provided as part of the header for application identification.
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 400 Bad Request
{
"status": 400,
"message": "Record not found.",
"error": "CRM.EXCEPTIONS.NOTFOUNDEXCEPTION",
"parameters": [
"contact",
"789dacae-cf71-414f-9483-ca88acaa46432"
]
}
The request has succeeded
The input request was invalid or incorrect, often due to missing a required parameter
The provided API Key or Token is invalid
The API key or Token does not have permissions to perform the request
The requested resource does not exist
The server encountered an unexpected condition which prevented it from fulfilling the request
The server received an invalid response from the upstream server it accessed in attempting to fulfill the request
The server did not receive a timely response from the upstream server
The concept of responsive images is utilized, offering single images that can respond to changes in any screen resolution on any mobile or web-based applications.
In order to achieve that applications should use an <img>
atttribute named srcset. The srcset defines multiple sizes of the same image, allowing the browser to select the appropriate image source based on its current resolution.
<img
srcset="small.jpg 256w,
medium.jpg 512w,
large.jpg 1024w"
sizes="(max-width: 30em) 25em, 100vw"
src="medium.jpg"
alt="responsive image"
/>
{id}
/approval_requests{id}
/actions{token}
{id}
/approval_requestsRetrieve a list of approval requests based on search criteria for a specific contact (e.g. all pending approval requests)
Path variables
The contact (identifier) for whom approval requests will be retrieved
Request parameters
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
Details about the entity that such approval request was applied to
The entity identifier
The approval entity type
The entity reference name/code/number
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/contacts/b2157d75-7959-83dc-fdfa-cacba764d4d4/approval_requests HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "8dfc2223-edca-f05d-820b-dc96ba9df2c2",
"state": "APPROVED",
"entity": {
"id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
"type": "ORDER",
"reference": "CO1234"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/actionsPerform actions on existing approval request (e.g. approve request)
Path variables
The approval request (identifier) that will be updated
Request headers
Authorization Token
Request body
The response for the approval request
Responses
The request has succeeded
Body
The approval request identifier
PUT https://sandbox.crm.com/self-service/v2/approval_requests/a6ecbc14-5622-0e30-b629-b1289963f7d2/actions HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "ACCEPT"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "a6ecbc14-5622-0e30-b629-b1289963f7d2"
}
{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
GET https://sandbox.crm.com/self-service/v2/approval_requests/2fa42de0-38a0-1e86-b813-d370c35b082c HTTP/1.1
HTTP/1.1 200 OK
Create an upload signature for a file
Notes
Integrating file upload should be based on the following APIs
- Upload file signature
- Connect file to a module (entity), such as service requests
Request headers
Authorization Token
Request body
File contents provided via multipart/form-data
Examples
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/self-service/v2/files HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"file": "file object"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "7279fecf-b0a6-0aab-6bcd-37881fe8c10e"
}
{id}
Delete a file
Path variables
The file identifier to be deleted
Request headers
Authorization Token
Responses
The request has succeeded
DELETE https://sandbox.crm.com/self-service/v2/files/8dfc2223-edca-f05d-820b-dc96ba9df2c2 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 204 No Content
{id}
Retrieve a specific file
Path variables
The file identifier to be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The identifier of the file retrieved
Information about the creative type
GET https://sandbox.crm.com/self-service/v2/files/3ae9d64a-8a3b-f1e1-eed6-05b307f926fb HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "3ae9d64a-8a3b-f1e1-eed6-05b307f926fb",
"mime": "docx"
}
Ability to authenticate customers via a Mobile App or a Portal
{id}
/wifi/authorize{token}
{id}
/sign_outAuthenticate a contact and provide a token that needs to be used for subsequent API requests
Request headers
The publishable api key for application identification
Request body
The contact’s identity provider
The contact’s username (applicable for EMAIL providers). If password not provided then OTP request is triggered.
The contact’s password (applicable for EMAIL providers)
The token taken from the oAUTH service provider (applicable for Facebook/Google/MW4 providers)
The contact’s device mac address (applicable for MAC_ADDRESS providers)
The contact’s phone
The contact’s phone country code
The contact’s phone number
The application (identifier), used for app stores verification (i.e. Apple Store requests a demo contact for verifying CRM.COM applications before publishing it over to their store; demo contacts can be specified from the CRM.COM application configuration settings)
Examples
Responses
The request has succeeded
Body
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 authorised contact details
The contact’s identifier
The contact’s first name
The contact’s last name
Defines whether the used identity is verified
Details about the organisations that the contact has joined
The organisation identifier
The organisation type
The organisation name
Details about the contact communities that the contact is a member of
The contact identifier
The contact name
Authenticate contact using email and password
POST https://sandbox.crm.com/self-service/v2/contacts/authenticate HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"provider": "EMAIL",
"username": "johndoe@crm.com",
"password": "password1234"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"exp": "1572530655",
"contact": {
"title": "Mr",
"first_name": "John",
"last_name": "Doe",
"avatar": "avatar",
"is_verified": "false"
},
"organisations": [
{
"external_id": "QWERTY12345671234567324ETFTGBY78",
"org_type": "SERVICE_OWNER",
"org_relationship": "MERCHANT",
"name": "CRMdotCOM"
}
]
}
Authenticate contact using MAC address
POST https://sandbox.crm.com/self-service/v2/contacts/authenticate HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"provider": "MAC_ADDRESS",
"mac_address": "01-23-45-67-89-AB"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "",
"exp": "1572530655",
"contact": {
"id": "",
"title": "Mr",
"first_name": "John",
"last_name": "Doe",
"company_name": "",
"avatar": "avatar",
"is_verified": "false"
},
"organisations": [
{
"external_id": "QWERTY12345671234567324ETFTGBY78",
"org_type": "SERVICE_OWNER",
"name": "CRMdotCOM"
}
]
}
Authenticate contact using MW4
POST https://sandbox.crm.com/self-service/v2/contacts/authenticate HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"provider": "MW4",
"token": "234er43ergt34eett34"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "",
"exp": "1572530655",
"contact": {
"id": "2f2f9afe-4399-59b7-cbb8-da18c2255064",
"title": "Mr",
"first_name": "John",
"last_name": "Doe",
"company_name": "CRM",
"avatar": "avatar",
"is_verified": "false"
},
"organisations": [
{
"external_id": "QWERTY12345671234567324ETFTGBY78",
"org_type": "SERVICE_OWNER",
"name": "CRMdotCOM"
}
]
}
Authenticate contact using phone
POST https://sandbox.crm.com/self-service/v2/contacts/authenticate HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"provider": "PHONE",
"phone_number": "22265566",
"country_code": "CYP"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "",
"exp": "1572530655",
"contact": {
"id": "2f2f9afe-4399-59b7-cbb8-da18c2255064",
"title": "Mr",
"first_name": "John",
"last_name": "Doe",
"company_name": "CRM",
"avatar": "avatar",
"is_verified": "false"
},
"organisations": [
{
"external_id": "QWERTY12345671234567324ETFTGBY78",
"org_type": "ORGANISATION",
"name": "CRMdotCOM"
}
]
}
Refresh the contact session based on a “refresh” token and provide an access token that will be used for subsequent API requests
Request headers
The refresh token that will be used for re-authenticating a contact without signing in again
Responses
The request has succeeded
Body
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 authorised contact details
The contact’s identifier
The contact’s first name
The contact’s last name
Defines whether the used identity is verified
Details about the organisations that the contact has joined
The organisation identifier
The organisation type
The organisation name
Details about the contact communities that the contact is a member of
The contact identifier
The contact name
POST https://sandbox.crm.com/self-service/v2/contacts/refresh HTTP/1.1
Authorization: eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "",
"exp": "1572530655",
"contact": {
"id": "2f2f9afe-4399-59b7-cbb8-da18c2255064",
"title": "Mr",
"first_name": "John",
"last_name": "Doe",
"company_name": "CRM",
"avatar": "avatar",
"is_verified": "false"
},
"organisations": [
{
"external_id": "QWERTY12345671234567324ETFTGBY78",
"org_type": "ORGANISATION",
"name": "CRMdotCOM"
}
]
}
{id}
/wifi/authorizeAuthorize a contact over to a WiFi platform for usage allowance consumption
Path variables
The contact (identifier) that will be authorized over to a WiFi platform
Request headers
The publishable api key for application identification
Request body
The contat’s device MAC address
The usage estimation (identifier) that the contact is authorized for
The site (organisation’s WiFi network) that the contact is authorized against
Responses
The request has succeeded
The input request was invalid or incorrect, often due to missing a required parameter OR client has already signed in from anotyher device (ClientAlreadyAuthorizedException)
POST https://sandbox.crm.com/self-service/v2/contacts/eab82829-b65e-ee5a-b0f8-33b8ad48e04e/wifi/authorize HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"mac_address": "01-23-45-67-89-AB",
"estimation_id": "0ba7de75-8a68-c19a-3d3a-f4708723a1a4",
"site_id": "onwuq8y1"
}
HTTP/1.1 204 No Content
Request an one time password based on a contact’s details
Notes
Requesting an one time password will identify a contact based on the provided details (credentials) and once a single contact is found, an outbound communication (SMS or Email) will be send with a 6-digit number that can be used for verifying a contact
Request headers
The publishable api key for application identification
Request body
Defines how a contact will be identified
The predetermined information that will be used to identify the contact
Lookup on contact details
Lookup on contact details
Lookup on contact details
Lookup on contact customer identification medium (if enabled) and then on contact details
Lookup on contact identity, then on customer identification medium (if enabled) and last on contact details
Lookup on contact identity, then on customer identification medium (if enabled) and last on contact details
Lookup on customer identification medium (if enabled) and last on contact details
Lookup on customer identification medium (if enabled) and last on contact details
Lookup on contact identity
The value of the credential to check
The gift pass information to check (applicable only if type is “GIFT_PASS”)
The email address that will receive the one-time-password (email or phone must be provided)
The contact’s phone
The contact’s phone country code
The contact’s phone number
The gift pass pin (pin or last_spend_amount must be provided)
The last spend amount performed, semi-optional - either pin or last_spend_amount must be provided
Responses
The request has succeeded
Body
The obfuscated method that one-time password is sent to
The one time password authentication identifier that is generated as per otp request and will be used for validating such otp
POST https://sandbox.crm.com/self-service/v2/contacts/otp HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"credentials": [
{
"name": "LOYALTY_IDENTIDIER",
"value": "1234567"
},
{
"name": "ID_NUMBER",
"value": "100995471"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"obfuscated_value": "+35799***834",
"auth_otp": "731e4023-4c04-4278-8eb5-240651317e46"
}
Verifies that the one time password that was requested is valid
Request headers
The publishable api key for application identification
Request body
The one time password authentication identifier that is generated as per otp request and will be used for validating such otp
The one time password that was sent to the contact and should be used for verification purposes
Responses
The request has succeeded
Body
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 authorised contact details
The contact’s identifier
The contact’s first name
The contact’s last name
Defines whether the used identity is verified
Details about the organisations that the contact has joined
The organisation identifier
The organisation type
The organisation name
Details about the contact communities that the contact is a member of
The contact identifier
The contact name
POST https://sandbox.crm.com/self-service/v2/contacts/validate_otp HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"auth_otp": "47c7-318202dbe45d",
"code": "123456"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "",
"exp": "1572530655",
"contact": {
"id": "2f2f9afe-4399-59b7-cbb8-da18c2255064",
"title": "Mr",
"first_name": "John",
"last_name": "Doe",
"company_name": "CRM",
"avatar": "avatar",
"is_verified": "false"
},
"organisations": [
{
"external_id": "QWERTY12345671234567324ETFTGBY78",
"org_type": "ORGANISATION",
"name": "CRMdotCOM"
}
]
}
Request another email verification for a contact after an email verification has been sent, but not verified
Request headers
The publishable api key for application identification
Request body
The email address that verification will be sent to
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v2/contacts/resend_email_verification HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"credentials": [
{
"name": "EMAIL",
"value": "johndoe@crm.com"
}
]
}
HTTP/1.1 204 No Content
{token}
Verify a contact’s email address after an email verification request has been sent to the contact (contact should perform an email verification request, where a communication will be sent to the contact with the email verification link, and upon opening such link then this action should be performed)
Path variables
The token that will used for verifying the contact’s email address
Responses
The request has succeeded
Body
An HTML based landing page is returned and rendered
GET https://sandbox.crm.com/self-service/v2/contacts/verify_email/ABCTKN123456798VGP2020 HTTP/1.1
HTTP/1.1 200 OK
Requests a password reset for an existing contact, who forgot his/her password and cannot sign in
Request headers
The publishable api key for application identification
Request body
The username that will be used to request a new password reset link
Examples
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v2/contacts/forgot_password HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"username": "johndoe@crm.com"
}
HTTP/1.1 204 No Content
Changes a contact’s password after a password reset request (contact should perform a password reset, where a communication will be sent with a password reset link, and when opening such link and providing new password then this action should be performed)
Request body
The token that will verify that the client (that performs such action) is trusted
The new password
Examples
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v2/contacts/change_password HTTP/1.1
Content-Type: application/json
{
"token": "j677enty-23sfsfsf23456798vgp",
"password": "wsxcde421qadfg"
}
HTTP/1.1 204 No Content
{id}
/sign_outSigns out a contact by terminating his/her session, such contact will not be able to access the client (application) and should sign in again in order to do so
Path variables
The contact (identifier) that will be signed out
Request headers
Authorization Token
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v2/contacts/9781d1db-38db-598f-2bb5-a3de3fbc2730/sign_out HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 204 No Content
{id}
/communications{id}
{id}
/actions{id}
/communicationsGet a list of a contact’s communications
Path variables
The contact (identifier) for which the related communications 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
The type of the communications to be retrieved
If set to TRUE, only archived communications will be retrieved
If set to TRUE, only viewed communications will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
Information about the retrieved communication records
The communication identifier
The state of the communication
The contact identifier that communication was sent to
The channel that the communication is sent through
Defines whether the communication has been viewed
The datetime that the recipient viewed the communication
Defines whether the communication has been archived
The date links in the communication where first clicked by the recipient
The language tha the communication was sent in
The default sender
The email or number of the recipient
The actual subject of the communication sent (if applicable)
The actual content of the communication sent
The name of the communication plan in case the communication was created from a plan
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/communications HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"life_cycle_state": "PENDING",
"contact_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"channel": "EMAIL",
"is_viewed": true,
"viewed_on": 1583846865,
"is_archived": true,
"clicked_on": 1,
"language": "ENG",
"sender": "dev@crm.com",
"recipient": "jon@crm.com",
"content": "",
"subject": "",
"name": "Happy Birthday"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
Get a specific contact’s communication
Path variables
The communication identifier that should be returned
Request headers
Authorization Token
Responses
The request has succeeded
Body
The state of the communication
Details about the communication contact
The unique identifier of the contact
The full name of the contact
The unique code of the contact
The channel that the communication is sent through
Defines whether the communication has been viewed
The datetime that the recipient viewed the communication
Defines whether the communication has been archived
The date links in the communication where first clicked by the recipient
The language tha the communication was sent in
The default sender
The communication’s recipient information
The actual subject of the communication sent (if applicable)
The actual content of the communication sent
The name of the communication plan in case that the communication was created based on a plan
The date and time that the communication was created
Title of push notification (applicable for INAPP channels)
Subtitle (iOS only) of push notification (applicable for INAPP channels)
Image for push notification
Push notification URL (deep linking)
GET https://sandbox.crm.com/self-service/v1/communications/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"life_cycle_state": "PENDING",
"contact": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "John Johnson",
"code": "C123"
},
"channel": "EMAIL",
"is_viewed": true,
"viewed_on": 1583846865,
"is_archived": true,
"clicked_on": 1,
"language": "ENG",
"sender": "dev@crm.com",
"recipient": "jon@crm.com",
"subject": "Award Provided",
"content": "You have been awarded!",
"name": "Happy Birthday",
"created_on": 1583846865,
"title": "New Festive Beverages",
"subtitle": "20% discount for December",
"in_app_image_url": "",
"in_app_click_link_url": ""
}
{id}
/actionsMark an existing communication as viewed and/or archived
Path variables
The communication identifier
Request headers
Authorization Token
Request body
Sets the communication as viewed
Sets the communication as archived
Responses
The request has succeeded
Body
The communication identifier
PUT https://sandbox.crm.com/self-service/v1/communications/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"viewed": "true"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Request (and retrieve) a printout for an invoice or order
Notes
Integrating printout export for Contacts should be based on the following APIs
Request headers
Authorization Token
Request body
Defines the format on which the printout will be created to
Printout will be generated as pdf
Printout will be sent to the contact’s email address
Defines the entity based on which the printout will be created
The entity type
The entity identifier
Responses
The request has succeeded (applicable if printout is PDF based)
Body
The printout identifier that will be exported
The request has succeeded (applicable if printout is EMAIL based)
POST https://sandbox.crm.com/self-service/v2/printout HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"format": "EMAIL",
"entity": {
"type": "ORDER",
"id": "1d014e8e-4e13-20e9-3727-071f0cef5cb6"
}
}
HTTP/1.1 204 No Content
Contacts are the customers of an organisation, the centre point of CRM.COM, and the starting point of any business flow.
{id}
{id}
{id}
Create a new contact of type ‘person’. A contact is created as part of the contact registration process via an app or portal. Contacts can register and authenticate their registration using one of the following methods subject to configuration:
- email & password
- email & OTP
- phone & OTP
Request headers
The publishable api key for application identification
Request body
The contact’s first name (required when registering using email/password, email/OTP or phone/OTP)
The contact’s last name (required when registering using email/password, email/OTP or phone/OTP)
Details about how the contact will be identified based on app/portal configuration
The contact’s identity provider
The contact’s email, (required for email/password or email/OTP registraion). If password is not provided then an OTP request is triggered.
The contact’s password (required for email/password registration)
Contact’s phone details. Required for phone/OTP registration to trigger an OTP request
ISO 3-char country code of phone number
Phone number
Application id - required when registering with Facebook
The access token returned from the OAuth service provider (required for Facebook and Google registration)
Has the contact accepted the business terms & conditions?
Has the contact opted out from receiving emails?
Has the contact opted out from receiving text messages (sms)?
The referral code of the contact who referred this contact (applicable only in cases where a new contact has been referred by another). This may trigger an award for the referrring contact subject to configuration
3-char country code of the contact based on locale, this will be used to determine pricing and taxes
The custom field’s unique key
The custom field’s value
Pass code to be redeemed - optionally used on Landing page registration flow, if pass code is invalid then contact registration will not proceed
Examples
Responses
The request has succeeded
Body
The access token that can be used in subsequent API calls
The access token expiration date/time
Information about the authorised contact
The contact’s first name
The contact’s last name
Defines whether the identity used has been verified
Details about the organisations that the contact has joined
The organisation’s external identifier
The organisation type
The organisation relationship
The organisation name
The obfuscated send method value (applicable only when provider is EMAIL or PHONE and an OTP is generated)
The one time password auth id (applicable only when provider is EMAIL or PHONE and an OTP is generated)
The request has succeeded (applicable only if verficiation will be required)
POST https://sandbox.crm.com/self-service/v2/contacts/register HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"first_name": "John",
"last_name": "Doe",
"identification": {
"provider": "FACEBOOK",
"email": "johndoe@crm.com",
"password": "123456",
"phone": {
"country_code": "CYP",
"number": "99123456"
},
"application_id": "3c33dcc6-3958-4e7d-ae0e-592948627711",
"token": "YOJDAKEb9l1U0sUzrskM6X4emzrSeXqb"
},
"accept_terms_&_conditions": "true",
"email_opt_out": "true",
"sms_opt_out": "true",
"referral_code": "3M5Y1P",
"country_agreement": "CYP",
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"expiration": "1572530655",
"contact": {
"first_name": "John",
"last_name": "Doe",
"is_verified": true
},
"organisations": [
{
"external_id": "QWERTY12345671234567324ETFTGBY78",
"org_type": "ORGANISATION",
"org_relationship": "MERCHANT",
"name": "CRMdotCOM"
}
],
"obfuscated_value": "so****@gmail.com",
"auth_otp": "731e4023-4c04-4278-8eb5-240651317e46"
}
POST /contacts/register HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"first_name": "John",
"last_name": "Doe",
"identity": {
"provider": "PHONE",
"phone_number": "22265577",
"country_code": "CYP"
},
"service_acceptance": "true",
"email_opt_out": "true",
"sms_opt_out": "true"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"obfuscated_value": "+35799***834",
"auth_otp": "731e4023-4c04-4278-8eb5-240651317e46"
}
{id}
Unregisters a contact from an organisation
Path variables
The id of the contact to unregister
Request headers
Authorization Token
Responses
The request has succeeded
Remove an existing contact address
DELETE https://sandbox.crm.com/self-service/v2/contacts/e18ee2bc-c6f3-49e1-8e05-763386378017 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
{id}
Update information for an existing contact
Path variables
The unique id of the contact to be updated
Request headers
Authorization Token
Request body
Contact’s first name
Contact’s middle name
Contact’s last name
The contact’s selected language, used for communications, translations etc.
The contact’s email address
Contact’s gender information
Contact’s date of birth
Day
Month
Year
Contact’s nameday information
Day
Month
Has the contact opted out from receiving text messages (sms)?
Has the contact opted out from receiving emails?
The custom field’s unique key
The custom field’s value
Responses
The request has succeeded
Body
The contact identifier
Update contact
PUT https://sandbox.crm.com/self-service/v2/contacts/e2ade504-9b90-92be-0adb-3258475ff695 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"first_name": "John",
"middle_name": "Patrick",
"last_name": "Smith",
"language_code": "ENG",
"email": "john.smith@gmail.com",
"demographics": {
"gender": "FEMALE",
"date_of_birth": {
"day": 1,
"month": 3,
"year": 1948
},
"name_day": {
"day": 6,
"month": 8
}
},
"sms_opt_out": "false",
"email_opt_out": "false",
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
]
}
HTTP/1.1 200 OK
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "e2ade504-9b90-92be-0adb-3258475ff695"
}
{id}
Retrieve basic information for a specific contact
Path variables
The id of the contact whose information will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The contact identifier
The contact code
The contact’s first name
The contact’s middle name
The contact’s last name
The contact’s selected language for communications and translations
The contact’s email address
Contact phone information
The phone country code
The phone number
Contact’s gender information
Contact’s date of birth
Day
Month
Year
Contact’s nameday information
Day
Month
The contact referral code used when referring friends
Has the contact opted-out for receiving text messages (sms)?
Has the contact opted-out for receiving emails?
3-char country code of the contact based on locale, this will be used to determine pricing and taxes
The loyalty identifiers used to identify the contact (e.g. a loyalty card number from an external system)
The contact loyalty identifier
The custom field’s unique key
The custom field’s value
Contact wallet information
Unique wallet id
Wallet code
The sales model is the unique identifier used to classify a product’s price
The sales model unique identifier
The sales model name
GET https://sandbox.crm.com/self-service/v2/contacts/6e2f83ca-69e9-4ea4-96c5-73a4c641979d HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "6e2f83ca-69e9-4ea4-96c5-73a4c641979d",
"code": "100000001908",
"first_name": "John",
"middle_name": "Alias",
"last_name": "Doe",
"language_code": "ENG",
"email": "john.smith@crm.com",
"phone": {
"country_code": "CYP",
"number": "99123456"
},
"demographics": {
"gender": "MALE",
"date_of_birth": {
"day": 1,
"month": 3,
"year": 1948
},
"name_day": {
"day": 6,
"month": 8
}
},
"referral_code": "REF123",
"sms_opt_out": "false",
"email_opt_out": "true",
"country_of_agreement": "CYP",
"loyalty_identifier": [
{
"identifier": "100000001908"
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
],
"wallet": {
"id": "1a6a85ac-aacf-4175-8de2-a7d701186d96",
"code": "0872805556185711"
},
"sales_model": {
"id": "caf332bc-4e90-47b5-a05d-142b264897b9",
"name": "Retail"
}
}
Manage the addresses of a contact
{id}
/addresses{id}
/addresses/{address_id}
{id}
/addresses/{address_id}
{id}
/addresses{id}
/addressesAdd a new address to an existing contact. A contact can have multiple addresses.
Path variables
The id of the contact for which an address will be added
Request headers
Authorization Token
Request body
The address type
A short name for the address allowing easy recognition in a list
The address line 1
The address line 2
The address state/provice/county
The address town/city
The address post code
The 3-char address country code
Defines whether the address is the primary address for the contact
The address geolocation latitude
The address geolocation longtitude
The Google textual identifier that uniquely identifies an address
Responses
The request has succeeded
Body
The updated address identifier
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"address_type": "BUSINESS",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Star",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CY",
"is_primary": true
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/addresses/{address_id}
Update one of the contact’s existing addresses
Path variables
The contact identifier for which an address will be updated
The address identifier that will be updated
Request headers
Authorization Token
Request body
A short name for the address allowing it to be easily recognised in a list
The address line 1
The address line 2
The address state/provice/county
The address town/city
The address post code
The address 3-char country code
Defines whether the address is the primary address for the contact
The address geolocation latitude
The address geolocation longtitude
The Google textual identifier that uniquely identifies an address
Responses
The request has succeeded
Body
The updated address identifier
PUT /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Star",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CY",
"care_of": "",
"is_primary": true
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/addresses/{address_id}
Remove an existing address from a specific contact
Path variables
The contact id for which an address will be deleted
The id of the address to be deleted
Request headers
Authorization Token
Responses
The request has succeeded
Remove an existing contact address
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/addressesRetrieve all the addresses of a specific contact
Path variables
The contact identifier whose addresses will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
Address information retrieved
The address identifier
The address type
A short name allowing the address to be easily recognised in a list
The address line 1
The address line 2
The address state/provice/county
The address town/city
The address post code
The 3-char country code of the address
The address geolocation latitude
The address geolocation longitude
The Google textual identifier that uniquely identifies an address
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"type": "HOME",
"address_line_1": "Elia Papakyriakou 1",
"address_line_2": "Tower Star",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CY",
"is_primary": "true"
}
]
}
{id}
/attachments{id}
/attachments/{attachment_id}
{id}
/attachments{id}
/attachmentsUpload an attachment for a contact
Path variables
The contact (identifier) for which a file will be attached
Notes
Integrating file upload for Contacts should be based on the following APIs
Request headers
Authorization Token
Request body
The file identifier to be attached
The file (URL) to be attached
The file description
Responses
The request has succeeded
Body
The attachment identifier
POST https://sandbox.crm.com/self-service/v1/contacts/6b888b83-b418-752f-604d-0653cf65885d/attachments HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"file_id": "30526723-24a3-e4e3-1a75-b26b1b41f05c",
"description": "Image 1"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "8dfc2223-edca-f05d-820b-dc96ba9df2c2"
}
{id}
/attachments/{attachment_id}
Delete an attachment file for a contact
Path variables
The contact (identifier) for which attachment file will be deleted
The attachment file (identifier) to be deleted
Request headers
Authorization Token
Responses
The request has succeeded
DELETE https://sandbox.crm.com/self-service/v2/contacts/6b888b83-b418-752f-604d-0653cf65885d/attachments/8dfc2223-edca-f05d-820b-dc96ba9df2c2 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 204 No Content
{id}
/attachmentsRetrieve all attachment files for a specific contact
Path variables
The contact (identifier) for whom attachment files 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
Responses
The request has succeeded
Body
The attachment details
The attachment identifier
The attachment description
The file details
The file identifier
Information about the creative type
The file name
The file URL endpoint
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/contacts/6b888b83-b418-752f-604d-0653cf65885d/attachments HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "af748ada-0521-0503-fc25-b67635a7d14d",
"file": {
"id": "0317868f-28f8-9f56-d248-5a78718b38cc",
"mime": "jpeg",
"name": "image1.png"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/devices{id}
/devices{id}
/devicesRegister a new device to a specific contact
Path variables
The contact (identifier) that will register a device
Request headers
Authorization Token
Request body
The device’s serial number or device id
The device’s MAC address
The device electronic id
The device’s operation platform
The device’s registration token for push notifications
The product (identifier) that contact brought as his/her own
The application identifier that usage will be set
Responses
The request has succeeded
Body
The device identifier
POST https://sandbox.crm.com/self-service/v2/contacts/cb4e9a83-9ad6-a837-238b-0238d0fa1236/devices HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"platform": "BROWSER",
"mac_address": "00-D0-56-F2-B5-12",
"serial_number": "2049-3630",
"registration_token": "4e11bef819b8ae9af08d",
"product_id": "7f45ad8a-b164-2a67-eb93-8651c0f1b101",
"application_id": "3a69e9df-ada3-3979-84b9-8b77159e026a",
"electronic_id": "I243WER"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "d94cbb99-dd1a-a696-23e8-ff98402606eb"
}
{id}
/devicesGet a list of devices
Path variables
The contact (identifier) whom devices will be retrieved
Request parameters
Search for devices using their serial number or electronic ID
Filter based on serial number
Filter based on electronic id
Filters only the devices owned/brought by contact
Filters only the devices rented by contact
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
Determines whether custom fields should be retrieved or not
Filters based on custom fields (key/value set should be semicolon separated)
Request headers
Authorization Token
Responses
The request has succeeded
Body
The device identifier
The device’s MAC address
The device’s operation platform
The device’s serial number
The device eletronic id
The device’s registration token for push notifications
The date that such device was registered by the contact
Details about the product that defines such device
The product’s identifier
The product’s SKU code
The product’s name
The custom field’s unique key
The custom field’s value
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/contacts/679bb0ea-c938-bcb3-3128-5f640d0b9a65/devices HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "af748ada-0521-0503-fc25-b67635a7d14d",
"mac_address": "00:00:5e:00:53:af",
"platform": "BROWSER",
"serial_number": "2049-3630",
"registration_token": "4e11bef819b8ae9af08d",
"registration_date": 1642758418,
"product": {
"id": "813a27c7-df65-8a6f-fa6a-75d38dc326ec",
"sku": "SKU-001",
"name": "Set-top Box"
},
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
],
"electronic_id": ""
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/organisations{id}
/organisations{id}
/preferences{id}
/preferences{id}
/organisationsSign-up or sign-out a contact from an existing organisation, used in cases where a Service Owner owns a contact registry.
Path variables
The contact (registry) id to action
Request headers
Authorization Token
Request body
The action to be taken
Contact requests to sign-up to the organisation
Contact requests to sign-off from the organisation
The organisation identifier which the action will be applied
Has the contact has accepted the business terms & conditions? (applicable only if action = SIGNUP)
Has the contact opted-out from receiving emails? (applicable only if action = SIGNUP)
Has the contact opted-out from receiving sms? (applicable only if action = SIGNUP)
The code that will be used for awarding referral events (applicable only if action = SIGNUP)
Examples
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v1/contacts/49144508-5520-48e7-8e64-6a1907afbb26/organisations HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNUP",
"organisation_id": "9086dd6b-2b9f-4fba-85ff-1b89143a56da",
"service_acceptance": "true",
"email_opt_out": "true",
"sms_opt_out": "true",
"consent_state": "PENDING",
"referral_code": "1234"
}
HTTP/1.1 200 OK
POST https://sandbox.crm.com/self-service/v1/contacts/49144508-5520-48e7-8e64-6a1907afbb26/organisations HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNOFF",
"organisation_id": "9086dd6b-2b9f-4fba-85ff-1b89143a56da"
}
HTTP/1.1 200 OK
{id}
/organisationsRetrieves all (business) organisations that the contact has signed-up to
Path variables
The (registry) contact (identifier) whose joined organisations will be retrieved
Request parameters
The organisation name (should behave as like)
Whether to include the wallet information of the contact for each organisation
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
Response content
The organisation identifier
The organisation name
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Contact wallet information for the organisation
The wallet identifier
Total of the open balance + commerce balance of the wallet
The currency code
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/contacts/49144508-5520-48e7-8e64-6a1907afbb26/organisations?include_wallet=true HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "442428dc-c817-41a7-8a3e-b49070696d6f",
"name": "BrewCoffee",
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "ATTACHMENT",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
],
"wallet": {
"wallet_id": "038af54e-282c-40ad-ae5d-cc74f2c80f40",
"balance": "9.99",
"currency_code": "EUR"
},
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/preferencesSet the preferred organisation for a Contact
Path variables
The contact (registry) identifier whose preferred organisation will be set
Request headers
Authorization Token
Request body
The organisation identifier
Responses
Body
The contact identifier
{id}
/preferencesRetrieves the preferred organisations for a Contact
Path variables
The contact (registry) identifier whose preferred organisation will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
Preferred organisation information
The organisation identifier
The organisation name
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
GET https://sandbox.crm.com/self-service/v1/contacts/49144508-5520-48e7-8e64-6a1907afbb26/preferences HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"organisations": [
{
"type": "ORDERS",
"id": "49144508-5520-48e7-8e64-6a1907afbb26",
"name": "Big Boy Burgers",
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"usage_type": "ATTACHMENT",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
]
}
{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 a contact. Card, Account Debits and Wallet payment methods are supported.
Path variables
The contact identifier for which a payment method will be added
Notes
JCC Merchant Gateway
- Perform Fingerprint to retrieve the card masked & hashed numbers and the country of issue
- Set the retrieved masked number, hashed number and country of issue on the related “card” collection
Settle Gateway
- Set the phone country code, phone number and msisdn (phone country + number) on the related “phone” collection
Request headers
Authorization Token
Request body
A name providing a small description for the payment method. For cases of Wallet payment method types, use the Payment Gateway’s name instead
The payment method that will be related to the contact
Mark the payment method as the contact’s primary payment method?
Mark the payment method as the backup payment method?
Notes related to te payment method
The card details (required and applicable if the payment method is set to CARD)
The card name
The card brand
The first 6 digits of the card. Either the card number or the first 6 and last 4 digits must be specified
The last 4 digits of the card. Either the card number or the first 6 and last 4 digits must be specified
The card expiration month
The card expiration year
The card issue country (3 char country code)
Information about the card holder
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 address
The state related to the card address
The country related to the card address
If set to True, then the card holder’a address is automatically set using the account’s billing address
The payment gateway that tokenized the card. Applicable only for Payment Gateways implemented within CRM.COM
The payment gateway’s integration identifier which is embeded in the front end
The tokenised information as this was returned by the payment gateway
The phone details (required and applicable if the payment method is set to PHONE)
Either phone details or email should be specified
The phone name
The phone country code
Tthe phone number
The phone msisdn (only country code and phone number, not special characters)
Either phone details or email should be specified
The payment gateway that tokenized the card. Applicable only for Payment Gateways implemented within CRM.COM
The payment gateway’s integration identifier which is embeded in the front end
The tokenised information as this was returned by the payment gateway
The bank details (required and applicable if the payment method is set to BANK)
The bank account number. Either the bank account number or IBAN must be specified
The IBAN code. Either the bank account number or IBAN must be specified
The identifier of the bank
The bank code
The identifier of the bank branch
The bank account swift number
The country the bank account is located in.
3-character currency code
The mandate (sequence) type
The payment gateway that tokenized the card. Applicable only for Payment Gateways implemented within CRM.COM
The payment gateway’s integration identifier which is embeded in the front end
The tokenised information as this was returned by the payment gateway
Examples
Responses
The request has succeeded
Body
The id of the newly created contact payment method
POST https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"name": "PayPal",
"payment_method_type": "WALLET",
"is_primary": "true",
"is_backup": "false",
"notes": "Lorem Ipsum",
"card": {
"name": "Default Card",
"brand": "VISA",
"first6": "424242",
"last4": "4242",
"expiration_month": 2,
"expiration_year": 2020,
"country_of_issue": "CYP",
"card_holder_details": {
"card_holder_name": "John Alias Doe",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"address_city": "Nicosia",
"address_zip": "2000",
"address_state": "Egkomi",
"address_country": "CYP",
"use_billing_address": "true"
},
"gateway_token": [
{
"gateway": "SETTLE",
"integration_id": "",
"token": ""
}
]
},
"wallet": {
"phone_details": {
"name": "Primary phone",
"country_code": "00357",
"number": "91000000",
"msisdn": "35791000000"
},
"email": "",
"gateway_token": [
{
"gateway": "JCC_MERCHANT",
"integration_id": "",
"token": ""
}
]
},
"account_debit": {
"account_name": "",
"account_number": "001002001",
"iban": "SE3550000000054910000003",
"bank": "Barclays",
"bank_code": "102491",
"branch": "Ascot",
"swift": "12345678",
"sort_code": "",
"country": "CY",
"currency": "EUR",
"account_type": "CHECKING",
"mandate": {
"refernece": "",
"sign_date": 1
},
"account_holder_details": {
"account_holder_name": "",
"address_line_1": "",
"address_line_2": "",
"address_city": "",
"address_zip": "",
"address_state": "",
"address_country": "",
"use_billing_address": true
},
"gateway_token": [
{
"gateway": "JCC",
"integration_id": "",
"token": ""
}
]
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/payment_methods/{payment_method_id}
Update an existing payment method for a contact
Path variables
The contact identifier whose payment method will be updated
The id of the payment method to be updated
Request headers
Authorization Token
Request body
A name providing a small description for the payment method. For cases of Wallet payment method types, use the Payment Gateway’s name instead
Mark the payment method as the contact’s primary payment method?
Mark the payment method as the backup payment method?
Any relevant payment method notes
Examples
Responses
The request has succeeded
Body
The payment method identifier
PUT https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"name": "",
"is_primary": "true",
"is_backup": "false",
"notes": "Lorem Ipsum"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/payment_methods/{payment_method_id}
Remove an existing payment method for a specific contact
Path variables
The id of the contact whose payment method will be removed
The id of the payment method to be removed
Request headers
Authorization Token
Responses
The request has succeeded
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/payment_methodsRetrieves a list of payment methods for a contact.
Path variables
The id of the contact whose payment methods will be retrieved
Request parameters
Filter using the type of payment method
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
Information related to the payment methods
The payment method identifier
A name providing a small description for the payment method. For cases of Wallet payment method types, the Payment Gateway’s name is used instead
Indicates whether the payment mehod is the contact’s primary payment method
Indicates whether the payment mehod is the contact’s backup oayment method
Notes related to the payment method
The card details (applicable if the payment method is set to CARD)
The card name
The card brand
The first 6 digits of the card
The last 4 digits of the card
3 char country code
The card expiration month
The card expiration year
Information about the card holder
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 address
The state related to the card address
The country related to the card address
Legacy payment gateways
Th epayment gateway integration information
Integration unique identifier
Integration name
The token of the payment method as this was generated by the payment gateway
The phone details (applicable if the payment method is set to PHONE)
Applicable only for Settle Payment Gateway
Applicable only for Settle Payment Gateway
Legacy payment gateways
Th epayment gateway integration information
Integration unique identifier
Integration name
The token of the payment method as this was generated by the payment gateway
The bank details (applicable if the payment method is set to BANK)
The account name
The bank account number. Either the bank account number or IBAN must be specified
The IBAN code. Either the bank account number or IBAN must be specified
The identifier of the bank
The identifier of the bank branch
The bank account swift number
The bank sort code
The country the bank account is located in.
The mandate (sequence) type
Legacy payment gateways
Th epayment gateway integration information
Integration unique identifier
Integration name
The token of the payment method as this was generated by the payment gateway
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "",
"payment_method_type": "CARD",
"is_primary": "true",
"is_backup": "false",
"notes": "Lorem Ipsum",
"card": {
"name": "Default Card",
"brand": "VISA",
"first6": "42424242",
"last4": "4242",
"country_of_issue": "CYP",
"expiration_month": 6,
"expiration_year": 2021,
"card_holder_details": {
"card_holder_name": "John Alias Doe",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"address_city": "Nicosia",
"address_zip": "2000",
"address_state": "Egkomi",
"address_country": "CY"
},
"gateway_token": [
{
"gateway": "JCC_MERCHANT",
"integration": {
"id": "",
"name": "PayPal"
},
"token": ""
}
]
},
"wallet": {
"phone": {
"name": "",
"country_code": "",
"number": "",
"msisdn": ""
},
"email": "",
"gateway_token": [
{
"gateway": "JCC_MERCHANT",
"integration": {
"id": "",
"name": "PayPal"
},
"token": ""
}
]
},
"account_debit": {
"account_name": "John Doe",
"account_number": "001002001",
"iban": "SE3550000000054910000003",
"bank": "Barclays",
"bank_code": "",
"branch": "Ascot",
"swift": "12345678",
"sort_code": "102491",
"country": "CY",
"currency": "EUR",
"account_type": "SAVINGS",
"mandate": {
"reference": "",
"sign_date": ""
},
"account_holder_details": {
"account_holder_name": "",
"address_line_1": "",
"address_line_2": "",
"address_city": "",
"address_zip": "",
"address_state": "",
"address_country": ""
},
"gateway_token": [
{
"gateway": "JCC",
"integration": {
"id": "",
"name": "PayPal"
},
"token": ""
}
]
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/switch{id}
/people{id}
/people/{people_id}
{id}
/people/{people_id}
{id}
/people{id}
/switchSwitch a contact to another contact that is related to, being part of such contact’s community
Path variables
The related contact (identifier) that will be switched to
Request headers
Authorization Token
Responses
The request has succeeded
Body
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 authorised contact details
The contact’s identifier
The contact’s first name
The contact’s last name
Defines whether the used identity is verified
Details about the organisations that the contact has joined
The organisation identifier
The organisation type
The organisation name
Details about the contact communities that the contact is a member of
The contact identifier
The contact name
POST https://sandbox.crm.com/self-service/v2/contacts/0362aa5b-4438-deb0-b56b-1974f6a27c7f/switch HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"expiration_date": "1572530655",
"contact": {
"id": "2f2f9afe-4399-59b7-cbb8-da18c2255064",
"first_name": "John",
"last_name": "Doe",
"is_verified": "false"
},
"organisations": [
{
"id": "QWERTY12345671234567324ETFTGBY78",
"type": "ORGANISATION",
"name": "CRMdotCOM"
}
],
"relationships": [
{
"id": "be4113e5-0fb5-7116-7d48-6901a6f7ddad",
"name": "CRM-NIC"
}
]
}
{id}
/peopleAdd a new person to a contact’s community
Path variables
The contact (identifier) whose community will be updated by adding a new person
Request headers
Authorization Token
Request body
Invite a contact using an email address (email or phone should be specified)
Invite a contact using a phone (email or phone should be specified)
The phone country code
The phone number
The community relation (identifier) that will be assigned to the new contact member
Defines whether the new contact member will have full permissions
Defines the (explicit) allowed permissions that the new contact member will have
Responses
The request has succeeded
Body
The community relation identifier
POST https://sandbox.crm.com/self-service/v2/contacts/people HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"email": "johndoe@crm.com",
"contact_group_id": "ce27a6f8-bb1c-ee1a-d0ab-292ba154d8e4"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "ccc945d8-1bda-a11c-d378-23c29947c2a3"
}
{id}
/people/{people_id}
Update an existing person in a contact’s community
Path variables
The contact (identifier) whose community will be updated
The community person (identifier) that will be updated
Request headers
Authorization Token
Request body
The community relation (identifier) that will be assigned to the existing contact member
Defines whether the existing contact member will have full permissions
Defines the (explicit) allowed permissions that the existing contact member will have
Responses
The request has succeeded
Body
The community relation identifier
PUT https://sandbox.crm.com/self-service/v2/contacts/ccc945d8-1bda-a11c-d378-23c29947c2a3/people/ccc945d8-1bda-a11c-d378-23c29947c2a3 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"relation_id": "ce27a6f8-bb1c-ee1a-d0ab-292ba154d8e4",
"is_admin": "false",
"permissions": [
"VIEW_CONTACTS"
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "ccc945d8-1bda-a11c-d378-23c29947c2a3"
}
{id}
/people/{people_id}
Delete an existing person from a contact’s community
Path variables
The contact (identifier) whose community will be updated, by removing an existing member
The community person (identifier) that will be deleted
Request headers
Authorization Token
Responses
The request has succeeded
DELETE https://sandbox.crm.com/self-service/v2/contacts/5096c4d4-c387-9888-d631-80e74546e2db/people/ccc945d8-1bda-a11c-d378-23c29947c2a3 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 204 No Content
{id}
/peopleLists all people that a contact’s community has
Path variables
The contact (identifier) whose community people will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The contact member relation identifier
The contact member
The contact identifier
The contact first name
The contact last name
The contact email address
The contact phone
The phone country code
The phone number
The community relation that the contact has
The community relation identifier
The community relation name
Defines whether the contact member will have full permissions
Defines the (explicit) allowed permissions that the new contact member will have
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/contacts/323a12a6-90e4-fa30-caa4-63e9552ffb10/people HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "8ba91f97-fcd2-1ac8-0584-d1210c67e8ef",
"contact": {
"id": "b22e6e44-2c3c-af17-27ac-bacad6cf7181",
"first_name": "John",
"last_name": "Doe",
"email": "johndoe@crm.com",
"phone": {
"country_code": "CYP",
"number": "99123456"
}
},
"relation": {
"id": "4a0bef80-a03d-3fb4-3c79-72c356e77813",
"name": "Employees"
},
"is_admin": "false",
"permissions": [
"VIEW_CONTACTS"
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/phones{id}
/phones/{phone_id}
{id}
/phones/{phone_id}
{id}
/phones{id}
/phonesAdd a new phone to an existing contact. A contact can have multiple phones
Path variables
The contact (id) for which a phone will be added
Request headers
Authorization Token
Request body
The phone type that should be added
The phone number
The country that the phone is registered to
Defines whether the phone will be the primary one
Defines whether phone verification process must be triggered
Responses
The request has succeeded
Body
The phone number record identifier
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"phone_type": "MOBILE",
"is_primary": true,
"number": "91000000",
"country_code": "CY"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/phones/{phone_id}
Update an existing phone form an existing contact
Path variables
The contact (id) for which a phone should be updated
The phone identifier that should be updated
Request headers
Authorization Token
Request body
Defines whether the phone will be the primary one
The phone number
The country that the phone is registered to
Defines whether phone verification process must be triggered
Responses
The request has succeeded
Body
The phone number record identifier
PUT /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"is_primary": true,
"number": "91000000",
"country_code": "CY"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/phones/{phone_id}
Removes a contact phone. A single phone can be removed at a time
Path variables
The contact (id) for which a phone should be deleted
The phone identifier that should be deleted
Request headers
Authorization Token
Responses
The request has succeeded
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/phonesRetrieves phones of an existing contact
Path variables
The contact ID for which the phones will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The phone identifier
The phone type that should be added
Defines whether the phone will be the primary one
The phone number
The country that the phone is registered to
Defines whther the phone has been verified with one-time-password
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "fab9c379-d6b3-0162-8ac1-ca0bfe0c2f1e",
"phone_type": "LANDLINE",
"is_primary": "true",
"number": "91000000",
"country_code": "CY"
}
]
}
{id}
/export_statement{id}
/export_statementRequest (and retrieve) a contact statement
Path variables
The contact (identifier) that statement actions will be applied
Notes
Integrating statement export for Contacts should be based on the following APIs
Request headers
Authorization Token
Request body
Defines the format on which the statement will be exported to
Statement(s) will be generated as pdf(s)
Statement(s) will be sent to the contact’s email address
The account (identifier) based on which statement will be generated (if not specified, then for each account a statement will be generated)
Statement period starting month
Statement period starting year
Statement period ending month
Statement period ending year
Responses
The request has succeeded (applicable if statement will be pdf based)
Body
The statement identifier that will be exported
The request has succeeded (applicable if statement will be EMAIL based)
POST https://sandbox.crm.com/self-service/v2/contacts/b2490476-fc6b-604c-e3f9-5ddd0777efbe/export_statement HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"format": "PDF",
"account_id": "4c0ea630-2972-7714-a5d1-7576b8dc9c22",
"from_month": 12,
"to_month": 12,
"from_year": 2021,
"to_year": 2022
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "1fc220c8-41c5-87db-3eae-3020e7e976c9"
}
{id}
/tokens{id}
/tokens{id}
/tokensRequest to create a contact token
Path variables
The id of the contact to create a token for
Request headers
Authorization Token
Request body
The intent for which such token is requested
The amount requested to be spent. If not specified, then spend as much as possible (applicable if intent = SPEND)
Responses
The request has succeeded
Body
The contact token identifier
The requested token
The token expiration date
The requested spend amount (if not specified will return null)
POST https://sandbox.crm.com/self-service/v1/contacts/33749faa-4ef0-426d-f9f0-83b91bf5ab3f/tokens HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"intent": "SPEND",
"spend_amount": 14.52
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "0b2f69e7-a9a6-2e6f-b1f2-0a643d9ca6b7",
"value": "123456",
"expiration": 1596714307
}
{id}
/tokensList all contact tokens for a specific contact
Path variables
The id of the contact whose tokens will be retrieved
Request parameters
Filter based on the intent that tokens were requested
Request headers
Authorization Token
Responses
The request has succeeded
Body
The contact token identifier
The contact token value
The contact token expiration date
The amount requested to be spent
GET https://staging.crm.com/self-service/v1/contacts/33749faa-4ef0-426d-f9f0-83b91bf5ab3f/tokens HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "0b2f69e7-a9a6-2e6f-b1f2-0a643d9ca6b7",
"value": "123456",
"expiration": 1596714307
}
]
}
{id}
/identities{id}
/identities/{identity_id}
/change_username{id}
/identities/{identity_id}
/change_username{id}
/identities/{identity_id}
/change_password{id}
/identities{id}
/identitiesCreate a new identity for a contact
Path variables
The contact (identifier) whose a new identity will be created
Request headers
Authorization Token
Request body
The contact’s identity provider
The contact’s email, (required for email/password or email/OTP verification). If password is not provided then an OTP request is triggered.
The contact’s password (required if OTP is not supported)
The contact’s phone, (required for phone/password or phone/OTP verification). If password is not provided then an OTP request is triggered.
The phone country code
The phone number
Applicable if using Facebook credentials
The access token returned from the OAuth service provider (required for Facebook and Google authorisation)
Responses
The request has succeeded
Body
The contact identity identifier
POST https://sandbox.crm.com/self-service/v2/contacts/1a6a85ac-aacf-4175-8de2-a7d701186d96/identities HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"provider": "EMAIL",
"email": "johndoe@crm.com",
"password": "1123123rerwr"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "1a6a85ac-aacf-4175-8de2-a7d701186d96"
}
{id}
/identities/{identity_id}
/change_usernameRequest username change for a contact’s identity
Path variables
The contact (identifier) who requested to change username
The contact identity (identifier) that its username will be changed
Request headers
Authorization Token
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v2/contacts/ec23261f-cde9-0671-ec41-6db9acf4d9c5/identities/6627f691-461e-5754-7349-1680376b7bb1/change_username HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 204 No Content
{id}
/identities/{identity_id}
/change_usernameChanges the username for a contact’s identity
Path variables
The contact (identifier) who requested to change username
The contact identity (identifier) that its username will be changed
Request headers
Authorization Token
Request body
The (new) username that will be set (email or phone should be specified)
The contact’s (new) email that will be used as username
The contact’s (new) phone that will be used as username
The phone country code
The phone number
The contact’s (current) password that will be used for verification (required only if contact identity is password based)
The contact’s (temp) OTP that will be used for verification (required only if contact identity is OTP based)
Responses
The request has succeeded
Body
The one time password auth id
The obfuscated send method value
The request has succeeded
PUT https://sandbox.crm.com/self-service/v2/contacts/ec23261f-cde9-0671-ec41-6db9acf4d9c5/change_username HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"username": {
"email": "j_doe@crm.com"
},
"otp": "123456"
}
HTTP/1.1 200 OK
{id}
/identities/{identity_id}
/change_passwordChanges a contact’s password (contact should be already signed-in to an application in order to perform such action)
Path variables
The contact (identifier) whose password will be changed
The contact identity (identifier) which will be changed
Request headers
Authorization Token
Request body
The new password
Responses
The request has succeeded
PUT https://sandbox.crm.com/self-service/v2/contacts/0980af1d-3c24-6379-9eb9-a40e3a3f5208/identities/828a78b4-04a4-e6e6-5ba9-f9f3e668e3ac/change_password HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"password": "Crm.com1999!"
}
HTTP/1.1 204 No Content
{id}
/identitiesRetrieve a list of contact identities based on search criteria (e.g. all contact identities)
Path variables
The contact (identifier) whose identities 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
Responses
The request has succeeded
Body
The contact identity identifier
The contact identity type
The contact identity email (if supported)
The contact identity phone (if supported)
The phone country code
The phone number
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/contacts/939a41e4-2410-171b-2ae5-ee7fdc255d34/identities HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "5555acf1-5bed-eeac-e104-389fb053c34b",
"type": "PHONE_OTP",
"phone": {
"country_code": "CYP",
"number": "99000000"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Group of various operations that can be performed on a contact’s account. The account consolidates the contact’s financial transactions such as Invoice and Payments. A contact owns multiple accounts each account having a different currency. Per contact, there’s a single account marked as the primary one
{id}
/accounts{id}
/accounts{id}
/{id}
{id}
/journals{id}
/{id}
/accountsAdd a new account for an existing contact. If the contact has other accounts too, then the newly created account must use a different currency. Only one of the contact’s accounts can be set as the primary account.
Path variables
The contact identifier for which a new account will be added
Request headers
Authorization Token
Request body
If set to true, then the new account will be set as the primary one, thus removing the indictor from another account
The account’s classification identifier
The unique id of a contact address which will be set as the billing address of the account
Examples
Responses
The response succeeded
Body
The id of the newly created account
POST https://sandbox.crm.com/self-service/v1/contacts/4dc0809f-ed91-4b68-b912-5bd6064d901e/accounts HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"is_primary": "false",
"currency_code": "EUR",
"classification_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"billing_address_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
{id}
/accountsRetrieve a list of accounts for a Contact. Normally a contact will have a single account but multiple accounts can be used to service different currencies, or different spending profiles. All accounts of a contact are returned by default, including any terminated ones.
Path variables
The id of the contact whose accounts 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
If set to true, then only the primary account of the contact will get retrieved
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
Responses
The request has succeeded
Body
The unique identifier of the account
Identifies whether the account is the primary account of the contact
The account name
The account number
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)
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/contacts/4dc0809f-ed91-4b68-b912-5bd6064d901e/accounts HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
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"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/Retrieve details and financial information for an account
Path variables
The unique identification of the account to be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The account’s name
The account’s number
Indictes whether the account is the primary account for the contact
The account status
The account running balance
The account unpaid amount that is passed its due date
The account credit limit
The account payment terms
Payment terms unique identifier
Payment terms name
Details about the related classification
The classification identifier
The classification name
The address identifier
The address type
A short name allowing the address to be easily recognised in a list
The address line 1
The address line 2
The address state/provice/county
The address town/city
The address post code
The 3-char country code of the address
The address geolocation latitude
The address geolocation longitude
The Google textual identifier that uniquely identifies an address
GET https://sandbox.crm.com/self-service/v2/accounts/4dc0809f-ed91-4b68-b912-5bd6064d901e/ HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "John Smith AC00123456",
"number": "AC00123456",
"is_primary": "true",
"state": "ACTIVE",
"currency_code": "EUR",
"balance": 1.21,
"overdue_amount": 100.5,
"credit_limit": 100,
"payment_terms": {
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Net 7"
},
"classification": {
"id": "138318d2-ab1e-5443-ff49-5ef6a3f52873",
"name": "VIP"
},
"billing_address": {
"id": "8500c80c-1b67-b3c9-6a36-c00611093f58",
"address_type": "HOME",
"address_name": "My Home",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "Tower Star",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CYP",
"lat": 32.15,
"lon": 35.15,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
}
{id}
Update an existing account of a contact
Path variables
The account identifier that will be updated
Request headers
Authorization Token
Request body
If set to true, then the account will be set as the primary account of the contact
The account’s classification id
The unique id of a contact address which will be set as the billing address of the account
Responses
The response succeeded
Body
The account identifier
PUT https://sandbox.crm.com/self-service/v1/accounts/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"is_primary": "true",
"classification_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"billing_address_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
{id}
/journalsRetrieve a list of account journals. Only journals of Posted transactions are returned. By default, accounts journals of the last 12 months are retrieved.
Path variables
The account identifier whose journals will be retrieved
Request parameters
Filter journals based on the posted date, which may fall within a given date range, default is one year prior to today. 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. posted_on[gte]=1618395497&posted_on[lte]=1618395497).
Returns results where the posted date is greater than this value
Returns results where the posted date is greater than or equal to this value
Returns results where the posted date is less than this value
Returns results where the posted date is less then or equal to this value
Filter by journal type
Triggered by an order or an invoice, created to charge a Contact
Credits the account, e.g. for an invoice correction
A contact payment for an invoice or an external debit
Full or partial refund for a payment
Money returned to a contact’s account
Adds money to an account or wallet
Transfer of funds to another account/wallet of the same contact, or another contact’s account/wallet
Financial transaction manually created, crediting/debiting a contact’s account/wallet
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
Journal id
The number/code of the journal’s related financial transaction
Date journal was issued
Date journal was posted
Triggered by an order or an invoice, created to charge a Contact
Credits the account, e.g. for an invoice correction
A contact payment for an invoice or an external debit
Full or partial refund for a payment
Money returned to a contact’s account
Adds money to an account or wallet
Transfer of funds to another account/wallet of the same contact, or another contact’s account/wallet
Financial transaction manually created, crediting/debiting a contact’s account/wallet
Journal account type
Journal amount
Invoice related details, applicable for invoices only
Invoice due date
Invoice overdue amount
Invoice unpaid amount, i.e. invoice due date not yet reached
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/journals HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"number": "INV12659",
"issued_date": 1650436799,
"posted_date": 1651127996,
"transaction_type": "CARD",
"type": "DEBIT",
"currency_code": "EUR",
"amount": 84.99,
"invoice": {
"due_date": 1651074662,
"overdue_amount": 10.39,
"unpaid_amount": 4.5
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/Retrieve information and details lines for a single account journal
Path variables
The journal id to retrieve information for
Request parameters
Includes financial transation lines in response if set to True. By deault lines are not retireved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The journal identifier
The number/code of the journal entry
The date that the financial transaction was issued
Date of posting financial transaction
Invoice related details. applicabe only for Invoices
Date due for invoice payment
Invoice overdue amount i.e. due date exceeded
Invoice unpaid amount, i.e. invoice due date not yet reached
Total transaction net amount
Total transaction discount amount
Total transaction tax amount
Total amount before discounts
Transaction amount
The payment method’s details that include the contact’s payment method plus important information about the payment method. Applicable only for Cards, Accunt Debits and Wallet payment method types
Unique identifier of the payment method
A short description of the payment method. Depending on the payment method’s type different information is returned:
- Card: the brand, followed by the last 4 digits of the card plus expiration month/year
- Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
- Wallet: Name: Email and/or phone used on registration
Transaction line information
Product information
Product unique id
Product SKU
Product name
Product description
Product quantity
Unit price of produc
Net unit price
Product discount amount
Product tax amount
Financial transaction line sub total (amount before discount)
Applicable only when the line item includes a termed service and denotes the invoiced/credited period
Period start date
Period end date
GET https://sandbox.crm.com/self-service/v2/journals/4dc0809f-ed91-4b68-b912-5bd6064d901e/ HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "7156b6b0-ab00-46c8-8411-c515c20d4e19",
"number": "INV00123",
"issed_date": 1643611106,
"posted_date": 1646289507,
"currency_code": "EUR",
"invoice": {
"due_date": 1646116707,
"overdue_amount": 10.99,
"unpaid_amount": 53
},
"net": 103.59,
"discount": 1,
"tax": 13,
"sub_total": 103.59,
"total": 103.59,
"payment_method": {
"type": "CARD",
"identity": {
"id": "",
"identifier": "Visa ****1234"
}
},
"lines": [
{
"product": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "STB009342",
"name": "Set Top Box",
"description": "STB C800PA HD MPEG 4"
},
"quantity": 1,
"unit_price": 15.99,
"net": 14,
"discount": 1,
"tax": 1.32,
"sub_total": 15.99,
"period": {
"from": 1646116707,
"to": 1654065506
}
}
]
}
{id}
/intents{id}
/client_token{id}
/intentsSet up a new intent for a specific contact, the response will vary depending on the gateway type
Path variables
The contact identifier for which a Payment Intent will be set up
Notes
JCC Merchant returns data (app_id, client_app_key, scheme) necessary to use JCC Merchant services for submitting a card hash request
Request headers
Authorization Token
Request body
Legacy payment gateways
The id of the payment gateway plugin
The contact’s payment method
The amount to be paid
The payment’s currency. If not speified, then it defaults to the contact’s account currency
Details to add to the contact statement for the payment
Responses
The request has succeeded
Body
Payment intent’s client secret
A list of parameters that might be included in the payment intent. Applicable only for JCC Merchant gateway.
The name of the parameter
The value of the parameter
POST https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/intents HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"payment_gateway": "JCC",
"integration_id": "2BD9C84FA60F9FE407140E20F707726A",
"payment_method_id": "3BD9C84FA60F9FE407140E20F707726A",
"amount": 9.99,
"currency": "EUR",
"session_type": "ON_SESSION",
"capture": "ON_HOLD",
"reference": "032434333-11",
"statement_info": "Payment for Order O125435 - Date 01.01.2010",
"entity": {
"type": "INVOICE",
"id": ""
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"client_secret": "2BD9C84FA60F9FE407140E20F707726A",
"parameters": [
{
"key": "app_id",
"value": "0fe90e81-b943-7d66-8e09-d4a3a62674d9"
}
]
}
{id}
/client_tokenClient-side is responsible for generating a client token from the payment gateway. The client token includes configuration required for a successfull communication with the gateway, as well as authenticating and authorising the client to communicate with the gateway.
Path variables
Request parameters
Id of integration to be used
Responses
Body
Generated token
GET https://sandbox.crm.com/self-service/v1/contacts/{id}/client_token HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"client_token": ""
}
Confirms a payment in the payment gateway, with optional Account / Wallet id
Request body
Unique intent identifier from Intents API
The integration’s unique identifier
Action to be taken
roadmap
Responses
POST https://sandbox.crm.com/self-service/v1/payments HTTP/1.1
Content-Type: application/json
{
"integration_id": "",
"client_secret": "",
"account_id": "",
"wallet_id": ""
}
HTTP/1.1 201 Created
POST https://sandbox.crm.com/self-service/v1/payments HTTP/1.1
Content-Type: application/json
{
"integration_id": "",
"client_secret": "",
"account_id": "",
"wallet_id": ""
}
HTTP/1.1 201 Created
Retrieve the JCC Card Hosted Page
Request parameters
The action that should be performed in regards to payment method
The payment method identifier that will be affected
Request headers
Authorization Token
Responses
The request has succeeded
{id}
/rewards{id}
/reward_schemes{id}
/rewards/balances{id}
/rewardsRetrieve a contact’s reward details
Path variables
The contact (identifier) whose rewards details should be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
Details about contact first sign up to rewards
The date when the contact was signed up for the first time
Details about whether the contact can spend or not
Defines whether the contact can spend or not
The date that the spend blocked status was updated
Information about the signed up reward schemes
The reward scheme identifier
The reward scheme name
The date when the contact was signed up on the specific reward scheme
The email address that was used during sign up (applicable if the reward scheme is a close loop scheme based on email domains)
Information about the reward tier
The tier identifier
The tier name
The tier (marketing) color
The date that the tier was reached
The value units collected during the current period
The lifetime (total) value units collected overall
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Details on how to maintain the current tier
The number of value units needed to maintain current tier
The date up to which value units must be collected by in order to maintain the current tier
Details about the next tier progression
The next tier identifier
The next tier name
The value units needed to progress to next tier
The date up to which points must be collected in order to progress to next tier
GET https://sandbox.crm.com/self-service/v2/contacts/72f02951-264d-a380-1899-05c06569aff3/rewards HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"signed_up": {
"date": 1647852771
},
"spend_blocked": {
"status": "true",
"date": 1647605852
},
"reward_schemes": [
{
"id": "0b01295f-ce8c-29f3-b00a-a22969f6cd72",
"name": "CRMdotCOM Scheme",
"signed_up_on": 1583846865,
"email_address": "johndoe@crm.com"
}
],
"reward_tier": {
"id": "6883441e-194a-b92b-c6c0-2f0e869e4c65",
"name": "Red",
"color": "#d4af37",
"achieved_date": 1615996441,
"period_value_units": 2000,
"lifetime_value_units": 12543,
"maintain_tier": {
"points_needed": 200,
"collected_by": 1615996441
},
"progress": {
"id": "6883441e-194a-b92b-c6c0-2f0e869e4c65",
"name": "Gold",
"points_needed": "1400",
"collected_by": 1615996441
},
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "ATTACHMENT",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
}
{id}
/reward_schemesSign up/out a contact from/to a reward scheme
Path variables
The contact (identifier) that will be signed up/out to/from a reward scheme
Notes
- Signing up to a self sign-up reward scheme requires the SIGN_UP action and Reward Scheme attributes.
- Signing out from a self sign-up reward scheme requires the SIGN_OUT action and Reward Scheme attributes.
- Request to sign up to a closed loop reward scheme based on specific email domains should be made via the Contact Reward Schemes Actions API, providing the SIGN_UP action, the Reward Scheme and Email Address attributes.
- Any requests made for signing up such reward schemes should be verified via Closed Loop Sign Up Verification API.
- Signing out from a closed loop reward scheme requires the SIGN_OUT action and Reward Scheme attributes.
Request headers
Authorization Token
Request body
The action that should be applied for the reward scheme
Request to sign-up to a scheme
Request to sign-off from a scheme
The reward scheme that the contact has signed up/out
The email address of the contact requestng to sign uo to a reward scheme based on supported domains
The code that will verify that the contact is allowed to sign up to a closed loop reward scheme
Examples
Responses
The request has succeeded
Body
The reward scheme identifier
The request has succeeded
Sign up to a reward scheme of type self-sign up
POST https://sandbox.crm.com/self-service/v2/contacts/4d5fc8ea-5bc4-5c25-d557-a531da3e9193/reward_schemes HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNUP",
"reward_scheme_id": "835bbd30-917e-526f-aea4-33cacfb61903"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Sign out from a reward scheme
POST https://sandbox.crm.com/self-service/v2/contacts/4d5fc8ea-5bc4-5c25-d557-a531da3e9193/reward_schemes HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNOUT",
"reward_scheme_id": "835bbd30-917e-526f-aea4-33cacfb61903"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Sign up to a reward scheme of type closed loop based on email address
POST https://sandbox.crm.com/self-service/v2/contacts/4d5fc8ea-5bc4-5c25-d557-a531da3e9193/reward_schemes HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNUP",
"reward_scheme_id": "835bbd30-917e-526f-aea4-33cacfb61903",
"email_address": "johndoe@crm.com"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "51b9e2ca-44db-5a6f-769c-5c4fa21ba8f9"
}
Verify a contact’s request to sign up to a closed loop reward scheme
Notes
- Request to sign up to a closed loop reward scheme based on specific email domains should be made via the ‘Contact Reward Schemes Actions’ API, providing the SIGN_UP action, the Reward Scheme and Email Address attributes.
- Any requests made for signing up such reward schemes should be verified via ‘Closed Loop Sign Up Verification’ API.
Request parameters
The code that will verify that the customer is allowed to sign up to a closed loop reward scheme based on email domains
Responses
The request has succeeded
Body
An HTML based landing page is returned and rendered
GET https://sandbox.crm.com/self-service/v1/contacts/verify_sign_up?sign_up_code=SUC1234 HTTP/1.1
HTTP/1.1 200 OK
{id}
/rewards/balancesRetrieve a contact’s reward award/spend balances
Path variables
The contact (identifier) whose rewards balances should be retrieved
Request parameters
Filter total awards/spends based on period
Any amount attributes will be filtered based on the current day
Any amount attributes will be filtered based on the current week
Any amount attributes will be filtered based on the current month
Any amount attributes will be filtered based on the current year
Any amount attributes will be filtered based on the registration date
Request headers
Authorization Token
Responses
The request has succeeded
Body
The contact’s total awarded amount
The contact’s total redeemed amount
The contact’s total spent amount
GET https://sandbox.crm.com/self-service/v2/contacts/72f02951-264d-a380-1899-05c06569aff3/rewards/balances HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"award": "123.23",
"redeem": "23.02",
"spend": "43.56"
}
{id}
/purchases{id}
/purchasesRetrieve a list of contact’s purchase events based on search criteria (e.g. all purchases)
Path variables
The contact (identifier) for which purchase events should be returned
Request parameters
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
Filter based on whether purchases have an ad hoc return was applied on them
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 purchase event identifier
The purchase event reference number
The purchase event state
The unique identifier of the payment medium used on the purchase (e.g. a credit card’s first 6 digits)
The net amount of the retrieved purchase event
The total net amount (all products’ net amount or total transaction net amount)
The total tax amount (all products’ tax amount or total transaction tax amount)
The purchase’s discount amount
The purchase’s total amount (net + tax) after discount
Details about spend request for a specific amount (as requested by contact)
The requested spend amount
The date that the purchase event was performed
Details about customer event classification
The event classification identifier
The event classification name
Details about the pass redeemd on purchase
The pass identifier
The pass code
Information about the organisation that owns the reward offer
The organisation identifier
The organisation name
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information about the organisation that owns the reward offer
The organisation identifier
The organisation name
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information about ad hoc return of goods
The ad hoc return reference number
The date that ad hoc retun of goods was applied
The amount that the customer was debited due to ad hoc return of goods
The amount that was returned
Details about rewards
The award amount
The redeem amount
The spend amount
Details about applied fees
The total fee amount (sum of all fee amounts)
The fee that was applied on awards (credit wallet)
The fee that was applied on spends (credit wallet)
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/contacts/2194281e-f804-c0f7-757d-d66cb133caa0/purchases HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "b4e01c67-4921-b5e1-36a6-8effb92dbd5a",
"reference_number": "0012345",
"state": "POSTED",
"payment_medium_identifier": "424242",
"transaction_amounts": {
"net": 1,
"tax": 0.5,
"discount": 0.5,
"total": 1
},
"spent_request": {
"amount": 2.96
},
"date": 1572534147,
"classification": {
"id": "18670ca7-0bc4-45d7-8464-91afab817bbe",
"name": "Delivery"
},
"pass": {
"id": "89136fa9-0dc9-451d-833a-d22bf9d8b947",
"code": "13456789"
},
"organisation": {
"id": "716906be-d716-99b4-1eb0-afdd88a25a55",
"name": "CRMdotCOM Nicosia",
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
},
"parent_organisation": {
"id": "716906be-d716-99b4-1eb0-afdd88a25a55",
"name": "CRMdotCOM Nicosia",
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "LOGO",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
"rewards": {
"award": 121.99,
"redeem": 12.22,
"spend": 2.22
},
"fees": {
"total": 1.99,
"credit_fee": 0.98,
"debit_fee": 1.01
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Reclaim a purchase customer event to a contact
Notes
QR CODE FORMAT
QR Code should include the following attributes (order is important & should be semicolon separated)
- receipt number
- merchant number
- venue number
- purchase amount (x100)
Scanning a QR Code, the app should interpret such attributes and call ‘POST purchases/reclaim’ as follows
- receipt_code = receipt number (mapped to CRM’s purchase id)
- merchant_tap_code = merchant number (if provided)
- venue_tap_code = venue number (if provided)
- total_amount = purchase amount / 100
BARCODE FORMAT
Barcode should include the following attributes (order is important & should be semicolon separated)
- merchant number
- receipt number
- purchase amount (x100)
- venue number
Scanning a Barcode, the app should interpret such attributes and call ‘POST purchases/reclaim’ as follows
- receipt_code = receipt number (mapped to CRM’s purchase id)
- merchant_tap_code = merchant number
- venue_tap_code = venue number (if provided)
- total_amount = purchase amount / 100
Request headers
Authorization Token
Request body
The receipt code (receipt number) that identifies the purchase (purchase id)
Details about the organisation that submitted such purchase
Details about merchant tap
The tap code
Details about venue tap
The tap code
Details about purchase amounts
The purchase total amount
The human readable code that a contact can reclaim a purchase event
Responses
Body
The purchase event identifier that was claimed (claim purchase)
The request has succeeded
Body
The purchase event identifier that was created (self-submit purchase)
The request has succeeded
POST https://sandbox.crm.com/self-service/v2/purchases/reclaim HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"id": "sdfsdfsdf4-43-r-few-f-wf-r3443;1234",
"organisation": {
"merchant_tap": {
"code": "MT001"
},
"venue_tap": {
"code": "VT001"
}
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "f248292d-2950-2175-851a-9be073b71c5b"
}
POST https://sandbox.crm.com/self-service/v2/purchases/reclaim HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"organisation": {
"venue_tap": {
"code": "VT001"
}
},
"transaction_amounts": {
"total": 1.99
}
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "f248292d-2950-2175-851a-9be073b71c5b"
}
POST https://sandbox.crm.com/self-service/v2/purchases/reclaim HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"id": "sdfsdfsdf4-43-r-few-f-wf-r3443;1234",
"organisation": {
"merchant_tap": {
"code": "MT001"
},
"venue_tap": {
"code": "VT001"
}
}
}
HTTP/1.1 204 No Content
Create a referral customer event
Request headers
Authorization Token
Request body
The referral code
Responses
The request has succeeded
Body
The customer event identifier
POST https://sandbox.crm.com/self-service/v2/referrals HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"code": "REF123"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "fe7bcab9-59cf-4906-a100-482396f5bf3f"
}
Perform referral actions, such as send referrals to contacts inviting them to sign up to a business and in return to award their referred by contact
Request headers
Authorization Token
Request body
Defines the referral action to be performed
The email address or phone numbers that referrals will be sent to (applicable if action = SEND)
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v2/referrals/actions HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SEND",
"recipients": [
"0035722265566"
]
}
HTTP/1.1 204 No Content
Returns an estimation on whether the customer is allowed to consume usage allowance and if yes, the remainng one.
Request headers
Authorization Token
Request body
The contact (identifier) that will be authorised
Responses
Body
The estimation identifier
The currency code used in usage allowance cash amount limits
POST https://sandbox.crm.com/self-service/v1/estimates/allowance HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"contact_id": "ba48e7d3-d00a-0d28-4f9f-02b1a5b226bc",
"product_id": "",
"service": {
"id": "",
"classification": "ONE_TIME_SERVICE"
},
"organisation_id": "2f2a7993-6bbb-bd77-cbc8-8a2a774ef4f2",
"cash_amount": 1,
"currency_code": "",
"usage_amount": 1
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"estimation_id": "",
"services": [
{
"authorise_consumption": true,
"currency_code": "EUR",
"service": {
"id": "",
"classification": "ONE_TIME",
"product": {
"id": "",
"sku": "",
"name": ""
}
},
"accumulated_allowance": {
"cash_amounts": {
"per_transaction": 9.99,
"per_day": 19.99,
"per_billing_cycle": 59.99
}
},
"products_allowance": [
{
"item_type": "PRODUCT",
"item_id": "",
"name": "",
"remaining_cash": {
"per_transaction": 9.99,
"per_day": 19.99,
"per_billing_cycle": 59.99
},
"remaining_usage": {
"per_transaction": 9.99,
"per_day": 19.99,
"per_billing_cycle": 59.99
},
"measurement_unit": {
"id": "",
"name": "",
"dsiplay_name": ""
}
}
]
}
]
}
Returns an estimation of a customer’s upcoming billing
Request headers
Authorization Token
The publishable api key for application identification
Request body
Responses
Body
POST https://sandbox.crm.com/self-service/v1/estimates/billing HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"contact_id": "",
"account_id": "",
"as_of_date": 1234567,
"upcoming_billing_cycles": 3
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"billing_estimate": [
{
"billing_date": 12345678,
"billed_period": {
"from_date": 12345678,
"to_date": 12345678
},
"account": {
"id": "",
"number": "",
"name": ""
},
"totals": {
"total_amount": 9.99,
"tax_amount": 1.99,
"net_amount": 1.99,
"discount_amount": 1.99
},
"invoicing": [
{
"issued_date": 123456789,
"due_date": 123456789,
"currency_code": "EUR",
"is_credit": true,
"wallet_funds_amount": 5.99,
"total_net_amount": 1,
"total_discount_amount": 1,
"total_discount_incl_tax": 1,
"total_tax_amount": 0.99,
"total_price": 1,
"total_amount": 9.99,
"amount_due": "",
"amount_to_collect": 1,
"taxes_breakdown": [
{
"tax_amount": 0.99,
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"line_items": [
{
"quantity": 1,
"unit_price": 9.99,
"net_amount": 9.99,
"discount_amount": 1,
"sub_total": 9.99,
"pricing": 11.99,
"product": {
"id": "ba603bdc-f18f-1d4e-dd07-ad6b57c6e565",
"sku": "DEC1234",
"name": "Decoder",
"classification": "TRACEABLE_PHYSICAL_GOOD"
},
"discount": {
"discount_amount": 0.96,
"discount_percentage": 1.5,
"discount_incl_tax": 0.98
},
"applied_taxes": [
{
"tax_amount": 0.99,
"tax_exempt_reason": "CONTACT",
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"bundle_product": {
"id": "31f2e99d-a5cb-21c1-2866-1a1491989893",
"sku": "ICL-001",
"name": "Iced Latte",
"classification": "TRACEABLE_PHYSICAL_GOOD"
}
}
]
}
]
}
]
}
Returns an estimation of how much a customer will pay when purchasing a product. The estimation includes not just the product’s final price, but also various detailed amounts on how the estimated cost is calculated
Request headers
The publishable api key for application identification
Request body
The account identifier
The product identifier
The bundle product identifier
The quantity of the related item line
The price of the related item line
The discount of the related item line
The discount option of the related item line
The tax model of the related item line
Responses
Body
Sum of all product prices as these are defined in the product catalog
POST https://sandbox.crm.com/self-service/v1/estimates/invoicing HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"account_id": "be091e01-1842-4a2a-a1ae-e7c2f5343867",
"line_items": [
{
"product_id": "be091e01-1842-4a2a-a1ae-e7c2f5343867",
"bundle_product_id": "be091e01-1842-4a2a-a1ae-e7c2f5343867",
"quantity": 1,
"price": 9.99,
"discount_value": 1,
"discount_option": "PERCENTAGE",
"tax_model": "TAX_EXCLUSIVE"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"issued_date": 123456789,
"due_date": 123456789,
"currency_code": "EUR",
"is_credit": true,
"wallet_funds_amount": 5.99,
"total_net_amount": 1,
"total_discount_amount": 1,
"total_discount_incl_tax": 1,
"total_tax_amount": 0.99,
"total_amount": 9.99,
"amount_due": "",
"amount_to_collect": 1,
"taxes_breakdown": [
{
"tax_amount": 0.99,
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"line_items": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "",
"name": "",
"tax_model": "TAX_INCLUSIVE",
"rate_model": "TIERED",
"quantity": 1,
"unit_price": 9.99,
"price_incl_tax": 11.99,
"net_amount": 9.99,
"discount": {
"discount_amount": 0.96,
"discount_percentage": 1.5,
"discount_incl_tax": 0.98
},
"tax_amount": 0.99,
"sub_total": 9.99,
"classification": "",
"applied_taxes": [
{
"tax_amount": 0.99,
"tax_exempt_reason": "CONTACT",
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
]
}
]
}
Preview order fulfillment information
Notes
Integrating an order flow the following APIs should be called The following APIs should be called in order to make an order
Request headers
Authorization Token
Request body
Defines the order’ supply method
Preview order only for open venues
Preview order based on the postal code
Preview order based on the geo-location (lat/long)
Preview order based on the customer address
Preview order based on a specific organisation as requested by the customer
Preview order based on the date and time at which the customer requests the ordered items to be delivered/picked-uo (Applicable only for ordering ahead/scheduling an order)
The order ahead time
The order ahead time unit
The order ahead date
Responses
The request has succeeded
Body
Details about the organisation (business/merchant/venues) that will fulfill the order
The organisation identifier
The organisation name
The organisation phone number
The address line 1
The address line 2
The address county/state/province
The address city
The address postal code
The country code of the address
The latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies an address
Details about the parent organisation (business/merchant) of the fulfilled by. Not applicable if the fulfilled by organisation is of type business or merchant
The organisation identifier
The organisation name
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
The payment methods applicable for the fulfilled by organisation
[
"CASH","CARD"
]
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
POST https://sandbox.crm.com/self-service/v1/estimates/order_fulfillment HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"supply_method": "DIRECT_SALE",
"is_open": true,
"postal_code": "2415",
"lat_lot": "35.157204,33.314151",
"address_id": "28441e3e-767a-b6cc-9a59-6d7705de6428",
"requested_organisation_id": "4456e728-019c-86e4-3e4f-bb7920e2ef75",
"requested_delivery_at": {
"time": 30,
"time_unit": "MINUTES",
"date": 12312323123
}
}
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"fulfilled_by": {
"id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Best Burger Egkomi",
"phone": "+6934222321",
"address": {
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "Tower Star",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CYP",
"lat": 32.15,
"lon": 35.15,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
},
"parent_organisation": {
"id": "b1607c37-e750-2324-ac49-6591a86f54b8",
"name": "Best Burger",
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"usage_type": "LOGO",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
},
"payment_method_types": [
"PENDING"
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"usage_type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
}
]
Preview order information before making an order including fulfillment and invoice estimations
Notes
Integrating an order flow the following APIs should be called The following APIs should be called in order to make an order
Request headers
Authorization Token
The publishable api key for application identification
Request body
The account identifier that will place the order (if not specified, then order estimates and prices will be based on currency or business base/default currency)
The currency code that order estimation will be based on (if not specified, then order estimates and prices will be based on business base/default currency)
Defines the order’ supply method
Details about the requested delivery time
The contact’s existing address that order will be delivered (required for DELIVERY orders, semi-optional with currect location)
Details about the address
The address line 1
The address line 2
The address state/province/county
The address town/city
The address postal code
The address country code
The address geolocation latitude
The address geolocation longtitude
The address unique Google identifier
Additional order notes
Defines whether available wallet funds should be used or not
The requested wallet funds amount to use
Defines the desired payment method for order
The unique identifier of the product to be ordered
Applicable and required only for termed and one-time services. If product has a single price then it is not required.
Applicable only when adding a service components in a flexible service bundle
Responses
The request has succeeded
Body
Indicates whether minimum order amount is met and order can proceed with submission.
Defines the minimum order amount as specified in the fulfillment policy of the organisation fulfilling the order.
Sum of all product prices as these are defined in the product catalog
Sum of all product prices as these are defined in the product catalog
POST https://sandbox.crm.com/self-service/v1/estimates/orders HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"account_id": "1bd3e4d3-5981-209b-787d-352dcd5389a3",
"supply_method": "DELIVERY",
"fulfilled_by": "",
"requested_delivery_at": {
"time": 30,
"time_unit": "MINUTES",
"date": 12312323123
},
"address_id": "84bfd840-b520-5bde-8f0a-b36937a2fce7",
"current_location": {
"address_line_1": "17 Baker Str",
"address_line_2": "",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "12462",
"country_code": "GR",
"lat": 12.345,
"lon": 11.452,
"googlePlaceId": "123ewd23rwe23w"
},
"notes": "Sample Notes",
"use_wallet_funds": "false",
"payment_method_type": "CARD",
"line_items": [
{
"id": "7f45ad8a-b164-2a67-eb93-8651c0f1b101",
"quantity": 1,
"price": 2.99,
"tax_model": "TAX_INCLUSIVE",
"notes": "",
"price_term_id": "",
"components": [
{
"id": "6e111025-002b-48d7-a675-6d9e48070b8f",
"quantity": 1,
"price": 0.5,
"tax_model": "TAX_INCLUSIVE"
}
]
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "",
"order_estimate": {
"ordering_allowed": "true",
"minimum_amount": 5,
"fulfilled_by": {
"id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Bro Burgers"
},
"estimated_delivery": {
"time_to_deliver": 1,
"uot": "minutes",
"delivered_at": 12345565
}
},
"invoice_estimate": {
"issued_date": 123456789,
"due_date": 123456789,
"currency": "EUR",
"total_net_amount": 1,
"total_discount_amount": 1,
"total_tax_amount": 0.99,
"total_amount": 9.99,
"wallet_funds_amount": 11.99,
"amount_due": 9.99,
"taxes_breakdown": [
{
"tax_amount": 0.99,
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"line_items": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "",
"name": "",
"tax_model": "TAX_INCLUSIVE",
"rate_model": "TIERED",
"quantity": 1,
"unit_price": 9.99,
"net_amount": 9.99,
"discount_amount": 0.1,
"tax_amount": 0.99,
"sub_total": 9.99,
"applied_promotions": [
{
"discount_value": 0.1,
"discount_type": "AMOUNT",
"discount_amount": 0.1,
"promotion": {
"id": "0b551184-aa37-43af-646f-a40d9da017a8",
"name": ""
}
}
],
"applied_taxes": [
{
"tax_amount": 0.99,
"tax_exempt_reason": "CONTACT",
"tax_rate": {
"id": "0b551184-aa37-43af-646f-a40d9da017a8",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
]
}
]
},
"service_delivery_estimate": [
{
"action_allowed": true,
"allowed_execution_on": 12345678,
"next_billing_date": 1235678,
"next_payment_date": 12345678,
"subscription": {
"life_cycle_state": "ACTIVE",
"terms": {
"billing_period": {
"duration": 1,
"uot": "MONTHS"
},
"billing_day": {
"day_of_month": 5,
"day_of_week": "MONDAY"
}
}
},
"services_to_add": [
{
"life_cycle_state": "EFFECTIVE",
"product": {
"id": "",
"sku": "",
"name": ""
},
"trial_period": {
"starts_on": 12345678,
"ends_on": 12345678
},
"dependencies": [
{
"item_type": "",
"item_id": "",
"item_name": ""
}
]
}
],
"billing_estimate": {
"billing_date": 12345678,
"billed_period": {
"from_date": 12345678,
"to_date": 12345678
},
"totals": {
"total_amount": 9.99,
"tax_amount": 1.99,
"net_amount": 1.99,
"discount_amount": 1.99
},
"invoicing": [
{
"issue_date": 123456,
"due_date": 123456,
"currency": "EUR",
"is_credit": true,
"total_net_amount": 1,
"total_discount_amount": 1,
"total_tax_amount": 0.99,
"total_amount": 9.99,
"taxes_breakdown": [
{
"tax_amount": 0.99,
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"line_items": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "",
"name": "",
"tax_model": "TAX_INCLUSIVE",
"rate_model": "TIERED",
"quantity": 1,
"unit_price": 9.99,
"net_amount": 9.99,
"discount_amount": 0.1,
"tax_amount": 0.99,
"sub_total": 9.9,
"applied_taxes": [
{
"tax_amount": 0.99,
"tax_exempt_reason": "CONTACT",
"tax_rate": {
"id": "0b551184-aa37-43af-646f-a40d9da017a8",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
]
}
]
}
]
}
}
]
}
Request headers
The publishable api key for application identification
Responses
Body
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
Returns an estimation of change(s) perfromed on a subscription service, without making the actual change. The estimation is based on the service to which the contact Is alreayd subscribed to plus any requested changes. The estiimation returns:
- Whether the change can be performed or not
- Where the change will be performed immediately or it should be scheduled
- What changes on the contact’s list of services
- How the contact’s billing is affected by presenting the contact’s next billing information.
Request headers
Authorization Token
The publishable api key for application identification
Request body
The action that the contact wants to perofrm on one or more services
Applicable and required when changing the terms of a service
The contact’s identifier. Either a contact or an organisation can be set
The orgnaisation that owns the subscription. Either a contact or an organisation can be set
The account of the subscriber against which the subscirpiton’s billing transactions are posted.
The subscription that groups the services based on their billing cycle.
The date on which the subscriber wants to make the change. This date cannot be set in the past
["id1"]
Responses
Body
Estimation on how the subscriber’s billing would be affected because of the requested change
When the requested change will be billed
How the subscription’s billing cycle is affected
The next billing cycle’s start dtae
The end date of the updated billing cycle
Total amounts of the estimated bill
Total amount of the upcoming bill
Total taxed
Total net
Total discount
Sum of all product prices as these are defined in the product catalog
POST https://sandbox.crm.com/self-service/v2/estimates/service_delivery HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"action": "CHANGE",
"classification_code": "OPT_IN_RENEWALS",
"contact_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"organisation_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"account_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"subscription_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"scheduled_date": 1663619241,
"subscription_term_changes": {
"billing_day": {
"day_of_month": 1,
"day_of_week": "MONDAY"
},
"payment_method_id": "",
"funding_source": "WALLET"
},
"services_to_add": [
{
"product_id": "",
"price_terms_id": "",
"quantity": "",
"components": [
{
"product_id": "",
"price_terms_id": ""
}
]
}
],
"services_to_remove": [
{
"id": ""
}
],
"services_to_change": [
{
"from_service_id": "",
"to_service_product_id": "",
"to_price_terms_id": "",
"quantity": "",
"components": [
{
"product_id": "",
"price_terms_id": ""
}
]
}
],
"service_term_changes": [
{
"service_id": "",
"auto_renewal_preference": "OPT_IN, OPT_OUT",
"contract_preference": "",
"extend_by": {
"period": "",
"uot": ""
}
}
]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"service_delivery_estimate": [
{
"action_allowed": true,
"allowed_execution_on": 12345678,
"next_billing_date": 1235678,
"next_payment_date": 12345678,
"subscription": {
"state": "CHURNED",
"terms": {
"billing_period": {
"duration": 1,
"uot": "MONTHS"
},
"billing_day": {
"day_of_month": 5,
"day_of_week": "MONDAY"
}
}
},
"services_to_add": [
{
"state": "DRAFT",
"product": {
"id": "",
"sku": "",
"name": ""
},
"trial_period": {
"starts_on": 12345678,
"ends_on": 12345678
}
}
],
"services_to_remove": [
{
"id": "",
"state": "CANCELLED",
"product": {
"id": "",
"sku": "",
"name": ""
}
}
],
"services_to_change": [
{
"id": "",
"state": "SWAPPED",
"product": {
"id": "",
"sku": "",
"name": ""
},
"change_to_product": {
"id": "",
"sku": "",
"name": ""
}
}
],
"billing_estimate": {
"billing_date": 1663619524,
"billed_period": {
"from_date": 1663619524,
"to_date": 1663619559
},
"totals": {
"total": 9.99,
"tax": 1.99,
"net": 1.99,
"discount": 1.99,
"account_funds": 1
},
"invoicing": [
{
"issued_date": 123456789,
"due_date": 123456789,
"currency_code": "EUR",
"is_credit": true,
"wallet_funds_amount": 5.99,
"total_net_amount": 1,
"total_discount_amount": 1,
"total_discount_incl_tax": 1,
"total_tax_amount": 0.99,
"total_amount": 9.99,
"total_price": 1,
"amount_due": "",
"amount_to_collect": 1,
"taxes_breakdown": [
{
"tax_amount": 0.99,
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"line_items": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "",
"name": "",
"tax_model": "TAX_INCLUSIVE",
"rate_model": "TIERED",
"quantity": 1,
"price": 11.99,
"unit_price": 9.99,
"net_amount": 9.99,
"discount": {
"discount_amount": 0.96,
"discount_percentage": 1.5,
"discount_incl_tax": 0.98
},
"tax_amount": 0.99,
"sub_total": 9.99,
"classification": "",
"applied_taxes": [
{
"tax_amount": 0.99,
"tax_exempt_reason": "CONTACT",
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
]
}
]
}
]
}
}
]
}
Retrieval of a web page which serves as the entry point for a website or a particular section of a website.
{id}
{id}
Retrieve the requested landing page (including details and design)
Path variables
The landing page (identifier) that will be retrieved
Responses
Body
The landing page name
The default (live) public key of the organisation
The landing page description
The landing page type
For contact registration
For purchasing a gift pass
The link that the landing page is housed under
Defines whether this landing page is associated with the mobile pass card functionality
Pass plan id - in cases where ‘type’ = PURCHASE_PASS (i.e. the landing page is used for purchasing a gift pass)
The text in the header
The text in the title
The text in the description section
The footer text
The text to be displayed on the button
The success message to be displayed on the success response page
The failure message to be displayed on the failure response page
Defines whether the logo image will be positioned
The landing page components coloring
The landing page component that the color will be applied
The color code (hex code value)
The landing page images opacity
The image type
The opacity percentage
Defines the landing page form fields
The field property
The field label
The field priority (order)
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
GET https://sandbox.crm.com/self-service/v2/landing_pages/7ef05827-11d6-f1ac-8f17-234387157322 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "My loyalty pass enrolment form",
"public_key": "sdf3ref32rwerf324r134rw23rfd32r23r23r32r",
"description": "Enrolment landing page for mobile pass cards.",
"type": "REGISTER",
"link": "https://abc.com",
"mobile_pass": true,
"pass_plan_id": "5f1316d2-dfce-42f0-b7bf-c543b8df7702",
"form": {
"header": "This is a header",
"title": "Enrolment form",
"description": "Please enter detail to enrol for mobile pass cards.",
"footer": "Please sign up",
"button": "Submit",
"success": "Congratulations!",
"fail": "Failed.",
"logo_img_position": "CENTER",
"colors": [
{
"type": "HEADER",
"value": "FSR4ER"
}
],
"opacity": [
{
"image": "BACKGROUND",
"value": 1
}
],
"fields": [
{
"property": "contact.email",
"label": "email",
"priority": "1 , 2 , 3"
}
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "BACKGROUND",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
}
All Api’s associated to Mobile Pass Cards
{org_id}
/contacts/{contact_id}
{org_id}
/contacts/{contact_id}
{org_id}
/contacts/{contact_id}
{org_id}
/contacts/{contact_id}
Retrieve a contact’s mobile pass for Apple wallet
Path variables
The organisation (identifier) that the wallet pass is for
The contact (identifier) that the wallet pass is for
Responses
The request has succeeded
Body
Returns a PK pass file.
{org_id}
/contacts/{contact_id}
Retrieve a contact’s mobile pass for Google wallet
Path variables
The organisation (identifier) that the wallet pass is for
The contact (identifier) that the wallet pass is for
Responses
The request has succeeded
Body
{org_id}
/contacts/{contact_id}
Retrieve a contact’s mobile pass for (alternative) Android wallet
Path variables
The organisation (identifier) that the wallet pass is for
The contact (identifier) that the wallet pass is for
Responses
The request has succeeded
Body
Group containing Orders Web APIs
{id}
{id}
/orders{id}
/actionsCreates a new Order for a contact based on an order’s estimation which was previously obtained by POST /estimates/orders
Notes
Integrating an order flow the following APIs should be called The following APIs should be called in order to make an order
Request headers
Authorization Token
Request body
The estimation_id as this is returned back by the estimates/order Web API
General order notes
Defines whether available wallet funds can be used on the order total amount. If wallet funds do not cover the entire order amount, then payment method will be used
At least one payment method must be specified. Multiple payment can be specified if the contact selects to pay using one of the allowed payment methods and additionally consume some of the available funds of the CRM Wallet.
The payment method that was selected for this order. Applicable and required only when contact selected to pay using one of the registered contact payment methods.
The token that payment will be processed
The payment amount
The custom field’s unique key
The custom field’s value
Responses
Body
The identifier of the new Order
The Order’s number
The organisation that will fulfill the Order
The organisation’s identifer
The name of the organisation
The organisation’s phone number
Details about the address
The address line 1
The address line 2
The address state/province/county
The address town/city
The address postal code
The address country code
The address geolocation latitude
The address geolocation longtitude
The address unique Google identifier
An estimation of the delivery time
TIme to deliver
Unit of time
The actual delivery time
POST https://sandbox.crm.com/self-service/v2/orders HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"estimation_id": "37b56acf-665c-1112-93fc-163b3639bcbe",
"notes": "Lorem Ipsum",
"use_wallet_funds": "true",
"payments": [
{
"payment_method_type": "CARD",
"payment_method_id": "37b56acf-665c-1112-93fc-163b3639bcbe",
"payment_token": "paytoken12344",
"amount": 112.12
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"number": "O000001",
"fulfilled_by": {
"id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Bro Burgers",
"phone": "+6934222321",
"address": {
"address_line_1": "17 Baker Str",
"address_line_2": "",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "12462",
"country_code": "GR",
"lat": 12.345,
"lon": 11.452,
"googlePlaceId": "123ewd23rwe23w"
}
},
"estimated_delivery_time": {
"time_to_deliver": 30,
"uot": "MINUTES",
"delivery_at": 1668264138
}
}
{id}
Retrieves detailed information for a specific order
Path variables
The order (identifier) that will be retrieved
Request headers
Authorization Token
Responses
Body
Order identifier
Order number
Defines the order’ supply method
The order’s life cycle state
Order’s stage
Stage identifier
Stage name
Shows the contact’s favorite Order
The order general notes
Total net amount of the order
Total discount amount applied on this Order (includes Ad-Hoc discount as well)
Discount amount. This amount does not include taxes.
Discount amount including tax
Total taxed amount
Total cost before applying the discount, if any. Tax amoutn is included
Total cost of the Order, i.e the amount that the contact should pay
Total amount that the contact still hase to pay in order to fully pay off the Order. This implies that contact might already made some payments.
The organisation that fulfills th eOrder
The organisation’s identifer
The name of the organisation
The organisation’s phone number
Details about the address
The address line 1
The address line 2
The address state/province/county
The address town/city
The address postal code
The address country code
The address geolocation latitude
The address geolocation longtitude
The address unique Google identifier
The address line 1
The address line 2
The address county/state/province
The address city
The address postal code
The country code of the address
The latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies an address
Details about the category
The category identifier
The category name
Order’s key dates
Submitted date
Estimated completion date
Completion date
Cancellation date
Date on which order is requested to be delivered
Order’s progress started date
Reason for cancelling the Order
Cancellation reason identifier
Cancellation reason name
List of Ordered items
Order item identifier
Ordered quantity
Notes
The unit price charged for this product in the order (excluding tax)
Discount applied
Applied discount without tax
Discount including tax
The item’s sub-total before applying the discount, if any. Tax amont is included
The order item’s sub-total
Ordered product
Product identifier
Product SKU
Product name
Product descripption
Price terms applicable only when ordering termed or one-time services
Price identifier
Billing period
Duration
Unit of time
Service is auto-renewed or not
Termed period’s number of billing cycles
Service’s contract period
Duration
Unit of time
Service trial period
Duration
Unit of time
Billing model
Components ordered when placing the order. Applicable for flexible bundles and products with modifiers
Product identifier
Product SKU
Product name
Ordered queantity for the component
Component’s price
The price of the component before applying the discount, if any. Tax amount is included
Total amount for the ordered component
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
List of payment submitted for this Order.
When the payment was posted
Payment’s amount
The payment method’s details that include the contact’s payment method plus important information about the payment method. Applicable only for Cards, Accunt Debits and Wallet payment method types
Unique identifier of the payment method
A short description of the payment method. Depending on the payment method’s type different information is returned:
- Card: the brand, followed by the last 4 digits of the card plus expiration month/year
- Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
- Wallet: Name: Email and/or phone used on registration
The custom field’s unique key
The custom field’s value
The queue that the Order is following
Queue identifier
Queue name
GET https://sandbox.crm.com/self-service/v2/orders/6514df04-9218-d354-9d59-ed9e98882fe6 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "6514df04-9218-d354-9d59-ed9e98882fe6",
"number": "O000001",
"supply_method": "DELIVERY",
"state": "IN_PROGRESS",
"stage": {
"id": "6514df04-9218-d354-9d59-ed9e98882fe6",
"name": "In Progress"
},
"is_favorite": true,
"notes": "",
"net": 1,
"discount": {
"amount": 9.99,
"amout_incl_tax": 1
},
"tax": 1.99,
"sub_total": 1,
"total": 14.99,
"amount_due": 13.99,
"currency_code": "EUR",
"fulfilled_by": {
"id": "6514df04-9218-d354-9d59-ed9e98882fe6",
"name": "Good Burgers",
"phone": "+6934222321",
"address": {
"address_line_1": "17 Baker Str",
"address_line_2": "",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "12462",
"country_code": "GR",
"lat": 12.345,
"lon": 11.452,
"googlePlaceId": "123ewd23rwe23w"
}
},
"address": {
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "Tower Star",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CYP",
"lat": 32.15,
"lon": 35.15,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
},
"category": {
"id": "0e6089e0-6384-cd55-c0a3-381cc6583094",
"name": "Normal"
},
"key_dates": {
"submitted_on": 1668265000,
"estimated_completion_date": 1668265000,
"completed_on": 1668265000,
"cancelled_on": 1668265000,
"requested_date": 1668265000,
"started_on": 1668265000
},
"cancellation_reason": {
"id": "6514df04-9218-d354-9d59-ed9e98882fe6",
"name": "Items out of stock"
},
"items": [
{
"id": "",
"quantity": 2,
"notes": "Delay order items delivery",
"unit_price": 1.99,
"discount": {
"amount": 1.99,
"amout_incl_tax": 1.49
},
"sub_total": 1.4,
"total": 2.8,
"product": {
"id": "6514df04-9218-d354-9d59-ed9e98882fe6",
"sku": "abc-12345",
"name": "Installation kit",
"description": "",
"classification": "TRACEABLE_PHYSICAL_GOOD",
"price_terms": {
"id": "",
"billing_period": {
"duration": 1,
"uot": "MONTH"
},
"auto_renew": true,
"termed_period_cycles": 12,
"contract_period": {
"duration": 12,
"uot": "MONTH"
},
"trial_period": {
"duration": 7,
"uot": "DAY"
},
"billing_model": "POST_BILL"
},
"components": [
{
"id": "6514df04-9218-d354-9d59-ed9e98882fe6",
"sku": "0012933-100",
"name": "Decoder",
"quantity": 2,
"price": 0.99,
"price_before_discount": 1,
"sub_total": 1.98
}
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "LOGO",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
}
],
"payments": [
{
"posted_on": "",
"amount": 1.99,
"payment_method_details": {
"type": "CARD",
"identity": {
"id": "9837ee37-a1ab-4a27-9b4b-663c9025a205",
"identifier": "Visa ****1234"
}
}
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
],
"queue": {
"id": "6514df04-9218-d354-9d59-ed9e98882fe6",
"name": "Installations"
}
}
{id}
/ordersRetrieves a list of a contact’s Orders, regardless of their queue, stage or state.
Path variables
The contact identifier whose orders 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
Determines whether custom fields should be retrieved or not
Filters based on custom fields (key/value set should be semicolon separated)
The order’s stage
Request headers
Authorization Token
Responses
Body
The order identifier
The order number
Defines the order’ supply method
The order’s life cycle state
Indicates the Order that the contact marked as his/her favorite one. A single Order can be marked as a favorite.
The total cost of all order items. The cost equals to the total cost of the order’s invoice, taxes and discounts included
Ttoal cost of the order befroe applying the discount, if any. Tax amount is included
The amount that was used from wallet funds
Total discount applied for the order
Total discount amount excluding taxes. This amount equals to the sum of all discount amounts among all invoiced items. Note that this amount does not include the taxed amount.
The total discount amount including taxes
The amount due. This is the due amount to be paid in order to fully pay off the order.
The currency in which the Order will be/was paid
Submitted date
Details about organisation
The organisation identifier
The organisation name
List of order items
The item quantity
Details about the ordered product
The product identifier
The product sku
The product name
product type classification
The price terms of the ordered item. Applicable only when ordering termed and one-time services
Billing period
Duration
Unit of time
The custom field’s unique key
The custom field’s value
Applies for cancelled orders only
Order’s stage
Stage identifier
Stage name
Order’s queue
Queue identifier
Queue name
GET https://sandbox.crm.com/self-service/v2/contacts/067083a5-607c-959e-e62a-3ba8d359bdd6/orders HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "00dee79b-8a97-7d86-4ecd -5c14f75ec071",
"number": "O000001",
"supply_method": "DIRECT_SALE",
"state": "NEW",
"is_favorite": "true",
"total": 14.99,
"sub_total": 1,
"wallet_funds_amount": 1.98,
"discount": {
"amount": 1,
"amount_incl_tax": 1
},
"amount_due": 13.01,
"currency_code": "EUR",
"submitted_date": 1668265300,
"fulfilled_by": {
"id": "087f8a94-a44c-5b0d-f932-2a50ec03c20c",
"name": "CRM"
},
"items": [
{
"quantity": 1,
"product": {
"id": "00dee79b-8a97-7d86-4ecd-5c14f75ec071",
"sku": "SKU01",
"name": "Freddo Espresso",
"classification": "EXPENSES_SERVICE",
"price_terms": {
"billing_period": {
"duration": 1,
"uot": "MONTHS"
}
}
}
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
],
"cancelled_date": 1668265421,
"stage": {
"id": "00dee79b-8a97-7d86-4ecd-5c14f75ec071",
"name": "Accepted"
},
"queue": {
"id": "00dee79b-8a97-7d86-4ecd-5c14f75ec071",
"name": "Installations"
}
}
{id}
/actionsUpdates an existing Order
Path variables
The order (identifier) that will be updated
Request headers
Authorization Token
Request body
Defines the new life cycle state of the Order. Used to start the progress of an order, complete it or cancel it
Cancel an Order
The cancellation reason of the Order. Applicable only when cancelling the Order
Responses
Body
The order identifier
PUT https://sandbox.crm.com/self-service/v2/orders/6514df04-9218-d354-9d59-ed9e98882fe6/actions HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "CANCEL",
"cancellation_reason_id": "553f91e9-a418-354e-1e69-4b6dac24558e"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "6514df04-9218-d354-9d59-ed9e98882fe6"
}
{id}
/network{id}
{id}
/switch{id}
/networkRetrieve a list of organisations that comprise the business network
Path variables
The organisation (identifier) whose network will be retrieved
Request parameters
Filter based on the organisation name (should behave as like)
Filter based on the organisation type
Filter based on organisation industries
Filter based on organisation industry sectors
Filter based on organisation business activities
Filter based on organisation town/city that is located
Filter based on (organisation) tags
Filter based on organisation country
Filter based on whether organisations use the service owner contact registry
Filter based on latitude coordinate, used in conjunction with ‘lon’ & ‘distance’
Filter based on longitude coordinate, used in conjunction with ‘lat’ & ‘distance’
Filter organisations based on distance in KM from the lat/lon coordinates, used in conjunction with 'lat & ‘lon’
Filter based on organisation TAP code
Determines whether order catelogs should be retrieved or not
Determine whether WiFi details should be retrieved or not
Determines whether custom fields should be retrieved or not
Filters based on custom fields (key/value set should be semicolon separated)
Defines how the results will be ordered
Defines on which attribute the results should be sorted
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 organisation identifier
The organisation name
The organisation description
The organisation industry
The organisation industry sectors
The industry sector name
The organisation business activities
The business activity name
The (organisation) tags
The tag name
Information about the specified addresses
The location name
The main address information
Additional address information
The address state/province.county
The address town/city
The address postal code
The address country
The address care of
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
The organisation’s contact details
[
{
"name": "Main Office",
"type": "PHONE",
"value": "info@crm.com",
"country_code": "CYP"
}
]
Information about the specified addresses
The name of the contact detail
The type of the contact detail
The value of the specific contact detail
The phone country code related to the contact detail
Details about the contact registry (applicable only if contact registry = true)
Defines whether a contact has already registered or not
The organisation’s order catalogs
The order catalog identifier
The order catalog display name
Details about the catalog time availability
The days of the week the order catalog is available
The start time of the order catalog
The end time of the order catalog
The supported supply methods of the order catalog
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
The custom field’s unique key
The custom field’s value
A list of WiFi Sites that are related to the organisation
The site identifier
The WiFi platform site id
Details about the integration of the WiFi Site
The integration identifier
The integration name
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/organisations/56854656-b466-463f-8e10-b6bf558b4666/network HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "262e72a3-55df-315d-d7bc-a90ae7ea063c",
"name": "Alfa Bakery",
"description": "Lorem Ipsum",
"industry_name": "Restaurant",
"industry_sectors": [
{
"name": "Nightlife"
}
],
"business_activities": [
{
"name": "Bar & Grill"
}
],
"tags": [
{
"name": "Restaurant"
}
],
"addresses": [
{
"name": "Main Store",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CY",
"care_of": "Lorem Ipsum",
"lat": "35.157115",
"lon": "33.313719",
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
],
"contact_info": [
{
"name": "Main Office",
"type": "EMAIL",
"value": "info@crm.com",
"country_code": "CYP"
}
],
"contact_registry": {
"contact_registered": "true"
},
"order_catalogs": [
{
"id": "9b6c4b9f-2982-2eb9-a13f-ec8a822da92f",
"display_name": "Drinks Menu",
"time_availability": [
{
"day_of_week": "Monday",
"start_time": "08:00",
"end_time": "23:59"
}
],
"supply_method": [
"PICK_UP"
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "BACKGROUND",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
],
"wifi_sites": [
{
"id": "b1bd8cec-1b98-2636-cc91-41253fb88c82",
"site_id": "88quh2m6",
"integration": {
"id": "bade503e-ffbc-05ba-a151-ff350cbc134d",
"name": "UniFi"
}
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
Retrieve all details for a specific organisation
Path variables
The organisation (identifier) that will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The organisation identifier
The organisation name
The organisation description
The organisation industry
The organisation industry sectors
The industry sector name
The organisation business activities
The business activity name
The (organisation) tags
The tag name
Information about the specified addresses
The location name
The main address information
Additional address information
The address state/province.county
The address town/city
The address postal code
The address country
The address care of
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
Details about the organisation contact details
Information about the specified addresses
The name of the contact detail
The type of the contact detail
The value of the specific contact detail
The phone country code related to the contact detail
Defines the organisation operation details
Details about the organisation’s working hours
The time that the organisation opens (HH:MM)
The time that the organisation closes (HH:MM)
The opening hours for each organisation’s operation type
Details about the organisation’s availability to offer its services
Defines whether the organisation is temporary closed for offering its services
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
The custom field’s unique key
The custom field’s value
GET /organisations/3b2cee85-146b-3fda-3021-5d18e52e2504 HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": {
"id": "73267fdd-3858-001e-1275-11bb9c3b279c",
"name": "Alfa Bakery",
"description": "Lorem Ipsum",
"industry_name": "Restaurant",
"industry_sectors": [
{
"name": "Bar"
}
],
"business_activities": [
{
"name": "Bar & Grill"
}
],
"locations": [
{
"name": "Main Store",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CY",
"care_of": "Lorem Ipsum",
"lat": "35.157115",
"lon": "33.313719",
"googleplaceid": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"type": "",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
}
Get a list of organisations (merchants, venues) ordered by nearest first
Request parameters
Filter based on organisation name (should behave as like)
Filter based on latitude coordinate
Filter based on longitude coordinate
Filter based on whether an organisation is opened or not
Filter based on order supply method
Filter based on how far should the distance be at a maximum (default to 5KM)
Filter based on organisation industries
Filter based on organisation industriy sectors
Filter based on organisation business activities
Filter based on (organisation) tags
Filter based on organisation town/city
Determines whether custom fields should be retrieved or not
Filters based on custom fields (key/value set should be semicolon separated)
Determines whether order catalogs should be retrieved or not
Determines whether opening hours should be retrieved or not
Determines whether organisation creatives should be retrieved or not
Request headers
Authorization Token
Responses
Body
The organisation identifier
The organisation name
The organisation description
The organisation address
The address identifier
The address latitude coordinate
The address longitude coordinate
The supported distance from the lat/lon coordinates
The Google textual identifier that uniquely identifies an address
The address line 1
The address line 2
The address state/province/county
The address town/city
The address country (code)
The address postal code
The organisation contact information
Information about the specified addresses
The name of the contact detail
The type of the contact detail
The value of the specific contact detail
The phone country code related to the contact detail
The organisation opening hours for the current day
The opening time (HH:MM format)
The clsoing time (HH:MM format)
The order catalogs applicable for the organisation
The order catalog identifier
The order catalog display name
Details about the order catalog time availability
The day of the week the Order Catalog is available
The start time the Order Catalog (HH:MM format)
The end time the Order Catalog (HH:MM format)
The supported supply method of the Order Catalog
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
The custom field’s unique key
The custom field’s value
GET https://sandbox.crm.com/self-service/v2/locations?lat=38.91&lon=38.91 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "232b8688-7275-c838-d411-af9999224545",
"name": "CRM",
"description": "CRM organisation for orders",
"address": {
"id": "c8ea18e4-2804-3e8e-9450-600263614aac",
"lat": 12.16,
"lon": 112.16,
"distance": 11,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"country_code": "CYP",
"postal_code": "2000"
},
"contact_info": [
{
"name": "Main Office",
"type": "EMAIL",
"value": "info@crm.com",
"country_code": "CYP"
}
],
"opening_hours": [
{
"supply_method": "ALL",
"open": "12:45",
"close": "19:45"
}
],
"order_catalogs": [
{
"id": "10152097-dcdd-6f29-787b-7c321a1d1012",
"display name": "Burgers Menu",
"time_availibity": [
{
"day_of_week": "MONDAY",
"start_time": "09:00",
"end_time": "22:00"
}
],
"supply_methods": [
"DELIVERY"
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "ATTACHMENT",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "ATTACHMENT",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
]
}
]
}
{id}
/switchSwitch a contact’s access to another organisation that he/she is a member of
Path variables
The organisation (identifier) that contact’s access will be switched to
Request headers
Authorization Token
Responses
The request has succeeded
Body
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 authorised contact details
The contact’s identifier
The contact’s first name
The contact’s last name
Defines whether the used identity is verified
Details about the organisations that the contact has joined
The organisation identifier
The organisation type
The organisation name
Details about the contact communities that the contact is a member of
The contact identifier
The contact name
POST https://sandbox.crm.com/self-service/v2/organisations/02ee09d0-c227-4479-a2e6-5e9958c7ea78/switch HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"expiration_date": "1572530655",
"contact": {
"id": "2f2f9afe-4399-59b7-cbb8-da18c2255064",
"first_name": "John",
"last_name": "Doe",
"is_verified": "false"
},
"organisations": [
{
"id": "QWERTY12345671234567324ETFTGBY78",
"type": "SERVICE_OWNER",
"name": "CRMdotCOM"
}
]
}
Redeems a single pass by a contact
Request headers
Authorization Token
Request body
Unique id of the contact who is redeeming the pass
The id of the contact’s wallet which will be credited with the pass value
The pass code to be redeemed
The pass PIN (if applicable)
Responses
OK
Body
The redeemed pass identifier
POST https://sandbox.crm.com/self-service/v2/passes HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"contact_id": "00dc6a3d-2c90-4953-b1db-92c81d004406",
"wallet_id": "228568ea-ab6f-471e-bae7-7adb7e913ff6",
"code": "CRM59934377COM",
"pin": "0103"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "65132ff2-0ff2-b96f-6379-d6bbf38d07be"
}
CRM.COM’s Product Cataglogue includes:
- Products specifications
- Product Pricing
- Promotions that can be applied on purchasing products, subscribing to services annd during their billing.
Products are the physical goods and services that a Business sells. The product definition includes basic characteristics of the products as well its pricing information. Any products defined in CRM.COM can be sold through an order or an invoice. It’s crucial that Products are configured correctly, since they appear on customer-facing apps/portals for ordering purposes.
{id}
{id}
/variantsRetrieves a list of products that can be purchased by customers through an order, filtered by their category, type etc. Modifier and Variant products are excluded since these product can only be ordered as part of another product and not individually.
Request parameters
Filter based on product name (search based on like, for a minimum of three characters search with CONTAINS and case insensitive)
The organisation owning the product catalog (the subsidiary, merchant or venue from which the products will be purchased)
The organisation that wlil fulfill a customer’s ordering. Products that can be ordered by the specified organisation at the time of ordering will be returned
Filter based on product type
Filter based on product category
Filter based on order catalogue
Filter based on order catalogue category
Filter based on product brand
Filter based on product family
Filter based on product supply method
If specified, then only products marked as modifiers are returned. A produc tis marked as modifier through its type. If not specified, then it’s gnored and filtering is not applied.
The date on which a product is sold/added as a charge or a service should also be within its validity date. Applicable only when listing products to get the services available to be ordered, added as charges or included in a subscription either as a new addition or through a service change. Filter based on the validity 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. validity_date[gte]=1618395497&validity_date[lt]=1618395497).
Returns results where the validity date is greater than this value
Returns results where the validity date is greater than or equal to this value
Returns results where the validity date is less than this value
Returns results where the validity date is less than or equal to this value
The product’s classification
The product’s composition
Defines how the results will be ordered
Defines on which attribute the results should be sorted
The page number that should be retrieved
The size (total records) of each page
Search for a product using its SKU or name
If set to True, creatives will also be returned.
The sales model unique identifier which will enable the user to choose one of the configured sales model types for the product
Request headers
Authorization Token
The publishable api key for application identification
Responses
Body
Product identifier
Product SKU
Product name
Product description
Number of items in the product’s allowed composition.Available only for bundles and composite products
Number of variant products. Available only for Composite prducts
Number of variant attributes
Number of prices
Applicable only for traceable physical goods with a rental price
Denotes whether the product is available for ordering at the organisation that will fulfill the order. Available only if a fulfilled by organisation is set in the method’s filters
The product’s type
Type identifier
Type name
Lists all prices of the product. Only prices applicable at the account owner’s Country of agreement are returned.
The price’s unique identifier
The price of the product but only if the price model is Flat. For Tiered/Volume/Strairstep models, get the price from the tiering prices field.
Applicable only for Tier/Volume/Stairstep pricing models. This is a list of ranges along with a price for each tier range.
Tier range’s price
Lower tier of the range. First tier is always set to 1
Upper tier of the range. The last range does not have an upper tier
The default price. A single price can be the default one
Defines the order’ supply method
Number of billing cycles that the service’ termed period covers
Defines whether the service is auto-renewed at the end of the termed period or it gets expired.
Defines whether the service is billed in pre-/post-bill mode
The service’s contract period (if any)
Contract period duration
Period’s unit of time
The service’s illing cycle
Billing cycle duration
Billing cycle unit of time
Shows if the service will get a trial period
Trial period duration
Trial period unit of time
Applicable only for traceable physical goods given to contacts as Rentals
The rental service product indetifier. This must be a product classified as an Expense
Rental service SKU
Retal servce name
The sales model is the unique identifier used to classify a product’s price
The sales model unique identifier
The sales model name which has to be unique across all sales models
List of taxes applicable for the product. Tax rates are filtered based on the product, the operating country of the organisation that sells the product
Tax rate unique identifier
Tax rate name
Tax rate code
The tax rate’s percentage
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/products HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "MOV001",
"name": "Movies",
"description": "Unlimited movies",
"classification": "TRACEABLE_PHYSICAL_GOOD",
"type_composition": "FLAT",
"components": 3,
"variants": 3,
"variant_attributes": 2,
"number_of_prices": 2,
"can_be_rented": true,
"availability": "ENABLED",
"type": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "TV Services"
},
"pricing": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"price": 1.99,
"tiers": [
{
"price": 9.99,
"lower_tier": "1",
"pupper_tier": "5"
}
],
"currency_code": "EUR",
"is_default": "true",
"tax_model": "TAX_INCLUSIVE",
"price_model": "FLAT",
"supply_method": "DIRECT_SALE",
"price_terms": {
"terms_billing_cycles": 12,
"auto_renewed": true,
"billing_model": "PRE_BILL",
"contract_period": {
"duration": 12,
"uot": "MONTHS"
},
"billing_period": {
"duration": 1,
"uot": "MONTHS"
},
"trial_period": {
"duration": 7,
"uot": "DAYS"
},
"rental_service": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "RENTAL",
"name": "Rental Fee"
}
},
"sales_model": [
{
"id": "caf332bc-4e90-47b5-a05d-142b264897b9",
"name": "Retail"
}
]
}
],
"taxes": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "Standard VAT",
"tax_code": "VAT",
"percentage": 19.5
}
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "BACKGROUND",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
],
"sales_model": [
{
"id": "caf332bc-4e90-47b5-a05d-142b264897b9",
"name": "Retail"
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
Get detailed inormaiton of the product, its prices and taxes
Path variables
The product identifier that will be retrieved
Request headers
Authorization Token
The publishable api key for application identification
Responses
Body
Product identifier
Product SKU
Product name
Product description
Number of prices
Number of variant products. Applicable only for Composite prducts
Indicates whether the product is available for ordering at an organisation
Product type
Type identifier
Type name
The product categories
The category identifier
The category name
Product family
Family identifer
Family name
Product brand
Brand idetifier
Brand name
The product’s allowed composition shows which products can be included in the order. Applicable only for bundles and composite products.
Component identifier
Component type
Item identifier
SKU only of component is a product
Name of the component item
Minimum required quantity of items to be ordered
Maximum allowed items to be ordered
When set to True, then the item is always included in the ordered product and cannot be removed
When set to True, then the component’s price is included in the bundle/composite product’s price
How component options will be sorted on ordering
Applicable only for component items that denote a set and only for Composite products. If the component set includes modifiers products, then the default modifier shows which produc twill be selected by default on ordering
Product identifier
Product SKU
Product name
Product Prices. Only product prices available at the account owner’s Country of agreement are returned.
The price’s unique identifier
The price of the product
Defines the order’ supply method
Number of billing cycles that the service’ termed period covers
Defines whether the service is auto-renewed at the end of the termed period or it gets expired.
Defines whether the service is billed in pre-/post-bill mode
The service’s contract period (if any)
Contract period duration
Period’s unit of time
The service’s illing cycle
Billing cycle duration
Billing cycle unit of time
Shows if the service will get a trial period
Trial period duration
Trial period unit of time
Applicable only for traceable physical goods given to contacts as Rentals
The rental service product indetifier. This must be a product classified as an Expense
Rental service SKU
Retal servce name
The product’s default price. A single price can be the default one per product
The sales model unique identifier which will enable the user to choose one of the configured sales model types for the product
The sales model unique identifier
The sales model name which has to be unique across all sales models
The sales model description
List of tiered prices. Applicable only for Tiered/Volume/Stairstep pricing models
Tier range’s price
Lower tier of the range. First tier is always set to 1
Upper tier of the range. The last range does not have an upper tier
List of variant attributes that provide additional informaiton for the product
Variant attribute key
Labels used for UI purposes
Atribute’s value
List of taxes applicable for the product. Tax rates are filtered based on the product, the operating country of the organisation that sells the product
Tax rate unique identifier
Tax rate name
Tax rate code
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
The sales model is the unique identifier used to calssify a product’s prcie
The sales model unique identifier
The sales model name which has to be unique across all sales models
GET https://sandbox.crm.com/self-service/v2/products/8c939607-2262-544d-99ef-4634c6e8836d HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "ABC12345",
"name": "Base TV",
"description": "Basic TV & myFlix",
"classification": "TRACEABLE_PHYSICAL_GOOD",
"type_composition": "FLAT",
"number_of_prices": 3,
"variants": 3,
"availability": "ENABLED",
"type": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "TV Services"
},
"categories": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "PaidTV"
}
],
"family": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "Entertainment"
},
"brand": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "News"
},
"composition": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"item_type": "TYPE",
"item_id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "ABC12345",
"name": "TV Services",
"minimum_quantity": 1,
"maximum_quantity": 3,
"madnatory": "true",
"price_inclusive": "true",
"priority": 1,
"default_modifier": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "ALMMILK",
"name": "Almond milk"
}
}
],
"pricing": [
{
"id": "",
"price": 9.99,
"currency_code": "EUR",
"price_model": "FLAT",
"tax_model": "TAX_INCLUSIVE",
"supply_method": "DELIVERY",
"price_terms": {
"terms_billing_cycles": 12,
"auto_renewed": true,
"billing_model": "PRE_BILL",
"contract_period": {
"duration": 12,
"uot": "MONTHS"
},
"billing_period": {
"duration": 1,
"uot": "MONTHS"
},
"trial_period": {
"duration": 7,
"uot": "DAYS"
},
"rental_service": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "RENTAL",
"name": "Rental Fee"
}
},
"is_default": "true",
"sales_model": [
{
"id": "caf332bc-4e90-47b5-a05d-142b264897b9",
"name": "Retail",
"description": "Sales model available for all contact Person"
}
],
"tiers": [
{
"price": 9.99,
"lower_tier": 1,
"upper_tier": 5
}
]
}
],
"variant_attributes": [
{
"key": "size",
"label": "Size",
"value": "Small"
}
],
"taxes": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "Standard VAT",
"tax_code": "VAT",
"percentage": 19.5
}
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "ATTACHMENT",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
],
"sales_model": {
"id": "caf332bc-4e90-47b5-a05d-142b264897b9",
"name": "Retail"
}
}
{id}
/variantsGet the detailed information of a composite product’s variant products, their prices, composition etc. The method can only be used for products classificied as Composite, i.e. they are sold in various variations.
Path variables
The product identifier whose variants will be retrieved
Request headers
Authorization Token
The publishable api key for application identification
Responses
Body
Product identifier
Product SKU
Product name
Product dscription
List of prices of the variant product. A variant product by default is sold using its Composite product’s price. If the variant product’s needs to be differntiated, then it will have its own price.
Price
Defines the order’ supply method
The sales model is the unique identifier used to calssify a product’s prcie
The sales model unique identifier
The sales model name which has to be unique across all sales models
List of product attributes. The allowed attributes and their allowed values are specified at the Composite product specification. Each variant has a unique combination of these attributes and values
Attribute’s key
Attribute value
Label used for UI purposes
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
GET https://sandbox.crm.com/self-service/v2/products/2f6a70b6-84d4-2859-d230-093cb7e95c62/variants HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "2f6a70b6-84d4-2859-d230-093cb7e95c62",
"sku": "ABC12345",
"name": "Small Latte",
"description": "Small Latte",
"type_composition": "FLAT",
"pricing": [
{
"price": 9.99,
"currency_code": "EUR",
"price_model": "FLAT",
"tax_model": "TAX_INCLUSIVE",
"supply_method": "DIRECT_SALE",
"sales_model": {
"id": "caf332bc-4e90-47b5-a05d-142b264897b9",
"name": "Retail"
}
}
],
"variant_attributes": [
{
"key": "size",
"value": "Small",
"label": "Size"
}
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "ATTACHMENT",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
]
Promotions provide a discount to consumers, usually when a set od conditions are met such as when, where and which products are ordered by the consumer. A promotion has offerrings that include - apart from the discount amount/percentage, the discounted products and whether the discount will be applied per product or at invoice level.
{id}
Returns a list of Promotions.
Request parameters
Search for a promotion using its name
Filter based on the organisation that the promotions are created for. Use the filer so as to present the Promotion that can be applied if the contact orders items from these merchants/venues = service providers/points
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
Responses
Body
Unique identifier of the Promotion
Promotion name
A short description for the Promotion
A more detailed descriptino of the promotion
State of the Promotion. Only Active Promotions are applied on purchasing products
Period of time during which the Promotion is available i.e. the promotion is applied only for purchases performed within this period
Start date
End Date.
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/promotions HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"name": "Sales season 20%",
"short_description": "20% off to all services",
"long_description": "All termed services get 20% off on subscribing and applied for the first 6 months",
"state": "ACTIVE",
"availability": {
"from_date": 1649231923,
"to_date": 1649231923
},
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "BACKGROUND",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
],
"pages": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
Retrieve detailed information for a specific promotion
Path variables
The promotion identifier that will be retrieved
Request headers
Authorization Token
Responses
Body
Promotion identifier
Promotion name
Promotion state
Short description of the Promotion
A more detailed description of the Promotion
Determines when the Promotion is avialable and will be applied. A pPromotion is applied only when purchases are performed within this period.
Contacts get the Promotion on orders performed from this date onward
Promotion applied on orders up until this date
The Promotion’s target conditions i.e. the required conditions for the contact to get the discount.
The unique identifier of the Segment
Name of the Segment
The unique identifier of the Organisation
Name of the Organisation
Promotion is applied if the purchase is performed within the specified period off time. Either a fixed period or promotion availability must be specified
Promotion applied if purchase is performed from this date (inclusive) and onwards
If specified, then purchase must be performed up until this date. Optional.
Promotion is applied if the purchase is performed within the specified day(s), month(s) and/or times. Either a fixed period or promotion availability must be specified. Each availibility option should be unique
Starting time
End time
Rules that -if specified- should be met in order for the Promotion to be applied.
Contact should pay using one of the specified payment method types to get the offerring
["CARD"]
Purchase is fulfiflled using one of the specified supply methods for the contact to get the offering
["DELIVERY"]
Defines the order’ supply method
Minimum required basket total amount for the promotion to be applied. The amount is always set in the business’s base currency
Miminum required quantity of basket items
Products that should be included in the basket for the Promotion to be applied. Product conditions are defined as groups of conditions. In Each group there’s a product setting and the conditions that should be met. Multiple groups can be added, logically separated by AND/OR operators.
The group’s name. Each group name must be unique
Logical operator used amount the product conditions
List of product conditions. Mulitple conditions can be added, each one referring to a single product. All product conditions mus tbe met to apply the promotion
The product that should be included in the basket
The identifier of the product/type/brand/family.
The product’s SKU. Applicable only when item type is set to Product
The name of the product/type/brand/family
The minimum required quantity of items to be included in the basket for the promotion to be applied
The minimum required basket items cost. Cos tis defined in the business’s base currency
The billing cycle of the basket item. Applicable only for termed services. The billing cycle is the one specified in the service’s price terms selected on ordering
Billing cycle duration
Billing cycle unit of time
The contract period of the basket item. Applicable only for termed services. The contract period is the one specified in the service’s price terms selected on ordering
Contract period duration
Contract period unit of time
Defines whether the offering is an actual discount amount or a discount percentage
The discount amount or percentage depending on the offering’s type
The product on which the discount will be applied
Determines on which product the discount will be applied.
The unique identifier of the product item
The product’s SKU. Applicable only for SKU item types
The product/type/brand/family name
How long the offering will be applied. Applicable only when the offering’s product is a termed service
Indicates whether the offering will be applied once, for period fo time or forever.
Discount applied only once
Discount applied for a limited period
Discount applied forever
Applicable and required only when the offering ill be applied for a specific PERIOD
The period’s duration
The period’s unit of time
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
GET https://sandbox.crm.com/self-service/v2/promotions/6eeec3be-be1b-3eae-ca11-779d932d97fc HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"name": "Sales season",
"state": "ACTIVE",
"short_description": "£10 off",
"long_description": "£10 off on products whose price is more than £100",
"availability": {
"from_date": 1649231923,
"to_date": 1649231923
},
"targets": {
"segments": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"name": "VIP contacts"
}
],
"organisations": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"name": "Good Burgers"
}
],
"timings": {
"fixed_period": {
"start_date": 1648067185,
"end_date": 1648067185
},
"availability": [
{
"day": "WEDNESDAY",
"month": "OCTOBER",
"start_time": "13:00",
"end_time": "14:00"
}
]
}
},
"basket": {
"rules": {
"payment_method_type": [
"CARD"
],
"supply_method": [
"DELIVERY"
],
"value": 9.99,
"quantity": 5
},
"products": {
"groups": [
{
"group": "G1",
"operator": "AND",
"conditions": [
{
"operator": "OR",
"condition": "",
"product": {
"item_type": "FAMILY",
"item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "HDSTB123",
"name": "HD STB"
},
"quantity": 1,
"value": 9.99,
"billing_cycle": {
"duration": 1,
"uot": "MONTHS"
},
"contract_period": {
"duration": 12,
"uot": "MONTHS"
}
}
]
}
]
}
},
"offerings": [
{
"type": "PERCENTAGE",
"amount": 1.99,
"product": {
"item_type": "SKU",
"item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "STB12345",
"name": "HD STB"
},
"duration": {
"type": "PERIOD",
"period": {
"vaue": 6,
"uot": "MONTHS"
}
}
}
],
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
An Order Catalogue is a sub-set of the Product Catalogue. An Order Catalogue is created by an Organisation to be used for ordering purposes on front-end systems like mobile apps and portals. So consumers are able to order products from various Order Catalogues depending on the day or time or organisation from which they are ordering products.
{id}
/categoriesReturns a list of active order catalogues configured for the Business
Request parameters
Search for an order catalogue using its name, dispaly name or description
Retrieve order catalogues based on organisation that wll fulfill the order
Return order catalogues available per supply method
Retrieve order catalogue based on ordering time
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
The publishable api key for application identification
Authorization Token
Responses
The request has succeeded
Body
The order catalogue identifier
The order catalogue name
The order catalogue description
The order catalogue display name
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/order_catalogues/ HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "c5d37f18-2656-739d-6340-4b1413ca9617",
"name": "Monday Menu",
"description": "A list of dishes available every Monday",
"dislpay_name": "Monday",
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "BACKGROUND",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/categoriesReturns a list of order catalogue categories
Path variables
The order catalogue identifier
Request parameters
Search for an order cataogue category using its name
Retrieve only all child nodes that have as parent this order catalogue category
Defines whether all order catalogue categories (parent and child) should be retrieved or not
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 publishable api key for application identification
Responses
The request has succeeded
Body
The order catalogue category identifier
The order catalogue category name
The order catalogue category description
The number of the order catalogue category’s child nodes
Details about the parent order catalogue category (applicable if this category is a child node)
The parent order category identifier
The parent order category name
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/order_catalogues/{id}/categories HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "9365d945-2c62-be0e-a8dc-45736fdfa5b5",
"name": "Cold Drinks",
"description": "Cold Beverages and Refreshers",
"child_nodes": 12,
"parent": {
"id": "9365d945-2c62-be0e-a8dc-45736fdfa5b5",
"name": "Drinks"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Rewards API
{id}
/performanceRetrieve all active reward schemes
Request parameters
The reward scheme name
Filter based on whether contact has signed up or not
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 reward scheme identifier
The reward scheme name
The reward scheme description
The terms and conditions for the retrieved reward scheme
Defines how customer can sign up to the reward scheme
Defines whether contact has already signed up to reward scheme
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/reward_schemes HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "d740054b-8cf6-f147-33a2-844c80096b93",
"name": "Loyalty Scheme",
"description": "Lorem Ipsum",
"terms_and_conditions": "Only CRMdotCOM domain customer can sign up",
"sign_up_option": "SELF_SIGN_UP",
"has_signed": "false"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Retrieve all active reward offers that are applicable for a specific contact
Request parameters
Filter based on industries
Filter based on industry sectors
Filter based on organisation tags
Filter based on organisation location town/city
Filter based on organisation location country (code)
Filter based on the organisation that the offers are created for
Filter based on whether reward offers are eligible to be used for performance purposes or not
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 reward offer identifier
The reward offer name
Infromation about the reward scheme of this offer
The reward scheme identifier
The reward scheme name
The reward offer short description
The reward offer long description
The terms and conditions for the retrieved reward offer
Defines whether the reward offer is featured or not
Defines whether the reward offer is eligible to be used for performance purposes
Information about the organisation that owns the reward offer
The organisation identifier
The organisation name
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/reward_offers HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "7acb34e9-221a-32f9-008b-cb7a3d28851c",
"name": "10% off on any purchase",
"reward_scheme": {
"id": "58a54215-5d8f-5b40-af91-c62e86b973a9",
"name": "Loyalty Scheme"
},
"short_description": "Short Description",
"long_description": "Long Description",
"terms_and_conditions": "Terms & Conditions",
"is_featured": "false",
"performance_enabled": "true",
"owned_by": {
"id": "e66d45b4-2673-0a0e-5a06-d6088a324b3f",
"name": "Pizza Yummy",
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "BACKGROUND",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
},
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/performanceRetrieve the performance for a specific reward offer
Path variables
The reward offer (identifier) whose performance will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
Defines the performance type of the offer, whether it’s based on transaction amount, contact events or purchased products
The progression percentage for this offer
The current performance (events, purchased products, amount) that was recorded so far
The target performance (events, purchased products, amount) that should be captured in order to be awarded from the offer
GET https://sandbox.crm.com/self-service/v2/reward_offers/a690caa5-9c4d-4eb0-b743-88076f1f5711/performance HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"type": "PRODUCT",
"progress": 14.11,
"current": 12.32,
"target": 123.78
}
GET https://sandbox.crm.com/self-service/v2/reward_offers/a690caa5-9c4d-4eb0-b743-88076f1f5711/performance HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"type": "EVENT",
"progress": null,
"current": 12,
"target": null
}
GET https://sandbox.crm.com/self-service/v2/reward_offers/a690caa5-9c4d-4eb0-b743-88076f1f5711/performance HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"type": "EVENT",
"progress": 90.11,
"current": 12,
"target": 17
}
Service requests shall be created via the self service platform.
{id}
/service_requests{id}
/service_requests{id}
/service_requestsCreate a service request for a specific contact
Path variables
The contact (identifier) for whom a service request will be created
Request headers
Authorization Token
Request body
The service request description
The queue identifier
Address information for the service request
The contact’s address id associated to the service request (either ‘id’ or ‘other’ can be specified)
Details about the address
The address line 1
The address line 2
The address state/province/county
The address town/city
The address postal code
The address country code
The address geolocation latitude
The address geolocation longtitude
The address unique Google identifier
Default categories added to the service request based on queue definition
Category id
Responses
Body
The service request identifier that was created
POST https://sandbox.crm.com/self-service/v2/contacts/6b888b83-b418-752f-604d-0653cf65885d/service_requests HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"description": "I have a complaint about the potholes in Nicosia Main Road",
"queue_id": "6b888b83-b418-752f-604d-0653cf658811",
"address": {
"id": "61c943c8-dfeb-4c09-a25c-b054f48bf244",
"other": {
"address_line_1": "17 Baker Str",
"address_line_2": "",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "12462",
"country_code": "GR",
"lat": 12.345,
"lon": 11.452,
"googlePlaceId": "123ewd23rwe23w"
}
},
"categories": [
{
"id": "2f4ffc37-9463-4f17-9549-dd3cbc24f7e7"
}
]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "8dfc2223-edca-f05d-820b-dc96ba9df2c2"
}
{id}
/service_requestsRetrieve all details relating to service requests created by or for a specific contact
Path variables
The contact id whose service requests will be retrieved
Request parameters
Filter based on service request state
Request headers
Authorization Token
Responses
Body
The service request identifier
The service request number
Description of the service request
Service request system user comments, applicable only if the service request has been ‘closed’
The categorisation for the service request
Category identifier
Category name
Date service request was created
The stage of the service request within the queue
Stage id
Stage name
Hex colour code for status
If the service request is ‘closed’, it should be noted whether it was resolved or not
The closure reason of the service request, applicable only if it was closed without being resolved (i.e. ‘resolved’ = false)
Id of the configured closure reason
The name of reason displayed
Details about the address
The address line 1
The address line 2
The address state/province/county
The address town/city
The address postal code
The address country code
The address geolocation latitude
The address geolocation longtitude
The address unique Google identifier
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/contacts/b2157d75-7959-83dc-fdfa-cacba764d4d4/service_requests HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "8dfc2223-edca-f05d-820b-dc96ba9df2c2",
"number": "SR1003",
"description": "Pot hole issues in Nicosia Main Road",
"comments": "Contact has been spoken to",
"category": {
"id": "07132e7d-b4a0-4070-ad7b-7df2a8be0ebf",
"name": "Complaints"
},
"created_date": 1653492769,
"stage": {
"id": "07132e7d-b4a0-4070-ad7b-7df2a8be0ebf",
"name": "Responded to customer",
"colour": "#FA89CB"
},
"state": "IN_PROGRESS",
"resolved": true,
"closure_reason": {
"id": "07132e7d-b4a0-4070-ad7b-7df2a8be0ebf",
"name": "Service request passed to Road Works Department"
},
"address": {
"address_line_1": "17 Baker Str",
"address_line_2": "",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "12462",
"country_code": "GR",
"lat": 12.345,
"lon": 11.452,
"googlePlaceId": "123ewd23rwe23w"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Self-service API for attaching files to service requests
{id}
/attachments{id}
/attachments/{attachment_id}
{id}
/attachments{id}
/attachmentsUpload an attachment for a service request
Path variables
The service request (identifier) for which a file will be attached
Notes
Integrating file upload for Service Requests should be based on the following APIs
Request headers
Authorization Token
Request body
The file identifier to be attached
The file (URL) to be attached
The file description
Responses
The request has succeeded
Body
The attachment identifier
POST https://sandbox.crm.com/self-service/v1/service_requests/6b888b83-b418-752f-604d-0653cf65885d/attachments HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"file_id": "30526723-24a3-e4e3-1a75-b26b1b41f05c",
"description": "Image 1"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "8dfc2223-edca-f05d-820b-dc96ba9df2c2"
}
{id}
/attachments/{attachment_id}
Delete an attachment file for a service request
Path variables
The service request (identifier) for which attachment file will be deleted
The attachment file (identifier) to be deleted
Request headers
Authorization Token
Responses
The request has succeeded
DELETE https://sandbox.crm.com/self-service/v2/service_requests/6b888b83-b418-752f-604d-0653cf65885d/attachments/8dfc2223-edca-f05d-820b-dc96ba9df2c2 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 204 No Content
{id}
/attachmentsRetrieve all attachment files for a specific service request
Path variables
The service request (identifier) for which attachment files 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
Responses
The request has succeeded
Body
The attachment details
The attachment identifier
The attachment description
The file details
The file identifier
Information about the creative type
The file name
The file URL endpoint
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/service_requests/6b888b83-b418-752f-604d-0653cf65885d/attachments HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "af748ada-0521-0503-fc25-b67635a7d14d",
"description": "Image 1",
"file": {
"id": "0317868f-28f8-9f56-d248-5a78718b38cc",
"mime": "png",
"name": "image1.png"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/services{id}
{id}
{id}
/services{id}
{id}
{id}
/servicesSubscribes the customer to new subscription services. A single service can be added per Web API call. In cases where the contact does not own a subscription in the same billing cycle as the new service’s cycle, then a new subscirption is also created with this Web API call. Otherwise, the existing subscription is amended with the new service, and this new service’s billing cycle is adjusted to the subscription’s.
Path variables
Contact identifier
Request headers
The publishable api key for application identification
Request body
The new service product identifier. The product must either be a temred service or a one-time service.
The service’s price terms
Service quantity. If not specified, then it defaults to 1
Scheduled date on wich the service will be added. If not added immediatelly, then this date must be set in the future.
List of component services. Applicable only when the service to be added is a flexible bundle.
The component service’s identifier. Only termed services can eb specified and as ong as the service meets the bundle’s allowed composition.
The component service’s price terms.
Responses
Body
The unique identifier of the Add service action
POST https://sandbox.crm.com/self-service/v2/contacts/5cc0809f-ed91-4b68-b912-5bd6064d901e/services HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"price_terms_id": "edc0809f-ed91-4b68-b912-5bd6064d901e",
"quantity": 5,
"scheduled_date": 1621236954,
"components": [
{
"product_id": "2dc0809f-ed91-4b68-b912-5bd6064d901e",
"price_terms_id": "32c0809f-ed91-4b68-b912-5bd6064d901e"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "32c0809f-ed91-4b68-b912-5bd6064d901e"
}
{id}
Updates a single suscsription service. A service might change due to various reasons and multiple changes can be logged per Web API log:
- Change the service’s state
- Change the service with another service
- Change the service’s terms
- Change the service’s quantity
- Change a flex service’s components
Path variables
the subscription service identifier
Request headers
The publishable api key for application identification
Request body
Determines what kind of change will be performed on the service
Activates a Draft or a Not Effective service
Cancel a service
Regret a service
Pause a service
Resume a paused service
Change the service
Categorises the action.
The date on which the action is scheduled to be executed. If not specified, the action is immediatelly executed.
Applicable when business rules enforce an action to be performed on a future scheduled date. Set this parameter to True to indirectly use the business rules’ prposed scheduled date without explicitly defining it
Applicable when changing a service’s price.
If set to True, then contact opts-in to auto-renewals, otherwsie, when set to False, the contact opts out and the service will get expired at the end of the termed period.
Applicable and required when pausing a service
Applicable and required when changing a service into another one. The new service must be included in the same tier path as the source service.
The unique identifier of the new service products
Required when the new service has multiple prices.
Required when amending a service classified as a flex bundle. At least a component to be added or a component to be removed mut be specified.
Service components to be added
Component service product identifier. This must be a termed service which meets the flex bundle’s composition requirements
The component service’s price terms. Required i the service srvice has more tha one set of price terms. If a single price exists, then it is automatically set.
Service components to be removed
The existing service cmponents identifiers (service identifier)
Responses
Body
The unique idetifier of the action that updates the service
A proposed date on which the requested changes can be scheduled to be executed. If a date is returned, then no action is logged yet and it has to be scheduled. A proposed scheduled date is returned when business rules do not allow the action’s immediate execution.
PUT https://sandbox.crm.com/self-service/v2/services/32c0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"action": "CHANGE",
"category_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"scheduled_date": 1,
"use_proposed_date": true,
"price_terms_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"renewal_opt_in": "true",
"number_of_days": 5,
"change_to_service": {
"product_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"price_terms_id": "ef5f8b2e-092f-248-8f46-31dfacb14ace"
},
"components": {
"added": [
{
"product_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"price_terms_id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
}
],
"removed": [
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
}
]
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"proposed_date": 1656962736
}
{id}
Updates subscripion information related to the customer’s billing terms for a set of services
Path variables
The unique identifier of a subscription
Request headers
The publishable api key for application identification
Request body
How the subscription will be updated
Change the billing day
Change/Set the payment method
Applicable and required when changing the payment method. The new payment method is also an already registered payment method of the contact
Applicable and required when changing the billing day
Day of week for subscriptions with billing cycle shorter than a month
Day of month applicable for subscriptions with billing cycle longer than a month
Responses
Body
The subscription action’s identifier
PUT https://sandbox.crm.com/self-service/v2/subscriptions/ab5f8b2e-092f-4848-8f46-31df1c014060 HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"action": "CHANGE_BILLING_DAY",
"payment_method_id": "ac5401c3-b2e6-2d99-171f-276084d97536",
"billing_day": {
"day_of_week": "MONDAY",
"day_of_month": 15
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "ac5401c3-b2e6-2d99-171f-276084d97536"
}
{id}
/servicesReturns a list of services to which the contact subscribed to
Path variables
Contact identifier
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
The product’s classification
Set it to true to also include information for the services’ subscription.
Request headers
The publishable api key for application identification
Responses
Body
Subscription service identifier
Service state
Date on which the service was added to the subscripiton
First activation date
Shows whether the service is a recurring charges (i.e. a subscription expense service) or not.
Shows whether the service provides usage allowance to the contact
Indicates whether scheduled actions exist for this service
Service product. This product is either of Termed or One-time service classification
Product identifier
Product SKU
Product name
The service’s composition
The service’s price terms information
Price identifier
Service price per billing cycle.
The service’s billing period
Billing period duration
Unit of time
Detailed billing information for the service
Latest date from which the service was billed
the date until which the service is billed
Service terms as these were defines by the selected orice
Billing model
Service auto-renewed or not
Service currently in contract period or not. Set to False if service’s contract period ended or when a service was never in contract.
Service quantity
Service’s contract informaiton. This information is returned even after the service exits its contract period.
Duration
unit of time
Contract period start date
Contract period end date
Service’s trial period. This informaiton is returned even after the service’s trial ends.
Show if service is currently on trial. Set to False if trial period ended.
Trial start date
Trial period end date
Trial period duration
Trial period unit of time
Service’s paused period. Returned only while a service is paused.
Paused period start date
Paused period end date
The service’s bundles service. Applicable for services ordered as part of a flexible bundle.
The bundle service’s identifier
The bundle service’s product
Product identifier
Product SKU
Product name
List of component services. Applicable when the returned service is a bundle, i.e. it includes a list of component services.
Component service identifier
Date on which the component was included in the bundle
First activation date of the component service
Component service currently in contract or not.
Component’s state
Component service product
Product identifier
Product SKU
The component service’s price
Price
The service’s subscription
Subscription identifier
Subscription code
Subscription’s terms
Subscirption is funded by the Account or the CRM Wallet
On which day the subscirption’s services are billed
Day of month
Day of week for subscriptions with billing cycle sshorter than a month
Subscription’s payment method which is also one of the contact’s payment methods
Payment method type
Payment method’s identity, i.e. details to clearly show which is the payment method
Contact payment method identifier
Basic informaiton of the payment method
GET https://sandbox.crm.com/self-service/v2/contacts/ab5f8b2e-092f-4848-8f46-31df1c014060/services HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"state": "EFFECTIVE",
"added_on": 1625555027,
"first_activated_on": 1625555027,
"is_recurring_charge": true,
"has_allowance": "true",
"scheduled_actions": "true",
"product": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "TV001",
"name": "Films",
"classification": "TERMED_SERVICE",
"type_composition": "FLAT"
},
"price": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"price": 9.99,
"currency_code": "EUR",
"tax_model": "TAX_INCLUSIVE",
"billing_period": {
"duration": 1,
"uot": "MONTH"
}
},
"billing": {
"billed_from": 1625555027,
"billed_to": 1625555027
},
"terms": {
"billing_model": "PRE_BILL",
"auto_renew": true,
"in_contract": true,
"quantity": 1,
"contract_period": {
"duration": 18,
"uot": "MONTHS",
"start_date": 1625555027,
"end_date": 1625555027
}
},
"trial_period": {
"in_trial": true,
"start_date": 1625555027,
"end_date": 1625555027,
"duration": 7,
"uot": "DAYS"
},
"paused_period": {
"start_date": 1625555027,
"end_date": 1625555027
},
"bundled_service": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"product": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "GOLD",
"name": "Gold Package"
}
},
"components": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"added_on": 1625555027,
"first_activated_on": 1625555027,
"in_contract": true,
"state": "NOTE_EFFECTIVE",
"product": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "FILMS",
"name": "Films"
},
"price": {
"price": 9.99,
"currency_code": "EUR"
}
}
],
"subscription": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"code": "60012321123",
"terms": {
"funding_source": "WALLET",
"billing_day": {
"day_of_month": 1,
"day_of_week": "WEDNESDAY"
},
"payment_method": {
"type": "CARD",
"identity": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"identifier": "Visa *****1234 03/25"
}
}
}
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
Returns a list of actions related to either the contact or the subscription or for a specific service. at elast one fo the three parameters must be specified to successfully retrieve results. Multiple action can be returned, on any state
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
Returns a list of actions for a specific subscription
Returns all subscription actions for a specific contact
Returns a list of actions related to a subscription service
If specified, then only Scheduled actions are returned.
Request headers
Authorization Token
Responses
Body
Subscription action identifier
Subscription action code
The action’s state
Action’s behaviour code
Action’s business classification code
Date on which the action was successfully performed
Date on which the action is scheduled to be performed
Date on which the action was Cancelled
Date on which the action’s execution was rejected
Action’s category
Action category identifier
Action category name
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/subscriptions/actions?subscription_id=4dc0809f-ed91-4b68-b912-5bd6064d901e&contact_id=4dc0809f-ed91-4b68-b912-5bd6064d901e&service_id=4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"code": "5443456789999098",
"state": "SCHEDULED",
"behaviour_code": "REMOVE_SERVICE",
"business_classification_code": "",
"executed_on": 1658412097,
"scheduled_on": 1658412097,
"cancelled_on": 1658412097,
"rejected_on": 1658412097,
"category": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"name": "Regret service"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
Returns detailed information for a subscription action.
Path variables
Subscription action identifier
Request headers
Authorization Token
Responses
Body
Subscription action code
Subscription action state
Action’s behaviour code
Action’s business classification code
Date on which the action was executed successfully
Date on which action is scheduled to be executed
Date on which the action was cancelled
Date on which the action was rejected
Additional informaiton on why the action was rejected
The subscription
Subscription identifier
Subscription code
Who submitted the action. In the case of action submitted by a user, additional user infromaiton is returned, otherwise the contact is the one requesting for this change.
Indicates whether the action was submitted by the contact at the front-end or by a user.
User identifier
User full name
User’s username
Who cancelled the action. In the case of a user cancelling the action, additional user infromation is returned.
User identifier
User’s full name
Username
Action’s category
Action category idnetifier
Action name
A list of sevices affected by the subscription action. With a single action one or more services are affected. An action might affect a subscription’s services in 3 different ways
How the service was affected by the action
The service’s new quantity
The service’s new price
The service’s new price terms identifier
The new price
Billing period
Duration of billing period
Unit of time
The service’s product
Product identifier
Product SKU
Product name
The action’s affected Devices. With a single actions one or more devices might be affected
How the device was affected by the action
Device detaled information
Device identifier
Device serial number
Device electronic ID
Device product
Product identifier
Product SKU
Product name
GET https://sandbox.crm.com/self-service/v2/subscriptions/actions/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"code": "5444567099900907",
"state": "SCHEDULED",
"behaviour_code": "CHANGE_SERVICE",
"business_classification_code": "UPGRADE",
"executed_on": 1658412644,
"scheduled_on": 1658412644,
"cancelled_on": 1658412643,
"rejected_on": 1658412643,
"rejection_reason": "Service already exists on the subscription",
"subscription": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"code": "9900004343331234"
},
"submitted_by": {
"type": "USER",
"id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
"name": "John Smith",
"username": "johnsmith@crm.com"
},
"cancelled_by": {
"type": "USER",
"id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
"name": "John Smith",
"username": "johnsmith@crm.com"
},
"category": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"name": "High cost"
},
"services": [
{
"change_type": "ADDED",
"quantity": 2,
"price": {
"price_terms_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"price": 9.99,
"billing_period": {
"duration": 1,
"uot": "MONTHS"
}
},
"product": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "SVOD",
"name": "Auxsat TV"
}
}
],
"devices": [
{
"change_type": "REMOVED",
"device": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"serial_number": "001112912232",
"electronic_id": "001112912232",
"product": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "HDSTB",
"name": "HD Set Top Box"
}
}
}
]
}
{id}
Updates information for an existing subscription action. Only scheduled actions can be amended by wither Cancelling them
Path variables
Subscription action identifier
Request headers
Authorization Token
The publishable api key for application identification
Request body
How the action will be updated
Cancel a schedule action
Update a schedule action
Resubmit a rejected action
Action category identifier
Set a new scheduled date for the action. Applicable when updating scheduled actions or when resubmitting rejected ones
Set to True when business rules dectate an allowed date on which an action can be performed. The action will be scheduled by the process by applying the business rules.
Applicable hwne updating a scheduled aciton that includes period information, such as Pause Service
The new period’s duraiton in days
The new period’s end date
Responses
Body
The updated action’s identifier
Returned when business rules are applied and suggest a valid date on which the action can be performed. Use this date in a sub-sequent call fo the same Web API as the action’s scheduled date.
PUT https://sandbox.crm.com/self-service/v2/subscriptions/actions/{id} HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"action": "CANCEL",
"category_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"scheduled_date": 1668242869,
"use_proposed_date": "true",
"period_settings": {
"duration_in_days": 5,
"ends_on": 1234567
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"proposed_date": 1668251375
}
Top-ups is an easy way to add money to an Account or a Wallet. Contacts top up their accounts or wallet with funds to be used in upcoming payments.Top-ups might retrieve money from one of the contact’s payment methods.
Create a new Topup for a Wallet or an Account.
Request headers
The publishable api key for application identification
Request body
The topup’s amount
Unique identifier fo the payment method
If not specified, then the current date is set
The top up’s code. If not specified, then a unique 16-digit code is assigned
The payment intent identifier that is returned by a payment gateway integrator
The custom field’s unique key
The custom field’s value
Responses
Body
The Top up’s unique identifier
POST https://sandbox.crm.com/self-service/v2/topups/ HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"amount": 1,
"payment_method": {
"type": "CARD",
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
},
"topup_date": 14423423,
"code": "1234567891234567",
"commerce_pool_id": "",
"intent_id": "",
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
]
}
Transfers can be used to move money between accounts or even betwen an accout ad a wallet (and vise-versa).
Transfers an amount of money from one account or wallet to another account or wallet.A single transfer can be created per Web API call. An amount of money can be transferred to another account/wallet of the same contact who owns the origin account/wallet or transferred to another contact’s account/wallet.
Request headers
The publishable api key for application identification
Request body
Transfer’s code. If not specified, a random and unique 16-digits code is assigned to the Transfer
The transfer’s date
the transfer’s amount. The amount is in the oorigin entity’s currenct
Where the money will be transferred from. Either an account or the wallet must be specified
Account identifier
Wallet idetifier
Where the money will be transferred to. Either an account or the wallet must be specified
Account identifier
Wallet identifier
Applicable only when transerring money to a Wallet. Group of conditions that define how the transer’s amount can be spent. Specifying these conditions will move the money to the wallet’s Commerce balance otherwise, money goes to Open balance.
Responses
Body
The Transfer’s unique identifier
POST https://sandbox.crm.com/self-service/v2/transfers HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"code": "1234567891234567",
"transfer_date": 1620999582,
"amount": 9.99,
"origin": {
"account_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"wallet_id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
},
"destination": {
"account_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"wallet_id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
},
"commerce_pool_id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
}
{id}
/wallets{id}
{id}
/topup_settings{id}
/limits{id}
{id}
/limits{id}
/conditional_balances{id}
/transactionsRequest One Time Password for the contact’s wallet. OTP will be sent to the contact’s email or phone based on which one the contact used during the first registration
Request headers
The publishable api key for application identification
Request body
Information on how the wallet will be identified.Either an email address or a phone number must be specified
The wallet identity’s type
The identity’s value
Country code requird when the wallet’s identity type is set to Phone.
Responses
POST https://sandbox.crm.com/self-service/v2/wallets/otp HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"identity": {
"type": "EMAIL",
"value": "some_email@email.com",
"country_code": "CYP"
}
}
{id}
/walletsSet ups the Wallet for the contact by either creating a new one or linking the wallet to the contact. If the contact is aware that he/she already owns a wallet, then OTP was previously sent to the wallet’s identity(email or phone). Otherwise, contacts should specify how they want to identify their wallets so as to create a new one. A single wallet is created for a contact.
Path variables
Contact identifier
Request headers
The publishable api key for application identification
Request body
The OTP sent to the customer that will be used to identify and locate the wallet, if any exists for the contact. If provided and validated, then the existing wallet is linked to the new registered contact.
The wallet’s identity. Applicable if the contact does not have a wallet and a new one will be generated having the specified identity.
Determines whether the identity is the contact’s email or phone. Identity will be used for any future registrations fo the contact in another business across the network of businesses.
The email or phone value
Required when the phone is the wallet’s identity
The wallet’s code. If not specified, then it will be automatically assigned a unique and random 16-digit code.
Responses
Body
The unique identifier of the linked Wallet
POST https://sandbox.crm.com/self-service/v2/contacts/ab5f8b2e-092f-4848-8f46-31df1c014060/wallets HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"otp": "",
"identity": {
"type": "EMAIL",
"value": "someemail@email.com",
"country_code": "CYP"
},
"code": "5444406970005411"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "4aaf8b2e-092f-4848-8f46-31df1c043bcf"
}
{id}
Retrieves detailed information for the contact’s wallet. Only the Wallet balances for the Business from which the Web API is accessed are returned (i.e. if the contact has wallet balance from other Businesses, then these balances are not returned).
Path variables
The unique identifier of the wallet
Request headers
The publishable api key for application identification
Responses
Body
Wallet uniue identifier
Wallet code which by default is a unique and random 16-digit code number.
List of wallet balances. Each wallet has CRM and Business balances but through this Web API only the balance for the Business to which the contact signed in are returned.
The wallet balance type which can either be a CRM balance or a Business balance of the organisation from which the balance is accessed.
Total wallet balance that includes open and commerce balances
Wallet Open Balance
Wallet Commerce Balance.
The crrency of the amounts.
GET https://sandbox.crm.com/self-service/v2/wallets/{id} HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"code": "4345975043001210",
"balances": [
{
"type": "BUSINESS",
"balance": 9.99,
"open": 1.54,
"commerce": 8.45,
"currency_code": "EUR"
}
]
}
{id}
/topup_settingsRetrieves the wallet’s Auto and Termed Top-up settings, as these are specified by the contact. If nothing is specified, then no automated or termed top-ups are perforemd since contatcs must opt-in to suh proceses by specigying this piece of information.
Path variables
Request headers
The publishable api key for application identification
Responses
Body
Automatically top up the wallet with an amount once a minimum threshold is reached, using one of the contact’s payment methods.
The minimum wallet balance at which the auto-top up will be triggered
The top-up’s amount
The amount’s currency
One of the wallet’s payment methods that will be used in automatic top-up
Payment method type
The contact’s payment method identifier
Some information of the contact payment method
Top up the wallet on a frequent basis using one of the payment methods
The top-up’s amount
The amount’s currency
How often the wallet will be topped-up. Frequeency is specified using a Cronn Expression
Frequecy period
One of the wallet’s payment methods that will be used in top-up
Payment method type
Payment method identifier
Some basic information for the payment method
GET https://sandbox.crm.com/self-service/v2/wallets/{id}/topup_settings HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"auto_topup": {
"threshold": 0.01,
"amount": 10.5,
"currency_code": "EUR",
"payment _method": {
"type": "CARD",
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"identifier": "****1234"
}
},
"termed_topup": {
"amount": 10.5,
"currency_code": "EUR",
"frequency": "",
"period": "WEEKLY",
"payment_method": {
"type": "CARD",
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"identifier": "****1234"
}
}
}
{id}
/limitsReturns a lis tof wallet limit rules as these are specified by the contact. A limit rule determines conditions of how much wallet money can be spent for variosu transactions.
Path variables
Request headers
The publishable api key for application identification
Responses
Body
Limit rule identifier
The rule’s name
Maximum number of wallet journal transactions
Maximum amount among all wallet journal transactions
Wallet transactions’ currency code
The period during which the wallet trasnactions are performed
List of wallet trasnactions for which the rule is applied
["DEBIT"]
GET https://sandbox.crm.com/self-service/v2/wallets/{id}/limits HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"limit_rules": [
[
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"name": "Monthly topups",
"maximum_number": 10,
"maximum_amount": 99.99,
"currency_code": "EUR",
"period": "DAILY",
"applies_for": [
"DEBIT"
]
}
]
]
}
{id}
Updates a single Wallet.
Path variables
Request headers
Authorization Token
The publishable api key for application identification
Request body
The minimum wallet business open balance at which the auto-top up will be triggered
The top-up’s amount
The amount’s currency
One of the wallet’s payment methods that will be used in top-up
Payment method type
Wallet payment method identifier
The top-up’s amount
The amount’s currency
How often the wallet will be topped-up. Has to specified using a Cronn Expression
The termed top-ups’s period.
One of the wallet’s payment methods that will be used in top-up
Payment method type
Wallet payment method identifier
Responses
Body
The unique identifier of the updated waller
PUT https://sandbox.crm.com/self-service/v2/wallet/{id} HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"auto_topup": {
"threshold": 0.01,
"amount": 10.5,
"currency_code": "EUR",
"payment_method": {
"type": "CARD",
"id": "acf8b8ac-a325-a644-c866-a6c9d62ff11b"
}
},
"termed_topup": {
"amount": 10.5,
"currency_code": "EUR",
"frequency": "0 0 21 ? * MON *",
"period": "WEEKLY",
"payment_method": {
"type": "ACCOUNT_DEBIT",
"id": "acf8b8ac-a325-a644-c866-a6c9d62ff11b"
}
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
}
{id}
/limitsPath variables
Wallet unique identifier
Request headers
Authorization Token
Request body
Limit rule identifier
The rule’s name that has to be unique
Maximum number of wallet journal transactions
Maximum amount among all wallet journal transactions
Wallet transactions’ currency code
The period during which the wallet trasnactions are performed
List of wallet trasnactions for which the rule is applied
["DEBIT"]
Responses
Body
The unique identifier of the updated wallet
PUT https://sandbox.crm.com/self-service/v2/wallet/ab5f8b2e-092f-4848-8f46-31df1c014060/limits HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"limit_rules": [
[
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"name": "Monthly topups",
"maximum_number": 10,
"maximum_amount": 99.99,
"currency_code": "EUR",
"period": "MONTHLY",
"applies_for": [
"DEBIT"
]
}
]
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
}
{id}
/conditional_balancesGet the wallet commerce balances split per commerce pool
Path variables
The wallet (identifier) whose commerce balances will be retrieved
Request parameters
The organisation that requests the wallet balance
Filter based on commerce pool
Defines whether balance breakdown should be returned based on primary currency or not (if not specified, primary currency is returned)
Defines whether expiration details should be retrieved or not
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 response succeeded
Body
The spend condition group identifier
The name of the spend condition group
The amount that is allocated to the specified spend condition
The organisations where the amount can be spent at
The organisation identifier
The name of the organisation
Information about the specified addresses
The location name
The main address information
Additional address information
The address state/province.county
The address town/city
The address postal code
The address country
The address care of
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
The products that the amount can be spent for
The type of the ID to be provided
The ID of the product condition (based on the type provided)
The name of the product
The descrtipion of the product
The time when the amount can be spent
Details about the period condition
Defines the month as integer (1-12)
Defines the day in a week as integer (1-7). Week starts with Monday (1)
Start time within a day
End time within a day
Defines the amounts expiring in periods. Available only if the parameter include_expiration is set to true
The amount that will expire in up to 30 days
The amount that will expire from 30 to 60 days
The amount that will expire from 60 to 90 days
The amount that will expire in more than 90 days
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v1/wallets/acf8b8ac-a325-a644-c866-a6c9d62ff11b/conditional_balances HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Happy Hour",
"amount": 100.5,
"organisations": [
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Cafe",
"locations": [
{
"name": "Main Store",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CY",
"care_of": "Lorem Ipsum",
"lat": "35.157115",
"lon": "33.313719",
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
]
}
],
"products": [
{
"id_type": "FAMILY",
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Coffee",
"description": "Brazilian Coffee"
}
],
"timings": {
"periods": [
{
"month": 1,
"day": 1,
"start_time": "19:00",
"end_time": "21:00"
}
]
},
"expiration": {
"zero_to_thirty": 50.5,
"thirty_to_sixty": 50.5,
"sixty_to_ninety": 50.5,
"ninety_plus": 50.5
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/transactionsGet all wallet journal transactions for a specific wallet with amount information as well as reasoning on how they were originated.
Path variables
The wallet (identifier) whose wallet transactions will be retrieved
Request parameters
Filters wallet transactions based on the transaction type
Filter based on the posted 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 posted date is greater than this value
Returns results where the posted date is greater than or equal to this value
Returns results where the posted date is less than this value
Returns results where the posted date is less then or equal to this value
The wallet transaction’s currency.IF not specified, then all trasnactions are returned.
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 response succeeded
Body
The wallet journal identifier
The wallet journal amount
The wallet’s currency
The wallet journal type
The date that the wallet journal was posted
Details about the reward event
The type of the event
The event (unique) code
The amount that was awarded, redeemed or spent
The event’s amount currency
Defines how customer can sign up to the reward scheme
The event state
Applicable only for Award Transactions
The date on which such event was posted
Expiry date of awarded amount
Details about reward offer
The reward offer identifier
The reward offer name
Details about the financial event related to the wallet journal transaction
The event type
The event identifier
The event number (e.g. entity number, like invoice number, credit note number, refund number)
The event reference number, which can be: a) Reference Number, if the transaction is of type payment, invoice, credit note, payment cancellation, refund. OR b) Code, if the transaction is a top-up or a transfer
The event life cycle state
The event amount
The financial event’s currency
The date on which such event was posted
Details about the wallet fee related to the wallet journal transaction
The wallet fee type
On Credit Wallet Transactions
On Debit Wallet Transactions
The fee rule name
Details about the order related to the wallet journal transaction
The order identifier
The order number
The order total cost
The cost’s currency
The date on which the order was submitted
Details about organisation
The organisation identifier
The organisation name
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/wallets/f76f96fc-22da-4f68-44d2-b9aeffa65d0f/transactions HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "dd6cf22a-4292-a7f6-28bd-37501970cad4",
"amount": 9.99,
"currency_code": "EUR",
"type": "DEBIT",
"posted_on": 1620912893,
"reward_event": {
"type": "SPEND",
"code": "123234342342432342324r43",
"amount": 14.99,
"currency_code": "USD",
"redeem_method": "DEFEREED",
"state": "EXPIRED",
"date": 1614954223,
"expiry_date": 1614954223,
"reward_offer": {
"id": "7ff08bc0-c7e9-c9fe-f752-71cfb3ee0dc3",
"name": "Birthday Offer"
}
},
"financial_event": {
"type": "PASS_REDEMPTION",
"id": "7ff08bc0-c7e9-c9fe-f752-71cfb3ee0dc3",
"number": "1234",
"reference_number": "REF12343",
"state": "POSTED",
"amount": 112.24,
"currency_code": "EUR",
"date": 1614954223
},
"wallet_fee": {
"type": "DEBIT",
"name": "1% on all wallet transactions"
},
"order": {
"id": "ecc95c03-26bc-f5d8-abe4-099c05cb6cd1",
"number": "ORD001",
"total_cost": 1.99,
"currency_code": "EUR",
"submitted_on": 1634282740,
"fulfilled_by": {
"id": "087f8a94-a44c-5b0d-f932-2a50ec03c20c",
"name": "CRM"
}
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/payment_methods{id}
/payment_methods/{payment_method_id}
{id}
/payment_methodsGet a list of a wallet’s payment methods
Path variables
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
Responses
Body
The card details (applicable if the payment method is set to CARD)
The card name
The card brand
The first 6 digits of the card
The last 4 digits of the card
3 char country code
The card expiration month
The card expiration year
Information about the card holder
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 address
The state related to the card address
The country related to the card address
Legacy payment gateways
Th epayment gateway integration information
Integration unique identifier
Integration name
The token of the payment method as this was generated by the payment gateway
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v1/wallets/{id}/payment_methods HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "",
"is_primary": true,
"is_backup": true,
"payment_method_type": "CARD",
"card": {
"name": "Default Card",
"brand": "VISA",
"first6": "42424242",
"last4": "4242",
"country_of_issue": "CYP",
"expiration_month": 6,
"expiration_year": 2021,
"card_holder_details": {
"card_holder_name": "John Alias Doe",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"address_city": "Nicosia",
"address_zip": "2000",
"address_state": "Egkomi",
"address_country": "CY"
},
"gateway_token": [
{
"gateway": "JCC_MERCHANT",
"integration": {
"id": "",
"name": ""
},
"token": "123654789654"
}
]
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/payment_methods/{payment_method_id}
Remove one of the wallet’s payment method
Path variables
Request headers
Authorization Token
Responses
DELETE https://sandbox.crm.com/self-service/v1/wallets/{id}/payment_methods/{payment_method_id} HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 204 No Content
Retrieve a list of service commands as implemented in a provisioning provider integration
Request parameters
The unique identifier of the provisioning provider integration.
Request headers
The publishable api key for application identification
Responses
The request has succeeded
Body
The name of the command
The label of the command as this will be displayed in the User interface
The command’s code. This code will be used when calling back the integraiton to execute the service command
A description of the command
Any additional information that the provisioning provider requires in order to successfully perform the command. The provisioning provider integration informs CRM about this required input
Unique key for the attribute.
Label as this will be displayed in th eUser interface
A description for the required field
The field’s type (how it will be presented in the User Interface)
Indicates whether the requested information is mandatory or not. All mandatory fields must be specified for a successful execution of the command on the provider’s side
GET https://sandbox.crm.com/self-service/v2/provisioning/service_commands HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"name": "Reset Service",
"label": "Reset Service",
"code": "RESET_SERVICE",
"description": "Resets the service",
"metadata_attributes": [
{
"key": "pin",
"label": "PIN",
"description": "the new pin",
"field": "SELECTION",
"is_mandatory": true
}
]
}
]
}
Send a command for a service over to the provisoning adapter. The supported commands as well as detailed information on how to call them such as the required input paramters, can be retrieved from the plugin integration via the GET provisioning/service_commands Web API.
Request headers
Authorization Token
The publishable api key for application identification
Request body
The unique identifier of the provisioning provider integration
The service for which the command will be sent
The command’s code as this was provided by the integration through Get Service Command Web API.
Contact who subscribed to the service
Contact identifier
Contact code
Contact full name
A list of extra parameters (apart from the external reference) that are required to successfully send the command. Get Service Commands Web API indicates which are there paramteres and which ones are also mandatory
The parameter’s key
The parameter’s value
Responses
The request has succeeded
Body
The request identifier
POST https://sandbox.crm.com/self-service/v2/provisioning/service_commands HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"integration_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"service_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"code": "RESET_SERVICE",
"contact": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"code": "A0111012",
"name": "John Smith"
},
"metadata_attributes": [
{
"key": "pin",
"value": "1234"
}
]
}
HTTP/1.1 201 Created
Returns a list of addresses based on the external address registry systems that CRM.COM integrates with
Request parameters
The address registry that lookup will be performed
The address that lookup will be performed against (address and latlng are semi-optional)
The lat and lng coordinates that lookup will be performed against (address and latlng are semi-optional)
Request headers
Authorization Token
Responses
The request has succeeded
Body
The full address as returned by the address registry
The address information
Additional information about the address
The state/province/county of the address
The town/city of the address
The postal code of the address
The country code of the address
The latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies a location
GET /address_lookup?integrator=GOOGLE&address=Elia Papakyriakou, Egkomi, 2415, Nicosia, Cyprus HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"address": "Elia Papakyriakou 21, Egkomi, 2415, Nicosia, Cyprus",
"lat": 12.234,
"lon": 23.453,
"googlePlaceId": "123d23w23fw322"
},
{
"address": "Elia Papakyriakou 22, Egkomi, 2415, Nicosia, Cyprus",
"lat": 12.234,
"lon": 23.453,
"googlePlaceId": "123d23w23fw322"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 100
}
}
Lists a number of APIs that can be used for retrieving configuration settings, required by the mobile/web client
Retrieve details for a specific application
Request parameters
The platform application identifier
The application version number
Use cloud name to retrieve Web APP settings.
Filter content translations to the selected language
Request headers
The publishable api key for application identification
Responses
Successfull Completed
Body
The application identifier
The application name
The application description
The application type
The public API Key to be used on subsequent API calls
Details about the app appearance
The application color style
Defines the component on which the color will be applied
The color (hex) code
The application text font style
Defines the component on which the font will be applied
The text font style that the app will use
The colour scheme of the app
The homepage layout of the app
JSON script contaning specific mapping of existing colour settings to particular elements of the app. Used in special circumstances to allow fine tuning of colour mapping without the need to rebuild the app. This is maintatined solely by CRMI and is not visible on the back-end UI.
Defines the app details (about, terms and conditions, privacy policy)
The application content information
The content type
About
Terms & Conditions
Privacy Policy
Frequently-Asked Questions
The detail URL endpoint (URL or Content is required)
The detail rich content (URL or Content is required)
The application “contact us” details
The “contact us” email address
The “contact us” phone
The phone country code
The phone number
The “contact us” website (URL endpoint)
Details about the features that will be supported by the app
Defines the supported contact features
Defines the supported business network features
Defines whether business network features should be available
Defines whether multitenancy features will be available
Defines whether multitenancy is supported
Defines the supported contact features
How the contact code will be depicted on the app/port, for scanning purposes
As a barcode
As a QR code
Defines whether app will prompt contacts to link their past loyalty account with CRM
Defines whether communities (relationships between contacts) features will be available
Defines whether communities is supported
Defines the details that a contact can provide
The contact detail
Defines if such detail is supported or not
Defines the supported crm features
Defines whether contact features should be available
Defines the supported service request features
Defines whether contacts will be able to create service requests
Defines whether and which service request queue, contacts will be able to select
The service request queue identifier
The service request queue name
Defines the supported finance features
Defines whether finance features should be available
Defines whether contacts will be able to top up their wallets
Defines the supported redeem pass features
Defines whether contacts will be able to redeem a pass
Defines whether pass redemption should be supported by other attributes
The type of supplementary attribute
Defines the allowed payment methods to be used
The allowed payment method type
Defines the supported ordering features
Defines whether order features should be available
Defines whether pick up is supported as supply method
Defines whether delivery is supported as supply method
Defines whether direct sale is supported as supply method
Defines whether contacts will be able to select from which location an order will be placed (via a list of merchants/venues) or not
Ability to select location
Location won’t be selectable
Defines whether contact can set preferred organisation for ordering
Defines the countries where orders can be made
The country (code)
Defines a list of order catalogs that should filter available products to order
The order catalog identifier
The order catalog name
Defines whether contact can pay for order using wallet funds
Defines whether contact can pay for orders using wallet funds
Defines whether contacts can specific the wallet funds amount to use on orders
Defines whether the wallet fund amount must cover the full basket amount
Defines the supported rewards features
Defines whether reward features should be available
Defines whether reward tiering will be supported
Defines whether contact can select his/her preferred organisation for rewards
Defines the supported refer a friend features
Defines whether refer a friend will be supported
Defines the communication method that should be used for refer a friend (required when refer a friend is enabled)
["SMS"]
Defines the supported OTP spend features
Defines whether OTP spend will be supported
Defines the supplementary attributes that will be supported for OTP spends (required when OTP spend is enabled)
The type of supplementary attribute
Defines the supported contact self-submit purchase events features
Defines whether contact can self-submit purchase events
Defines how self-submit (reclaim) purchase identification will be made (required when contact self-submit purchase is enabled)
["BARCODE"]
Defines the supported marketing content features
Defines whether marketing content should be available
Define links for embedded browser in front-end systems
Defines the title of the link
Defines the URL of the link
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Defines the supported mobile pass features
Defines whether mobile pass should be available
The supported merchant related features
Defines the supported reward features
Defines whether reward features should be available
Defines the supported purchase event features
Defines whether merchants can submit purchase events
Defines whether the merchant app supports submission of spend requests
Defines whether the purchase will be posted successfully only if requested spend amount fully covers the purchase amount
Details on how customers can auth by the app
Defines whether contacts can register & sign-in based on email and password
Defines whether contacts can register & sign-in based on email and one-time password
Defines whether contacts can register & sign-in based on phone and one-time password
Defines whether contacts can register & sign-in based on Facebook (including Facebook authentication details)
Defines whether Facebook authentication is enabled or not
The App ID required for Facebbok authentication
Supported authentication based on Google
Defines whether Google authentication is enabled or not
The App ID required for Google authentication
Defines whether contacts will be able to manage their authentication details
Defiens whether contact will be able to add new authentication details
Defiens whether contact will be able to update existing authentication details
Defiens whether contact will be able to delete existing authentication details
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Details about creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
GET https://sandbox.crm.com/self-service/v2/applications?platform_app_id=f9e4b742-bfe1-09dc-f623-de71aaed61ff HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "0b9ab3de-af32-47f9-faca-ff5c94063819",
"name": "Brew Coffee App",
"description": "Best coffee app",
"type": "NATIVE",
"public_key": "71285392-8660-43e2-8fc3-ef1a61edbcd0",
"appearance": {
"colors": [
{
"type": "LANDING_CARD",
"value": "#eb4034"
}
],
"fonts": [
{
"type": "TEXT",
"font": "Open Sans"
}
],
"dark_mode": true,
"homepage_layout": "LAYOUT2",
"advanced_colour_mapping": "let appearance = { main_color: '#ffffff', //landing_page.text_color, landing_page.button_text_color, main_page.card_text_color, main_page.icon_color, side_bar.text_color, side_bar.icon_color, tab_bar.background_color button_color: '#50e3c2',//landing_page.button_color, main_page.button_color, main_page.button_selected, side_bar.background_color, tab_bar.selected, card_color: '#F0F0F3', //main_page.button_unselected, main_page.card_bg_color, main_page.input_background_color background_color: '#d32166', //landing_page.background_color text_normal_color: '#212121', //main_page.text_label_color, main_page.input_label_color text_main_color: '#03041D', //main_page.button_unselected_text_color, main_page.text_color, main_page.text_title_color, main_page.card_icon_color, main_page.input_text_color border_color: 'rgba(3, 4, 29, 0.16)', //main_page.border_button_color, main_page.border_input_color, tab_bar.unselected, darkmode_color: '#212121', //background pages when dark_mode = true darkmode_text: '#ffffff', //main_page.text_color }"
},
"information": {
"content": [
{
"type": "FAQS",
"url": "https?/crm.com",
"rich_content": "Terms & Conditions"
}
],
"contact_us": {
"email_address": "info@crm.com",
"phone": {
"country_code": "CYP",
"number": "99123456"
},
"website": "https://crm.com"
}
},
"features": {
"contact": {
"business_network": {
"is_supported": true,
"multitenancy": {
"is_supported": "true"
}
},
"contact": {
"code_representation": "BARCODE",
"existing_contacts": true,
"people": {
"is_supported": "true"
},
"profile": [
{
"type": "NAMEDAY",
"is_supported": "true"
}
]
},
"crm": {
"is_supported": true,
"service_requests": {
"is_supported": true,
"supported_queues": [
{
"id": "8237416b-ecca-769a-a38a-293320b0ffdf",
"name": ""
}
]
}
},
"finance": {
"is_supported": true,
"wallet_top_up": true,
"redeem_pass": {
"is_supported": "false",
"pass_attributes": [
{
"type": "VALUE"
}
]
},
"payment_methods": [
{
"type": "CASH"
}
]
},
"order": {
"is_supported": true,
"pick_up": true,
"delivery": true,
"direct_sale": true,
"model": "MARKETPLACE",
"preferred_organisation": true,
"order_countries": [
{
"country": "CYP"
}
],
"order_catalogs": [
{
"id": "676055d9-fe79-6836-8a50-c2d3764e9919",
"name": "Network Products"
}
],
"use_wallet_funds": {
"is_supported": true,
"specific_funds_amount": true,
"cover_full_basket": true
}
},
"reward": {
"is_supported": true,
"tiering": true,
"preferred_organisation": true,
"refer_friend": {
"is_supported": true,
"refer_methods": [
"SMS"
]
},
"otp_spend": {
"is_supported": true,
"spend_attributes": [
{
"type": "AMOUNT"
}
]
},
"self_submit_purchases": {
"is_supported": true,
"self_submit_methods": [
"BARCODE"
]
}
},
"marketing": {
"is_supported": true,
"embedded_links": [
{
"title": "New and upcoming events",
"url": "https://www.guababechbar.com/news&events",
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "ATTACHMENT",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
]
},
"mobile_pass": {
"is_supported": "true"
}
},
"merchant": {
"reward": {
"is_supported": true,
"purchase": {
"is_supported": true,
"allow_spend": true,
"restrict_fully_covered": true
}
}
}
},
"authentication": {
"email_password": true,
"email_otp": "false",
"sms_otp": true,
"facebook": {
"is_supported": "false",
"app_id": "dsf-w-f-esf-23f-w-eff2f"
},
"google": {
"is_supported": "false",
"app_id": "try-23-sww22"
}
},
"creatives": [
{
"id": "a3f1f6b3-8d49-3a72-e48e-617dd6004d41",
"usage_type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
Returns a list of business activities
Request parameters
The name of the business activity
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
Information about the retrieved business activities
The business activity identifier
The business activity name
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET /business_activities HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "E4AC253114B84DF2B347996DC277DDDF",
"name": "Bar & Grill"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 100
}
}
Retrieve a list of contact community relations based on search criteria (e.g. all contact community relations)
Request parameters
Filter based on contact community relation name (behave as like)
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 contact community relation identifier
The contact community relation name
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/communities/relations HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "459f7d6e-09bb-5609-c0ad-846e369ef39e",
"name": "Employees"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Retrieves the supported currencies
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 publishable api key for application identification
Responses
Body
The currency code
Defines whether the currency is the base (default) of the organisation
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/currencies HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"code": "EUR",
"is_default": "false"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Retrieve a list of custom fields based on search criteria (e.g. all contant custom fields)
Request parameters
The name of the entity whose custom fields will be retrieved
Filters custom fields based on visibility conditions
Request headers
Authorization Token
The publishable api key for application identification
Responses
The request has succeeded
Body
The custom field identifier
The custom field (unique) key
The custom field label
The custom field tooltip
Defines whether the custom field should be visible or not
The custom field’s UI field type
The related entity with the custom field
Defines the restrictions that will be applied on a custom field’s content (if applicable)
The maximum allowed number of characters that the custom field can support
The minimum allowed number that the custom field can support
The maximum allowed number that the custom field can support
The maximum allowed number of decimals that the custom field can support
The available options that a user can select when the custom field is selection, checkbox or radio button based
The field option key
The field option text
Defines whther the field option is the default one
The field option order number
GET https://sandbox.crm.com/self-service/v1/custom_fields?entity=CONTACTS HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"key": "reviews",
"label": "Reviews",
"tooltip": "Total Reviews Given",
"visible": "true",
"field": "CHECKBOXES",
"entity": "CONTACTS"
}
]
}
Returns a list of industries
Request parameters
The name of the industry
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
Information about the retrieved industries
The industry identifier
The industry name
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET /industries HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "E4AC253114B84DF2B347996DC277DDDF",
"name": "Advertising"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 100
}
}
Returns a list of industry sectors
Request parameters
The name of the industry sector
The name of the industry that multiple sectors belong 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
Information about the retrieved industry sectors
The industry sector identifier
The industry sector name
Details about the related industries
The related industry identifier
The related industry name
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v1/industry_sectors HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "E4AC253114B84DF2B347996DC277DDDF",
"name": "Consultancy",
"related_industries": [
{
"id": "E4AC253114B84DF2B347996DC277DDDF",
"name": "Operations"
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Retrieve a list of the supported languages that can be used in communications and content translations
Notes
Communication languages can be configured per business and are used for sending a communication content or display an entity’s content in different languages (based on contact’s preferred communication language).
Request headers
Authorization Token
The publishable api key for application identification
Responses
The request has succeeded
Body
The language (2-char code) that is supported
GET https://sandbox.crm.com/self-service/v2/languages HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"language_code": "EN"
}
]
}
Returns a list of name day rules
Request parameters
The first name of the contact to retrieve only applicable name days
Request headers
Authorization Token
Responses
The request has succeeded
Body
The name day rule identifier
The day of the name day rule
The month of the name day rule
The names that celebrate this name day, comma separated
A description of the name day
GET https://sandbox.crm.com/self-service/v1/name_day_rules HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"name_day_rules": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"day": "1",
"month": "10",
"names": "Marios, Maria",
"description": "Holly Mary"
}
]
}
Returns a list of product categories
Request parameters
Retrieve only all child nodes that have as parent this product category
Defines whether all product categories (parent and child) should be retrieved or not
Filter product categories on whether to include in the order menu or not
Filter product categories on the organisation that owns the products
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 product category identifier
The product category name
The product category display name
The product category description
The number of the product category’s child nodes
The number of products in the category
Defines whether the product category should be available in order menu
Details about the parent product category (applicable if this category is a child node)
The parent product category identifier
The parent product category name
GET https://sandbox.crm.com/self-service/v2/products/categories HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "9365d945-2c62-be0e-a8dc-45736fdfa5b5",
"name": "Cold Drinks Delivery",
"display_name": "Cold Drinks",
"description": "Cold Beverages and Refreshers",
"child_nodes": 12,
"products": 2,
"available_in_order_menus": "false",
"parent": {
"id": "9365d945-2c62-be0e-a8dc-45736fdfa5b5",
"name": "Drinks"
}
}
]
}
Retrieves the configuration of queue settings for service requests
Request parameters
Only list the enabled queues for self service.
State of queue. Only list enabled queues.
Request headers
Authorization Token
Responses
Body
The classification settings relating to queue type
The queue identifier
The default service request categories which will be assigned to service requests
Service request category id
Service request category name
GET https://sandbox.crm.com/self-service/v2/services_requests/queues HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"queues": {
"id": "c038c1a2-ffa3-37ba-4818-b3db4f2c3cc3",
"name": "",
"classification": "",
"owner": {
"id": "d505a1f9-af03-9c4a-b3d9-97e9e4d198a5",
"name": ""
},
"default_priority": {
"impact": "LOW",
"urgency": "HIGH",
"priority": "MEDIUM"
},
"default_tags": [
{
"tag_id": "93861e6b-2482-784a-5ff7-9d1c16a318e3",
"name": "",
"colour": ""
}
],
"default_categories": [
{
"id": "2f4ffc37-9463-4f17-9549-dd3cbc24f7e7",
"name": "Service requests raised through front-end devices"
}
]
}
}
]
}
Retrieve a list of (active) tags based on search criteria (e.g. all organisation tags)
Request parameters
The name of the organisation tag
Filter based on entity
Defines which merchant tags belonging to industry should be retreived
Defines which merchant tags belonging to industry sector should be retreived
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 tag identifier
The tag name
Information that can be used in order to display large pages
The page number
The number of records per page
The total number of records. If “include_total” is not specified, then this total is null. If “include_total” is specified, total has a value but it is accurate up to 10K records.
Shows if there are more records available to fetch
GET https://sandbox.crm.com/self-service/v2/tags?entity=ORGANISATIONS HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "E4AC253114B84DF2B347996DC277DDDF",
"name": "Restaurant"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}