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{id}
/approval_requestsRetrieve all approval requests for a specific contact
Path variables
The contact (identifier) for which the related 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
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
GET https://sandbox.crm.com/self-service/v1/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}
/actionsUpdate an existing approval request
Path variables
The approval request (identifier) that will be updated
Request headers
Authorization Token
Request body
Defines the action that will be applied on the approval request
Responses
Body
The approval request identifier
POST https://sandbox.crm.com/self-service/v1/approval_requests/a6ecbc14-5622-0e30-b629-b1289963f7d2/actions HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "REJECT"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "a6ecbc14-5622-0e30-b629-b1289963f7d2"
}
Accept a pending approval request
Request body
The token that will verify that the client is trusted and will approve the related request
Responses
Body
An HTML based landing page is returned and rendered
POST https://sandbox.crm.com/self-service/v1/approval_requests/64a29ac3-48bb-7493-1e9d-45c1c3299a51/actions HTTP/1.1
Content-Type: application/json
{
"token": "367a4c39-d69a-a0e7-7b6f-4eccf65449a3",
"response": "REJECT"
}
HTTP/1.1 200 OK
Reject a pending approval request
Request body
The token that will verify that the client is trusted and will approve the related request
Responses
Body
An HTML based landing page is returned and rendered
POST https://sandbox.crm.com/self-service/v1/approval_requests/64a29ac3-48bb-7493-1e9d-45c1c3299a51/actions HTTP/1.1
Content-Type: application/json
{
"token": "367a4c39-d69a-a0e7-7b6f-4eccf65449a3",
"response": "REJECT"
}
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 response succeeded
Body
The file identifier that will be used for connecting the file with a module
POST https://sandbox.crm.com/self-service/v1/upload/files HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"file": "file object"
}
HTTP/1.1 200 OK
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
DELETE https://sandbox.crm.com/self-service/v1/service_requests/6b888b83-b418-752f-604d-0653cf65885d/files/8dfc2223-edca-f05d-820b-dc96ba9df2c2 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{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/v1/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": "doc"
}
Ability to authenticate customers via a Mobile App or a Portal
{id}
/wifi/authorization{id}
/sign_out{token}
Authenticate a contact and provide a token for subsequent API access
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 number (applicable for PHONE providers)
The contact’s phone country code (applicable for PHONE providers)
The application identifier
Examples
Responses
The request has succeeded
Body
The token that can be used in subsequent API calls
Used when access token gets expired in order to refresh
The token expiration date
Details about the authorised contact
The cotnact’s unique identifier
The contact’s title
The contact’s first name
The contact’s last name
The contact’s company name
The contact’s avatar
Defines whether the used identity is verified
Details about the organisations that the contact has joined
The organisation’s external identifier
The organisation type
The organisation name
The input request was invalid or incorrect, often due to missing a required parameter
Auth using email and password
POST /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"
}
]
}
Auth using MAC Address
POST https://sandbox.crm.com/self-service/v1/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"
}
]
}
Auth using MW4
POST https://sandbox.crm.com/self-service/v1/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"
}
]
}
Auth using phone
POST https://sandbox.crm.com/self-service/v1/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"
}
]
}
{id}
/wifi/authorizationAuthenticate a contact over to a WiFi platform
Path variables
The contact (identifier) that will be authenticated 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 authorised for
The site that the contact is authorised 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/v1/contacts/eab82829-b65e-ee5a-b0f8-33b8ad48e04e/wifi/authorization HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"integration_id": "6b6d31e9-3603-36e1-be89-76c1e538644b",
"mac_address": "01-23-45-67-89-AB",
"estimation_id": "0ba7de75-8a68-c19a-3d3a-f4708723a1a4"
}
HTTP/1.1 200 OK
Request a one time password for a specific contact. The request will identify the contact details and send an outbound validation number that can be used to verify the contact
Request headers
The publishable api key for application identification
Request body
How to send the validation code
Information on how the 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
Additional gift pass information. Applicable if name = “GIFT_PASS”
Email address which will receive the one-time-password, semi-optional - either email_address or phone_number must be provided
Phone number which will receive the one-time-password, semi-optional - either email_address or phone_number must be provided
The phone number country code (required for phone_number)
The gift pass pin, semi-optional - either 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 send method value
The one time password auth id
POST /contacts/otp HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"send_method": "SMS",
"credentials": [
{
"name": "ID_NUMBER",
"value": "1234567"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"obfuscated_value": "+35799***834",
"auth_otp": "731e4023-4c04-4278-8eb5-240651317e46"
}
Request headers
The publishable api key for application identification
Request body
Information on how the 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
The value of the credential to check
Responses
The request has succeeded
Verifies an one time password that was requested
Request headers
The publishable api key for application identification
Request body
Information on how the contact will be identified
Contact identification credentials
One Time Password Auth Id
The email address that was used to request the otp
The phone number that was used to request the otp
The contact’s id number that was used to request the otp
The contact’s passport that was used to request the otp
The contact’s birthdate that was used to request the otp
The contact’s card that was used to request the otp
The contact’s loyalty identifier that was used to request the otp
The value of the credential to verify the contact’s authenticity
The OTP that should be used for verification purposes
Examples
Responses
The request has succeeded
Body
The token that can be used in subsequent API calls
Used when access token gets expired in order to refresh
The token expiration date
Details about the authorised contact
The cotnact’s unique identifier
The contact’s title
The contact’s first name
The contact’s last name
The contact’s company name
The contact’s avatar
Defines whether the used identity is verified
Details about the organisations that the contact has joined
The organisation’s external identifier
The organisation type
The organisation name
POST /contacts/validate-otp HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"credentials": [
{
"name": "AUTH_OTP",
"value": "12345"
}
],
"code": "123456789"
}
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": "SUBSIDIARY",
"name": "CRMdotCOM"
}
]
}
Authenticate a contact and provide a token for subsequent API access
Request headers
Refresh Token supplied when authenticated
Responses
The request has succeeded
Body
The token that can be used in subsequent API calls
Used when access token gets expired in order to refresh
The token expiration date
Details about the authorised contact
The cotnact’s unique identifier
The contact’s title
The contact’s first name
The contact’s last name
The contact’s company name
The contact’s avatar
Defines whether the used identity is verified
Details about the organisations that the contact has joined
The organisation’s external identifier
The organisation type
The organisation name
POST https://sandbox.crm.com/self-service/v1/contacts/refresh HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg"
}
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": "ORGANISATION",
"org_relationship": "SUBSIDIARY",
"name": "CRMdotCOM"
}
]
}
Requests a password reset for an existing contact
Request headers
The publishable api key for application identification
Request body
The username that will be used to request a new password
Examples
Responses
The request has succeeded
POST /contacts/forgot_password HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"username": "johndoe@crm.com"
}
HTTP/1.1 200 OK
Changes the password for a contact’s identity (EMAIL based)
Request body
The token that will verify that the client is trusted (required only if the identity is EMAIL based)
The new password
Examples
Responses
The request has succeeded
POST /contacts/change_password HTTP/1.1
Content-Type: application/json
{
"token": "ABCTKN123456798VGP2020",
"password": "wsxcde421qadfg"
}
HTTP/1.1 200 OK
{id}
/sign_outTerminates the contact’ session and will no longer be able to access the client
Path variables
The contact (identifier) that will be signed out
Request headers
Authorization Token
Responses
The request has succeeded
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/sign_out HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{token}
Verify a contact’s email address username
Path variables
The token that will used for verifying the contact’s email address
Responses
The request has succeeded
GET https://sandbox.crm.com/self-service/v1/contacts/verify_email/ABCTKN123456798VGP2020 HTTP/1.1
HTTP/1.1 200 OK
{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
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/v1/printout HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"format": "PDF",
"entity": {
"type": "INVOICE",
"id": "b97d4488-e9c1-a338-8420-b831147b648f"
}
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "e1c67e12-6bae-53c7-f1a1-0a26aa4b27a2"
}
Contact Management
{id}
{id}
{id}
/consents{id}
{id}
/demographics{id}
/preferences{id}
/preferencesCreate a new contact (of type person)
Request headers
The publishable api key for application identification
Request body
The contact first name (required for EMAIL and PHONE providers)
The contact last name (required for EMAIL and PHONE providers)
Details about the customer’s identity
The contact’s identity provider
The contact’s username (required for EMAIL). If password not provided then OTP request is triggered.
The contact’s password (applicable for EMAIL).
Defines whether the email requires verification (applicable when username and password are provided)
The contact’s phone number (required for PHONE). OTP request is triggered.
The contact’s phone number country code (required for PHONE)
Application ID requesting register
The token taken from the oAUTH service provider (required for Facebook and Google)
Defines whether the contact has accepted the client service
The contact setting for receiving emails
The contact setting for receiving sms
The contact setting for consent
The code that the contact was referred with in order to register
The country code that the contact agreed to register to
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 token that can be used in subsequent API calls
The token expiration date
Details about the authorised contact
The contact’s title
The contact’s first name
The contact’s last name
The contact’s avatar
Defines whether the used identity is 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)
POST /contacts/register HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"first_name": "John",
"last_name": "Doe",
"identity": {
"provider": "EMAIL",
"username": "johndoe@crm.com",
"password": "12345",
"validation_required": false
},
"service_acceptance": "true",
"email_opt_out": "true",
"sms_opt_out": "true"
}
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"
}
}
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"
}
Contact registration including a pass code from a Landing page
POST https://sandbox.crm.com/self-service/v1/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": "2265577",
"country_code": "CYP",
"application_id": "3c33dcc6-3958-4e7d-ae0e-592948627711",
"token": "YOJDAKEb9l1U0sUzrskM6X4emzrSeXqb"
},
"pass_code": "HHNSU32LNK"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"exp": "1572530655",
"contact": {
"first_name": "John",
"last_name": "Doe",
},
"organisations": [
{
"external_id": "QWERTY12345671234567324ETFTGBY78",
"org_type": "ORGANISATION",
"org_relationship": "MERCHANT",
"name": "CRMdotCOM"
}
],
"obfuscated_value": "+35799***834",
}
{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/v1/contacts/e18ee2bc-c6f3-49e1-8e05-763386378017 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
Updates an existing contact
Path variables
The contact (identifier) that will be updated
Request headers
Authorization Token
Request body
Company Name if the Contact represents a company, required attribute if the type is a Company.
The title of the contact. Applicable only if the type is PERSON
The first name of the contact. Applicable and mandatory only if the type is PERSON
The middle name of the contact. Applicable and mandatory only if the type is PERSON
The last name of the contact. Applicable and mandatory only if the type is PERSON
The contact preferred language
The contact’s category ID
The contact statutory number
Information about the person demographics
The person gender
Information about the person passport
The passport number
The country that issued the passport
The passport expiration date
Information about the person id
The id number
The country that issued the id
The id expiration date
Information about the person nameday
The nameday month
The nameday day
Information about the person birthdate
The birth year
The birth month
The birth day
A company’s profile. Applicable only if contact_type is COMPANY
The company’s profile year
The annual turnover
The date that the company was established on
The company’s number of employees
The company registration number
The country that the company is registered to
The company tax reference number
The company vat registration number
The company’s Industry ID
The company’s Industry Sectors.
The contact’s email address
The contact setting for receiving sms
The contact setting for receiving email
Defiens whether the contact is tax exempt or not
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/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"company_name": "Alpha Bravo",
"title": "Sir",
"first_name": "John",
"middle_name": "Alias",
"last_name": "Doe",
"preferred_language_code": "ENG",
"category_id": "4AD9C84FA60F9FE407140E20F707726A",
"statutory_number": "EF-12345",
"demographics": {
"gender": "MALE",
"passport": {
"passport_number": "123456",
"issue_country_code": "CYP",
"expiration_date": 129876567
},
"id_details": {
"id_number": "K123456",
"issue_country_code": "CYP",
"expiration_date": 129876567
},
"name_day": {
"month": 10,
"day": 4
},
"date_of_birth": {
"year": 2018,
"month": 10,
"day": "16"
}
},
"company_profle": {
"profile_year": 129876567,
"annual_turnover": 1568.14,
"established_on": 129876567,
"number_of_employees": 1,
"registration_number": "123456",
"registration_country": "CYP",
"tax_reference_number": "123456",
"vat_registration_number": "123456",
"industry_id": "4AD9C84FA60F9FE407140E20F707726A",
"industry_sectors": [
"4AD9C84FA60F9FE407140E20F707726A"
]
},
"email_address": "bill@gmail.com",
"sms_opt_out": "false",
"email_opt_out": "false",
"is_tax_exempt": "false",
"consent_state": "ACCEPTED"
}
{id}
/consentsUpdates the Consent state of the Contact
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
Request body
The contact setting for consent
Responses
The request has succeeded
Body
The contact identifier
Update contact
PUT https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/consents HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"consent_state": "ACCEPTED"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "658AB90A6A77437091D158FD8E697B11"
}
{id}
Retrieve basic details for a specific contact
Path variables
The contact identifier that should be returned
Request headers
Authorization Token
Responses
The request has succeeded
Body
The contact identifier
The contact code
Tje contact type
The contact title
The contact first name
The contact middle name
The contact last name
The contact preferred language
The contact URL of Avatar
The contact email address
The contact referral code
The contact loyalty identifiers
The contact loyalty identifier
The contact setting for receiving sms
The contact setting for receiving email
The contact setting for consent
The country code on which the contact agreed to register to
The custom field’s unique key
The custom field’s value
GET https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"code": "ABC-123",
"type": "PERSON",
"title": "Sir",
"first_name": "John",
"middle_name": "Alias",
"last_name": "Doe",
"preferred_language_code": "ENG",
"avatar_url": "",
"email": "jon@crm.com",
"referral_code": "REF123",
"loyalty_identifier": [
{
"identifier": "123423435434534534543"
}
],
"sms_opt_out": "false",
"email_opt_out": "true",
"consent_state": "PENDING",
"country_agreement": "CYP",
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
]
}
{id}
/demographicsRetrieves the demographics of a single contact
Path variables
The unique ID for which the demographics will be returned
Responses
Body
The person gender
Contact Password Details
The passport number
The country that issued the passport
The expiration date of the contact passport
Contact Identity Details
The number of the contact id
The country that issued that contact id
The expiration date of the contact id
Contact Nameday Details
The month of the contact nameday
The day of the contact nameday
Contact Birthdate Details
The year of the contact birthdate
The month of the contact birthdate
The day of the contact birthdate
GET /contacts/{id}/demographics HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"gender": "FEMALE",
"passport": {
"number": "K123456",
"issue_country_code": "CYP",
"expiration_date": 129876567
},
"id_details": {
"number": "123456",
"issue_country_code": "CYP",
"expiration_date": 129876567
},
"name_day": {
"month": 10,
"day": 4
},
"date_of_birth": {
"year": 1990,
"month": 10,
"day": 16
}
}
{id}
/preferencesSets contact’s preferred organisation
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 contact’s preferred organisation
Path variables
The contact (registry) identifier whose preferred organisation will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
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
Information about the 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}
/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 contact identifier for which an address will be added
Request headers
Authorization Token
Request body
The address type
A short name to allow it to be easily recognised in a list
The address line 1
The address line 2
The address county
The address city
The address postal code
The address country identifier
Defines whether the address is the primary one
The address geolocation latitude
The address geolocation longtitude
The Google textual identifier that uniquely identifies an address
The address care of
Responses
The request has succeeded
Body
The address record 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 an existing address of a contact
Path variables
The contact identifier for which an address should be updated
The address identifier that should be updated
Request headers
Authorization Token
Request body
A short name to allow it to be easily recognised in a list
The address line 1
The address line 2
The address county
The address city
The address postal code
The address country identifier
The address care of
Defines whether the address is the primary one
The latitude of the address
The longitude of the addrsss
The Google textual identifier that uniquely identifies an address
Responses
The request has succeeded
Body
The address record 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) from which the address will be removed
The address identifier that should be removed
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 the addresses of a specific contact
Path variables
The contact identifier for which his/her addresses will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The address identifier
The address type
A short name to allow it to be easily recognised in a list
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
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"
}
]
}
A new sets of APIs (Contact Devices) are designed to cover applications usage. Please note that (Contact Application Usage) APIs are still operational and can be used for self-service integrations.
{id}
/applications{id}
/applicationsAdd application usage to a contact
Path variables
The contact (identifier) where application usage will be set
Request headers
Authorization Token
Request body
The application identifier that usage will be set
The platform on which the application is downloaded and used
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/applications HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"application_id": "00000000-000000000000000"
}
HTTP/1.1 200 OK
{id}
/files{id}
/files/{file_id}
{id}
/files{id}
/filesUpload 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 service request attachment identifier created
POST https://sandbox.crm.com/self-service/v1/service_requests/6b888b83-b418-752f-604d-0653cf65885d/files 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}
/files/{file_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/v1/contacts/6b888b83-b418-752f-604d-0653cf65885d/files/8dfc2223-edca-f05d-820b-dc96ba9df2c2 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 204 No Content
{id}
/filesRetrieve all attachment files for a specific contact
Path variables
The contact (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
Details about attachment associated with an entity
The attachment identifier
Information about the creative type
The attachement description
The attachment file details
The file identifier
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
GET https://sandbox.crm.com/self-service/v1/contacts/6b888b83-b418-752f-604d-0653cf65885d/files HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "af748ada-0521-0503-fc25-b67635a7d14d",
"mime": "png",
"description": "Image 1",
"file": {
"id": "0317868f-28f8-9f56-d248-5a78718b38cc",
"name": "image1.png"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
The (Contact Devices) APIs are updated to cover a significant number of use cases where devices can be associated with a contact. For backwards compatibility, the attribute ‘registration_type’ (including its enum values) is still operational, but on the new design is listed as ‘platform’.
{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/v1/contacts/cb4e9a83-9ad6-a837-238b-0238d0fa1236/devices HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"mac_address": "00-D0-56-F2-B5-12"
}
HTTP/1.1 200 OK
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 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
GET https://sandbox.crm.com/self-service/v1/contacts/da25d2f1-2ec4-23ec-b6e4-0a3c78721923/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": "MOBILE",
"serial_number": "2049-3630",
"electronic_id": "I243WER",
"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"
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/organisations{id}
/organisations{id}
/organisationsContact joins an existing organisation
Path variables
The contact (registry) (identifier) that will sign up/out to/from an organisation
Request headers
Authorization Token
Request body
The action that should be applied on the organisation
The organisation identifier that the action will be applied
Defines whether the contact has accepted the client service (applicable only if action = SIGNUP)
The contact setting for receiving emails (applicable only if action = SIGNUP)
The contact setting for receiving sms (applicable only if action = SIGNUP)
The contact setting for consent
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 organisations that the contact is signed up to
Path variables
The contact (registry) (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
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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Contact wallet information for the organisation
Wallet id
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
GET https://sandbox.crm.com/self-service/v1/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": "CA123456789AQWSXZAQWS1236547896541",
"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"
}
]
}
],
"wallet": {
"wallet_id": "038af54e-282c-40ad-ae5d-cc74f2c80f40",
"balance": 9.99,
"currency_code": "EUR"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{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 supports Card, Account Debits and Wallet payment methods
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 that provides a small description for the payment method. In case of Wallet payment method types, use the Payment Gateway’s name
The payment method that will be related with the account
Marks the payment method as the contact’s primary one
Marks the payment method as the backup
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 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 contact’s payment method identifier
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": "CARD",
"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": "CRM_WALLET",
"integration_id": "",
"token": ""
}
]
},
"wallet": {
"phone_details": {
"name": "Primary phone",
"country_code": "00357",
"number": "91000000",
"msisdn": "35791000000"
},
"email": "",
"gateway_token": [
{
"gateway": "CRM_WALLET",
"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": "BUINESS_CHECKING",
"mandate": {
"refernece": "",
"sign_date": 1,
"type": "ONEOFF"
},
"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": "SETTLE",
"integration_id": "",
"token": ""
}
]
}
}
{id}
/payment_methods/{payment_method_id}
Update an existing payment method for a contact
Path variables
The contact identifier whose paymeny method will be updated
The payment method identifier that will be updated
Request headers
Authorization Token
Request body
Marks the payment method as the contact’s primary one
Marks the payment method as the backup
The payment method notes
Applicable only when updating a payment method of type Card
Expiration month
Expiration year
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
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",
"card": {
"exp_month": "12",
"exp_year": "25"
},
"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
}
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/payment_methods/{payment_method_id}
Remove an existing payment method from a specific contact
Path variables
The contact identifier whose payment method will be removed
The payment method identifier that will 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_methodsList of Payment methods allocated to contact.
Path variables
The contact identifier whose payment methods will be retrieved
Request parameters
Filters the contact’s payment methods
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
Indicates which payment mehod is the contact’s primary one
Indicates which payment mehod is the contact’s backup one
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.
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
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}
/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}
/tokens{id}
/tokens{id}
/tokensRequest a contact token
Path variables
The contact (identifier) that a token will be created
Request headers
Authorization Token
Request body
The intent for which such token is requested
The amount requested to be spent. If not specified, all amount can be spend (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 contact (identifier) 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. If not specified, all amount can be spend (applicable if intent = SPEND)
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}
/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 ending month
Statement period starting year
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/v1/contacts/314de1cf-35ad-bf93-71f7-a3dbbf48f3f8/export_statement HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"format": "PDF",
"account_id": "4c0ea630-2972-7714-a5d1-7576b8dc9c22",
"from_month": 1,
"to_month": 12,
"from_year": 2021,
"to_year": 2022
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "ed27a6c8-0ce8-9a06-a205-fe5a40951821"
}
{id}
/credentials{id}
/identities/{identity_id}
/change_username{id}
/identities/{identity_id}
/change_username{id}
/change_password{id}
/identities{id}
/credentialsCreate a set of credentials for an existing contact
Path variables
The contact (identifier) that should be updated
Request headers
Authorization Token
Request body
Details about the contact’s identity
The contact’s identity provider
The contact’s username (required for EMAIL)
The contact’s password (required for EMAIL)
The contact’s phone number (required for PHONE)
Defines whether the username or phone_number should be verified (required for EMAIL and PHONE)
The contact’s phone number country code (required for PHONE)
The token taken from the oAUTH service provider (required for Facebook and Google)
Responses
The request has succeeded
Body
The contact identifier
POST https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/credentials HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"identity": {
"provider": "EMAIL",
"username": "johndoe@crm.com",
"password": "password1234",
"validation_required": "true",
"phone_number": "96303540",
"country_code": "CYP",
"token": "YOJDAKEb9l1U0sUzrskM6X4emzrSeXqb"
}
}
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": "SUBSIDIARY",
"name": "CRMdotCOM"
}
]
}
POST https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/credentials HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"identity": {
"provider": "PHONE",
"phone_number": "96303540",
"country_code": "CYP"
}
}
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": "SUBSIDIARY",
"name": "CRMdotCOM"
}
]
}
{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) for which a username change request has been made
Request headers
Authorization Token
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v1/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) whose username will be changed
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/v1/contacts/ec23261f-cde9-0671-ec41-6db9acf4d9c5/change_username HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"username": {
"email": "j_doe@crm.com"
},
"password": "123456"
}
HTTP/1.1 204 OK
{id}
/change_passwordChanges the password for a contact’s identity
Path variables
The contact (identifier) whose password will be changed
Request headers
Authorization Token
Request body
The new password
Examples
Responses
The request has succeeded
POST /contacts/0980af1d-3c24-6379-9eb9-a40e3a3f5208/change_password HTTP/1.1
Content-Type: application/json
Authorization: 4AD9C84FA60F9FE407140E20F707726A
{
"password": "wsxcde421qadfg"
}
HTTP/1.1 200 OK
{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 email (if supported)
The contact identity phone (if supported)
The phone country code
The phone number
The contact identity type
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
GET https://sandbox.crm.com/self-service/v1/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",
"email": "johndoe@crm.com",
"type": "EMAIL_OTP"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/accounts{id}
{id}
/rewards{id}
/accounts{id}
/financials{id}
/rewards{id}
/journals{id}
{id}
/accountsAdd a new customer account to an existing contact
Path variables
The contact identifier for which a new account will be added
Request headers
Authorization Token
Request body
The account name
The account’s currency
If set to true, then the account will be set as the primary one even if a different one exists
The unique identification of a contact address which will be set as the billing address of the account. By default, the primary addres (if exists) will be provided
The account’s classification identifier
Examples
Responses
The response succeeded
Body
The account identifier
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"currency_code": "EUR",
"is_primary": "false",
"billing_address_id": "4AD9C84FA60F9FE407140E20F707726A",
"classification_id": "4AD9C84FA60F9FE407140E20F707726A"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
Update an existing account of a contact
Path variables
The account identifier that will be updated
Request headers
Authorization Token
Request body
The account’s classification ID
If set to true, then the account will be set as the primary one even if a different one exists
The unique identification of a contact address which will be set as the billing address of the account. By default, the primary addres (if exists) will be provided
Responses
The response succeeded
Body
The account identifier
PUT https://sandbox.crm.com/self-service/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"classification_id": "4AD9C84FA60F9FE407140E20F707726A",
"is_primary": "true",
"billing_address_id": "4AD9C84FA60F9FE407140E20F707726A",
"credit_limit": 200
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/rewardsUpdate the reward details for an existing contact’s account. Only primary accounts hold rewards information.
Path variables
The account (identifier) whose reward information will be updated
Notes
Next Purchase Spend
On the next purchase at the selected merchant/service provider, a customer will spend automatically the maximum available wallet balance. Once the spend is made, the automatic spend preferences for the contact will be disabled.
Automatic Spend on Any Purchase
On each purchase at any merchant/service provider, a customer will spend automatically the maximum available wallet balance. Each customer has the option to select though specific merchants/service providers that auto spend will be applied.
Adding merchant(s) to auto spend preferences, the following APIs should be called
GET /merchants
for retrieving applicable merchantsPOST /accounts/{id}/merchants
for selecting the merchant(s)
Removing merchants/service providers from auto spend preferences, the following APIs should be called
GET /accounts/{id}/merchants
for retrieving the merchants that auto spend is enabledDELETE /accounts/{id}/merchants/{organisation_id}
for selecting the merchant(s) to be removed
Request headers
Authorization Token
Request body
The account status
Information about the automatic spend preferences
Defines whether automatic spends will be enabled or not
Defines whether automatic spends will occur on the next purchase of a specific merchant or based on wallet balance and purchase amount to a group of merchants
The minimum wallet balance amount that should be available for the spend to be performed. Applicable when automatic spend preference is for all merchant purchases
The min amount (inclusive) that the purchase customer event total amount should be in order for the automatic spend to be applied. Applicable when automatic spend preference is for all merchant purchases
Examples
Responses
The response succeeded
Body
The account identifier
PUT /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"account_status": "TERMINATED",
"spend_preferences": {
"enable_automatic_spend": "true",
"minimum_wallet_balance": 5.21,
"minimum_spend_amount": 5.42,
"maximum_spend_amount": 12.24
},
"peferred_pament_method_id": "33434FDA22100"
}
PUT https://sandbox.crm.com/self-service/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/rewards HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"automatic_spend_settings": {
"enable_automatic_spend": "true",
"automatic_spend_preference": "ALL_MERCHANT_PURCHASE",
"minimum_wallet_balance": 5.21,
"from_purchase_amount": 5.42
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/accountsGet a list of Contact Accounts. Normally a contact will have a single account but multiple accounts can be used to service different currencies, or different spending profiles.
Path variables
The contact identifier whose accounts will be retrieved
Request parameters
If set to true, then only the primary account of the contact will get retrieved
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 account identifier
Indicates the primary account of the contact
The account name
The account name
The account status
The account’s currency
The account’s running balance
The account’s overdue amount, i.e. invoice due date exceeded
Details about the related classification
The classification identifier
The classification name
The address identifier
The address type
A short name to allow it to be easily recognised in a list
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
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
GET https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"accounts": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"is_primary": true,
"name": "ACR123456-JohnDoe",
"number": "AC123456",
"life_cycle _state": "TERMINATED",
"currency_code": "EUR",
"balance": 47.13,
"overdue_amount": 10.59,
"classification": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "VIP"
},
"billing_address": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"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"
}
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/financialsGet a single Account with its financial information
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
Defines whether the account is the primary one of the contact
The account status
The account’s currency (3 code currency)
The account’s calculated balance
The unpaid amount that is passed its due date
The account’s credit limit
The accounting period of the latest accounting period for which the account’s openning balance was caluclated
The unique identifier of the accounting period
The name of the accounting period
The opening balance brought forwards after the latest closed accounting period
Details about the related classification
The classification identifier
The classification name
The address identifier
The address type
A short name to allow it to be easily recognised in a list
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
The account’s Payment Terms
Payment terms identifier
Payment terms name
The Wallet related to the Account
The Wallet identifier
A unique 16-digit code that if not provided, it is auto-generated
Wallet total balance
The commerce balance of the wallet
The wallet’s life cycle state
The minimum wallet balance threshold. If not provided, the global rules apply
Defines the limit rules applied on specific wallet. If not provided, the global rules apply
The maximum amount allowed
The wallet transaction type for which the limit is applied
The period for which the limit is applied
GET https://sandbox.crm.com/self-service/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/financials HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "John Smith AC00123456",
"number": "AC00123456",
"is_primary": "true",
"life_cycle_state": "ACTIVE",
"currency_code": "EUR",
"balance": 1.21,
"overdue_amount": 100.5,
"credit_limit": 100,
"accounting_period": {
"id": "",
"name": ""
},
"opening_balance": 100.5,
"classification": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "VIP"
},
"billing_address": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"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"
},
"payment_terms": {
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Net 7"
},
"wallet": {
"id": "4AD9C84FA60F9FE407140E20F707726A",
"code": "6766690009889435",
"balance": 9.99,
"open_balance": 5.45,
"commerce_balance": 4.54,
"life_cycle_state": "CANCELLED",
"minimum_balance": 9.99,
"limit_rules": [
{
"limit_amount": 9.99,
"transaction_type": "DEBIT",
"period": "MONTHLY"
}
]
}
}
{id}
/rewardsRetrieve the reward details for an existing contact’s account. Only primary accounts hold rewards information.
Path variables
The account (identifier) whose rewards information should be retrieved
Notes
Next Purchase Spend
On the next purchase at the selected merchant/service provider, a customer will spend automatically the maximum available wallet balance. Once the spend is made, the automatic spend preferences for the contact will be disabled.
Automatic Spend on Any Purchase
On each purchase at any merchant/service provider, a customer will spend automatically the maximum available wallet balance. Each customer has the option to select though specific merchants/service providers that auto spend will be applied.
Request parameters
If defined then information about the total rewards
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 account identifier
The account name
The account number
The account currency
The date when the account was signed up for the first time
Defines whether the account can spend or not
Information about the automatic spend settings for the account
Defines whether automatic spend is enabled for the account
Defines whether automatic spends will occur on the next purchase of a specific merchant or based on wallet balance and purchase amount to a group of merchants
The minimum wallet balance amount that should be available for the spend to be performed. Applicable when automatic spend preference is for all merchant purchases
The min amount (inclusive) that the purchase customer event total amount should be in order for the automatic spend to be applied. Applicable when automatic spend preference is for all merchant purchases
Information about the account’s reward tier
The tier identifier
The reward tier name
The tier (marketing) color
The date that the current tier was reached
Points collected during the period
Total Lifetime Points
Details on how to maintain the current tier
The number of points needed to maintain current tier
The date up to which points 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
Points needed to progress to next tier
The date up to which points must be collected in order to progress to next tier
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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information about the reward schemes that the account has signed up to
The reward scheme identifier
The reward scheme name
The date when the account 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)
Rewards details. Available when the include_rewards is enabled
The total awards of the account
The total spends of the account
GET https://sandbox.crm.com/self-service/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/rewards HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "John Smith AC00123456",
"number": "ACR001",
"currency_code": "EUR",
"signed_up_on": 1583846865,
"spending_blocked_status": "false",
"automatic_spend_settings": {
"enable_automatic_spend": "true",
"automatic_spend_preference": "NEXT_MERCHANT_PURCHASE",
"minimum_wallet_balance": 1.87,
"from_purchase_amount": 23.98
},
"reward_tier": {
"id": "",
"name": "Red",
"achieved_date": 1,
"period_value_units": 2000,
"lifetime_value_units": 12543,
"maintain_tier": {
"points_needed": 200,
"collected_by": "15678943"
},
"progress": {
"points_needed": "1400",
"collected_by": "15678943",
"id": "guid",
"name": "Gold"
}
},
"joined_reward_schemes": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "CRMdotCOM Scheme",
"signed_up_on": 1583846865,
"email_address": "johndoe@crm.com"
}
],
"preferred_payment_method": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"payment_method_type": "DIRECTDEBIT",
"first6": "424242",
"last4": "4242",
"iban": "CY3550000000054910000003"
},
"rewards": {
"total_awards": "123.23",
"total_spends": "43.56"
}
}
{id}
/journalsRetrieve a list of account journals. Only journals with Posted financial state 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
Filter by journal type
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
Responses
The request has succeeded
Body
Journal unique identifier
The number/code of the journal’s related financial transaction
The unique identifier of the entity related to the journal entry for example an invoices or a cedit note’s detifier
Issued date
Date 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 action against account
Journal currency code
Journal amount
Invoice related details, applicable for invoice 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
GET https://sandbox.crm.com/self-service/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/journals HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "7156b6b0-ab00-46c8-8411-c515c20d4e19",
"number": "INV12659",
"entity_id": "7156b6b0-ab00-46c8-8411-c515c20d4e19",
"issued_date": 1650436799,
"posted_date": 1651127999,
"transaction_type": "INVOICE",
"type": "DEBIT",
"currency_code": "EUR",
"amount": 84.99,
"invoice": {
"due_date": 1651074662,
"overdue_amount": 10.39,
"unpaid_amount": 10.93
}
}
],
"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
Include financial transation lines in response?
Request headers
Authorization Token
Responses
The request has succeeded
Body
The journal identifier
The number/code of the journal entry
The unique identifier of the financial transaction related to the journal entry for example the invoice unique identifier.
The date that the financial transaction was issued
Date of posting financial transaction
Currency code
Invoice related details
Date due for invoice payment
Invoice overdue amount i.e. due date exceeded
Invoice unpaid amount, i.e. invoice due date not yet reached
Transaction line information
Product information
Product unique id
Product SKU
Product name
Product description
Product quantity
Unit price of product
Net unit price
Product discount amount
Product tax amount
Applicable only when the line item includes a termed service and denotes the invoiced/credited period
Period start date
Period end date
Total transaction net amount
Total transaction discount amount
Total transaction tax amount
Transaction amount
Payment method details (e.g. for a refund)
The payment method’s details that include the contact’s payment method plus important information of the payment method. Applicable only for Cards, Accunt Debits and Wallet payment method types
The contact’s payment method unique identifier
An identifier that briefly describes the contact’s payment method (The last 4 digits for cards, the email for Paypal accounts or the wallet number
GET https://sandbox.crm.com/self-service/v1/journals/7156b6b0-ab00-46c8-8411-c515c20d4e19 HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "7156b6b0-ab00-46c8-8411-c515c20d4e19",
"number": "INV00123",
"entity_id": "89da9753-06ba-4b86-b686-b9748f56c2ff",
"issued_date": 1643611106,
"posted_date": 1646289507,
"currency_code": "EUR",
"invoice": {
"due_date": 1646116707,
"overdue_amount": 10.99,
"unpaid_amount": "53.79"
},
"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.67,
"discount": 1,
"tax": 1.32,
"period": {
"from": 1646116707,
"to": 1654065507
}
}
],
"net": 103.59,
"discount": 1,
"tax": 13.46,
"total": 103.59,
"payment_method": {
"type": "CARD",
"identity": {
"id": "89da9753-06ba-4b86-b686-b9748f56c2ff",
"identifier": "****1234"
}
}
}
{id}
/intents{id}
/client_tokenCreate a new Payment transaction for a Contact. The Payment will be issued as Posted.
Request headers
The publishable api key for application identification
Request body
The Payment’s code. If not specified, then a unique 16-digit code is assigned
Contact unique identifier.
The Payment’s amount.
The payment intent’s client secret. This is returned by the Payment Gateway integration where the front-end requests for a payment intent.
The payment’s currency. If not specified, then the currency of the contact’s primary account is used.
Payment method to be used to collect the money
Contact payment method identifier. Applicable and requied when an online paymen tmethod tyoe is selected i.e. Card, Accoount Debit or Wallet.
List of Invoices intended to be paid through the Payment. If not specified, then the Payment’s amount is allocated based on FIFO.
Unique identfiier of an Invoice
An array of reference numbers of external debits to be paid. Either Invoices or External references must be specified (only one of the two)
The external reference
The custom field’s unique key
The custom field’s value
Responses
Body
The Payment’s unique identifier
POST https://sandbox.crm.com/self-service/v1/payments HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"code": "1234567891234567",
"client_secret": "",
"amount": 1,
"currency_code": "EUR",
"contact_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"payment_method": {
"type": "CARD",
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
},
"invoices_paid": [
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
}
],
"external_payable": [
{
"reference": "INV00001011"
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
]
}
{id}
/intentsSet up a new intent for a specific contact, depending on the gateway type the response will vary
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 payment gateway plugin’s identifier
The contact’s payment method
The payment’s amount
The payment’s currency. If not speified, then it default’s to the customer’s preferred currency of the account
Details to add to Customer 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 commication with the gateway as well as it authenticates and authorises the client to communicate with the gateway.
Path variables
Request parameters
Responses
Body
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 payment gateway, with optional Account / Wallet ID
Request body
Unique intent identifier from Intents API
The integration’s unique identifier
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}
/reward_schemes{id}
/merchants{id}
/merchants/{organisation_id}
{id}
/merchants{id}
/auto_spends{id}
/auto_spends{id}
/reward_schemesSign up/out the account to a specific reward scheme
Path variables
The account (identifier) that will be signed up to the reward scheme
Notes
- Signing up to a self sign-up reward scheme requires the SIGNUP action and Reward Scheme attributes.
- Signing out from a self sign-up reward scheme requires the SIGNOUT action and Reward Scheme attributes.
- Request to join a closed loop reward scheme based on specific email domains requires the SIGNUP action, the Reward Scheme and Email Address attributes. Any requests made for joining such reward scheme should be verified via
Verify Closed Loop Sign Up Request
API. - Signing out from a closed loop reward scheme requires the SIGNOUT action and Reward Scheme attributes.
- Request to join a closed loop reward scheme based on an external system requires the SIGNUP action, the Reward Scheme and Token attributes. Any requests made for joining such reward scheme should be verified via the external system.
- Signing out from a closed loop reward scheme requires the SIGNOUT 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 account has signed up/out
The email address of the customer requestng to sign uo to a reward scheme based on supported domains
The code that will verify that the customer is allowed to sign up to a closed loop reward scheme
Examples
Responses
The request has succeeded
Body
The reward scheme identifier
Sign up to a reward scheme of type self-sign up
POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNUP",
"reward_scheme_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Sign out from a reward scheme
POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNOUT",
"reward_scheme_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
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 /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNUP",
"reward_scheme_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"email_address": "johndoe@crm.com"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Verify an account’s request to join a closed loop reward scheme (of email domain specific)
Notes
Request to join a closed loop Reward Scheme based on specific email domains should be made via the “Sign up to a Reward Scheme” API, providing the Reward Scheme and Email Address attributes
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
GET https://sandbox.crm.com/self-service/v1/accounts/verify_sign_up/SUC1234 HTTP/1.1
HTTP/1.1 200 OK
{id}
/merchantsAdd a set of new merchants for automatic spends for that account
Path variables
The account (identifier) that will add a new merchant
Notes
Adding merchant(s) to auto spend preferences, the following APIs should be called
GET /merchants
for retrieving applicable merchantsPOST /accounts/{id}/merchants
for selecting the merchant(s)
Request headers
Authorization Token
Request body
Defines a list of merchants that are authorised to perform automatic awards spending for that account
The organisation identifier that should be authorised to perform automatic awards spending
Defines whether the merchant is setup for automatic spend on the next visit
Examples
Responses
The request has succeeded
Body
A list of merchants that are authorised to perform automatic awards spending for that account
The organisation identifier that should be authorised to perform automatic awards spending
POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"merchants": [
{
"organisation_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"is_next_visit": "false"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"merchants": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
]
}
{id}
/merchants/{organisation_id}
Remove an exisintg merchant from an account’s automatic spend preferences
Path variables
The account (identifier) that will remove existing merchants
The organisation (identifier) that should be removed
Notes
Removing merchants/service providers from auto spend preferences, the following APIs should be called
GET /accounts/{id}/merchants
for retrieving the merchants that auto spend is enabledDELETE /accounts/{id}/merchants/{organisation_id}
for selecting the merchant(s) to be removed
Request headers
Authorization Token
Responses
The request has succeeded
DELETE /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/merchantsRetrieve the merchant organisations that an account provisioned for automatic spend requests
Path variables
The account (identifier) whose automatic spend merchant preferences should be retrieved
Notes
Adding merchant(s) to auto spend preferences, the following APIs should be called
GET /merchants
for retrieving applicable merchantsPOST /accounts/{id}/merchants
for selecting the merchant(s)
Removing merchants/service providers from auto spend preferences, the following APIs should be called
GET /accounts/{id}/merchants
for retrieving the merchants that auto spend is enabledDELETE /accounts/{id}/merchants/{organisation_id}
for selecting the merchant(s) to be removed
Request headers
Authorization Token
Responses
The request has succeeded
Body
The record identifier
Defines whether the organisation is setup for automatic spend on the next visit
Organisation details
The organisation identifier
The organisation name
GET /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "REC1E31269B76D7A65ACCE45B2E68DFD",
"is_next_visit": "false",
"organisation": {
"id": "QWE1E31269B76D7A65ACCE45B2E68QAQ",
"name": "Bravo Coffee"
}
}
]
}
{id}
/auto_spendsSet the automatic spend preferences (e.g. organisations - Merchant or Service Providers) for a specific contact’s account
Path variables
The account (identifier) that automatic spend preferences will be set
Notes
Adding merchant(s) to auto spend preferences, the following APIs should be called
GET /merchants
for retrieving applicable merchantsPOST /accounts/{id}/merchants
for selecting the merchant(s)
Removing merchants/service providers from auto spend preferences, the following APIs should be called
GET /accounts/{id}/merchants
for retrieving the merchants that auto spend is enabledDELETE /accounts/{id}/merchants/{organisation_id}
for selecting the merchant(s) to be removed
Request headers
Authorization Token
Request body
Defines a list of organisations (Merchants or Service Providers) that are authorised to perform automatic spends
The organisation identifier that should be authorised to perform automatic spends
Defines whether the organisation is setup for automatic spend on the next visit
Examples
Responses
The request has succeeded
POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/organisations HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"organisations": [
{
"organisation_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"is_next_visit": "false"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"organisations": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
]
}
{id}
/auto_spendsRetrieve the automatic spend preferences for a specific contact’s account
Path variables
The account (identifier) whose automatic spend preferences should be retrieved
Notes
Adding merchants/service providers to auto spend preferences, the following APIs should be called
GET /merchants
for retrieving applicable merchants/service providersPOST /accounts/{id}/merchants
for selecting the merchant(s)
Removing merchants/service providers from auto spend preferences, the following APIs should be called
GET /accounts/{id}/merchants
for retrieving the merchants/service providers that auto spend is enabledDELETE /accounts/{id}/merchants/{organisation_id}
for selecting the merchants/service providers to be removed
Request headers
Authorization Token
Responses
The request has succeeded
Body
Organisation Automatic Spend Preferences
The auto spend preference record identifier
Defines whether the organisation is setup for automatic spend on the next visit
Organisation Details
The organisation identifier
The organisation name
GET https://sandbox.crm.com/self-service/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/auto_spends HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"organisations": [
{
"id": "REC1E31269B76D7A65ACCE45B2E68DFD",
"is_next_visit": "true",
"organisation": {
"id": "QWE1E31269B76D7A65ACCE45B2E68QAQ",
"name": "Best Coffee Bew"
}
}
]
}
]
}
{id}
/actions{id}
/actionsChange the life cycle state of the Wallet
Path variables
The wallet identifier that will be updated
Request headers
Authorization Token
Request body
Defines the life cycle state of the wallet. If selected, then all of the above will not be taken into consideration
Responses
The response succeeded
Body
The wallet identifier
POST /wallets/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "CANCELLED"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/purchases{id}
/purchasesGet a list of contact purchase customer events. Each purchase customer event is created against an account
Path variables
The contact (identifier) for which a list of purchase customer events should be returned
Request parameters
Filters customer events that were performed from that date onwards
Filters customer events that were performed from that date backwards
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
Filters purchases that 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
Information about the retrieved purchase customer events
The customer event identifier
The account identifier that the customer event was created against
The customer event reference number
The customer event life cycle state
The unique identifier of the payment medium used in the purchase (e.g. the first 6 digits of a credit card)
The net amount of the retrieved customer event
The tax amount of the retrieved customer event
The discount amount of the customer event
The total amount (net + tax) of the retrieved customer event, after discount
The amount in real currency that was requested to be spend via the customer event
The date that the customer event was performed
Details about purchase customer event classification
The customer event classification identifier
The customer event classification name
Details about the pass used on the purchase
The pass identifier
The pass code
Information about the organisation that performed the customer event
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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information about the business parent of the organisation that the purchase was performed. Available only if the performed by organisation is a venue
The organisation (business/merchant) identifier
The organisation (business/merchant) 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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Information about ad hoc return of goods
The amount that the customer was debited due to ad hoc return of goods
The date that ad hoc retun of goods was applied
The ad hoc return reference number
The amount that was returned
Infromation about the award/spend amounts for such purchase
The amount in real currency that was awarded via the customer event
The amount in real currency that was spent via the customer event
The total amount in real currency that was spent automatically via the customer event
The total amount in real currency that was spent instantly via the customer event
The total amount in real currency that was actually spent on request via the customer event (may differ than the requested_spend_amount)
Information about the fees that were applied on purchase’s award/spend transactions
The total fee amount (sum of all fee amounts)
The wallet fee that was applied on provided awards
The wallet fee that was applied on spends
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
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/purchases HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"account_id": "658AB90A6A77437091D158FD8E697B11",
"reference_number": "0012345",
"life_cycle_state": "CANCELLED",
"payment_medium_identifier": "424242",
"total_net_amount": 100.9,
"total_tax_amount": 25.08,
"discount_amount": 0.5,
"total_amount": 125.38,
"requested_spend_amount": 10.54,
"performed_on": 1572534147,
"performed_by_organisation": {
"id": "658AB90A6A77437091D158FD8E697B11",
"name": "CRMdotCOM Nicosia"
},
"parent_organisation": {
"id": "658AB90A6A77437091D158FD8E697B22",
"name": "CRMdotCOM"
},
"rewards": {
"total_award_amount": 121.99,
"total_spend_amount": 12.22,
"total_automatic_spend_amount": 2.22,
"total_instant_discount_amount": 4.49,
"total_spend_request_amount": 4.51
}
}
],
"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)
The merchant tap code (merchant number) that submitted the purchase
The venue tap code (venue number) that submitted the purchase
The purchase total amount
The human readable code that a contact can reclaim a purchase event
Responses
The request has succeeded
Body
The purchase customer event identifier
PUT https://sandbox.crm.com/self-service/v1/purchases/reclaim HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"receipt_code": "sdfsdfsdf4-43-r-few-f-wf-r3443;1234",
"merchant_tap_code": "TAP001",
"venue_tap_code": "TAP002"
}
Send referrals to contacts, inviting them to register to the business scheme and in return to award their referred by friend
Request headers
Authorization Token
Request body
The email address or phone numbers that referrals will be sent to
Responses
OK
POST /send_referrals HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"recipients": [
"j_doe@crm.com",
"0035722265566"
]
}
HTTP/1.1 200 OK
Create a referral customer event
Request headers
Authorization Token
Request body
The referral code
Responses
OK
Body
The customer event identifier
POST /referrals HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"referral_code": "REF123"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "fe7bcab9-59cf-4906-a100-482396f5bf3f"
}
Returns an estimation on whether usage consumption is authoised or not based on purchased services allowance and how much was consumed. Web API also returns remaining allownace per service
Request parameters
Set to True if the remaining usage allowance should also be included in the response. When set to False, the Web API just informs whether usage consumption is authorised or not.
Request headers
Authorization Token
Request body
The contact (identifier) that will be authorised.
The account that is authorised fro usage
The usage product to be authorised. IF not specified, then Web API returns usage authrsed for all services
The service through which usage will be consumed. Only termed and one-time services allow usage consumption
Service identifier.
Service classification.
The organisation at which usage will be consumed
Amount of money intended to be spent for this usage
Currency code
Usage amount requested to be consumed
Responses
Body
Authorised usage among all of the contact’s services. In other words, the remaining usage that the contact is still allowed to consume
Remaining usage amount among all services that allow consumption
The usage service that is authorised for consumption
Usage service product identifier
Usage service SKU
Usage service name
The usag service’s measurement unit
Measurement unit identifier
Measurement unit name
Measurement unit display name
List of services that have remaining allowance for the specified usage service
The subscription service’s uniuee identifier
Service product classification. Usage is allowed only through One-time and Termed service products
The termed/one-time service product
Product identifier
Product SKU
Prodct name
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",
"account_id": "2f2a7993-6bbb-bd77-cbc8-8a2a774ef4f2",
"product_id": "2f2a7993-6bbb-bd77-cbc8-8a2a774ef4f2",
"service": {
"id": "2f2a7993-6bbb-bd77-cbc8-8a2a774ef4f2",
"classification": "TERMED_SERVICE"
},
"organisation_id": "2f2a7993-6bbb-bd77-cbc8-8a2a774ef4f2",
"cash_amount": 1.99,
"currency_code": "",
"usage_amount": 1
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"estimation_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"authorised_usage": [
{
"amount": 2.68,
"product": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "Data",
"name": "Data"
},
"measurement_unit": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"name": "Gigabytes",
"display_name": "GB"
},
"services": [
{
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"classification": "ONE_TIME_SERVICE",
"product": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "UNL_DATA",
"name": "Weekly Unlimited Data"
}
}
]
}
],
"services": [
{
"authorise_consumption": true,
"currency_code": "EUR",
"service": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"classification": "ONE_TIME_SERVICE",
"product": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "DAY5BG",
"name": "Daily 5GB NOW"
}
},
"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": "",
"display_name": ""
}
}
]
}
]
}
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
Available account funds that can be used to pay off the Invoice. Available when the account is in credit and/or the account has a credit limit. Account funds are calculated as the account’s credit limit minus the amount in credit. for example credit limit is 100 and account credit is 50, then account fund sis returned as 150
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
Information about the 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
Information about the 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.
Organisation that fulfills the order
List of ordered items which were included in the order but cannot be delivered to the consumer at the time of estimation. Invalid ordered products are excluded from the orders cost estimation (invoice_estimate)
Details on why the product is considered as invalid and cannot be included in the Order
The prodcut’s validity period has expired, i.e. the business is no longer selling this product
The product is temporarily un-available for sale at/by the requested organisation e.g. is out of stock
The product is not included in an valid Order Catalogue.
Product included in the request’s ordered items but will not be delivered
Product identifier
Product SKU
Product name
Sum of all product prices as these are defined in the product catalog
Available account funds that can be used to pay off the Invoice. Available when the account is in credit and/or the account has a credit limit. Account funds are calculated as the account’s credit limit minus the amount in credit. for example credit limit is 100 and account credit is 50, then account fund sis returned as 150
Sum of all product prices as these are defined in the product catalog
Available account funds that can be used to pay off the Invoice. Available when the account is in credit and/or the account has a credit limit. Account funds are calculated as the account’s credit limit minus the amount in credit. for example credit limit is 100 and account credit is 50, then account fund sis returned as 150
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": "PICK_UP",
"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",
"wallet_funds_amount": 1,
"payment_method_type": "CASH",
"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",
"price_terms_id": ""
}
]
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "",
"order_estimate": {
"ordering_allowed": "true",
"minimum_amount": 5,
"fulfilled_by": {
"id": "6e111025-002b-48d7-a675-6d9e48070b8f",
"name": "Bro Burgers"
},
"estimated_delivery": {
"time_to_deliver": 1,
"uot": "minutes",
"delivered_at": 12345565
}
},
"invalid_products": [
{
"unavailability_reason": "AVAILABILITY",
"product": {
"id": "6e111025-002b-48d7-a675-6d9e48070b8f",
"sku": "PIE",
"name": "Cheese pie"
}
}
],
"invoice_estimate": {
"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": 1,
"amount_to_collect": 1,
"account_credit": 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,
"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
}
}
]
}
]
},
"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": [
{
"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": 1,
"amount_to_collect": 1,
"account_credit": 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,
"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
}
}
]
}
]
}
]
}
}
]
}
Returns an estimation of a change perfromed on a subscription service, without making the change. The estimation is based on existing services owned by the customer plus any requested changes.
Request body
Applicable and required when changing the terms of a service
["id1"]
Applicable and required when amending the components of a flexible bundle service
The unique identifier of the service hwose components are amended
List of components that will be included in the bundle. At least one components should be added or removed when amending a service bundle
The unique identifier of the component service
The component service’s price terms
List of components that will be removed from the bundle. At least one components should be added or removed when amending a service bundle
Responses
Body
The bundle service whose components are amended
Sum of all product prices as these are defined in the product catalog
Available account funds that can be used to pay off the Invoice. Available when the account is in credit and/or the account has a credit limit. Account funds are calculated as the account’s credit limit minus the amount in credit. for example credit limit is 100 and account credit is 50, then account fund sis returned as 150
POST https://sandbox.crm.com/self-service/v1/estimates/service_delivery HTTP/1.1
Content-Type: application/json
{
"action": "UPGRADE",
"classification_code": "OPT_IN_RENEWALS",
"contact_id": "",
"account_id": "",
"subscription_id": "",
"scheduled_date": 12345678,
"subscription_term_changes": {
"billing_day": {
"day_of_month": 1,
"day_of_week": "MONDAY"
},
"payment_method_id": "",
"funding_source": "ACCOUNT"
},
"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": "",
"components": [
{
"product_id": "",
"price_terms_id": ""
}
]
}
],
"service_term_changes": [
{
"service_id": "",
"auto_renewal_preference": "OPT_IN, OPT_OUT",
"contract_preference": "",
"quantity": 1,
"extend_by": {
"period": "",
"uot": ""
}
}
],
"component_changes": {
"id": "",
"to_be_added": [
{
"product_id": "",
"price_terms_id": ""
}
],
"to_be_removed": [
{
"id": ""
}
]
}
}
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": {
"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": ""
}
]
}
],
"services_to_remove": [
{
"id": "",
"life_cycle_state": "CANCELLED",
"product": {
"id": "",
"sku": "",
"name": ""
}
}
],
"services_to_change": [
{
"id": "",
"life_cycle_state": "SWAPPED",
"product": {
"id": "",
"sku": "",
"name": ""
},
"change_to_product": {
"id": "",
"sku": "",
"name": ""
},
"dependencies": [
{
"item_type": "",
"item_id": "",
"item_name": ""
}
]
}
],
"components_change": {
"service": {
"id": "",
"sku": "",
"name": ""
},
"components_added": [
{
"id": "",
"sku": "",
"name": ""
}
],
"components_removed": [
{
"id": "",
"sku": "",
"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": [
{
"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
}
}
]
}
]
}
]
}
}
]
}
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"
}
}
]
}
]
}
]
}
Retrieval of a web page which serves as the entry point for a website or a particular section of a website.
{id}
{id}
This request returns the details and design of the landing page requested.
Path variables
The GUID of the landing page being called
Responses
Body
The name associated with the landing page.
The default (live) public key of the organisation
The description of the landing page.
The type of landing page.
For contact registration
For purchasing a gift pass
The link that the landing page is housed under.
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 title displayed on the landing page.
The footer text on the lanidng page.
The header text
The success message
The failure message
The text to be displayed on the button
The position of the logo
The colours associate with the landing page.
The colour code.
Retrieves the form fields associated with this landing page.
The image
The value relating to the opacity 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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
GET https://sandbox.crm.com/self-service/v1/landing_pages/JHGDFJHGSF6576GHFDSHG 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",
"title": "Enrolment form",
"footer": "Mobile Pass Card",
"header": "Welcome!",
"success": "Congradulations!",
"fail": "Request Failed!",
"button": "Submit!",
"logo_img_position": "RIGHT",
"colors": [
{
"method": "BUTTON",
"code": "FDE56F"
}
],
"form": [
{
"id": "JHAGDJGA6576HGGJ",
"property": "contact.email",
"label": "email",
"priority": 1
}
],
"opacity": [
{
"image": "BACKGROUND",
"value": 1
}
],
"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"
}
]
}
]
}
All Api’s associated to Mobile Pass Cards
{id}
/contacts/{contactId}
{id}
/contacts/{contactId}
{id}
/contacts/{contactId}
Group containing Orders Web APIs
{id}
{id}
/actions{id}
/ordersCreates a new Order for a contact based on an order’s estimation which was previously obtained via 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
Defines a specific amount that should be used on the order total amount (applicable only if “use_wallet_funds” is true)
At least one payment method must be specified.
The payment method that was selected for this order. Applicable when an online payment method type was selected and this is one of the contact’s 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/v1/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",
"wallet_funds_amount": 11.99,
"payments": [
{
"payment_method_type": "CARD",
"payment_method_id": "37b56acf-665c-1112-93fc-163b3639bcbe",
"intent_id": "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": 1668263645
}
}
{id}
Retrieves detailed information for a specific order
Path variables
The order (identifier) that will be retrieved
Request headers
Authorization Token
Responses
Body
Defines the order’ supply method
The order’s life cycle state
The order general notes
Total cost before applying the discount, if any. Tax amoutn is included
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
The unit price charged for this product in the order (excluding tax)
The item’s sub-total before applying the discount, if any. Tax amont is included
The order item’s sub-total
The price of the component before applying the discount, if any. Tax amount is included
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
Information about the 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
Amount used from account to pay off the order. Applicable when the account was in credit at the time of ordering, so this amount was used to pay off part of the order
GET https://sandbox.crm.com/self-service/v1/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": "DIRECT_SALE",
"life_cycle_state": "ON_HOLD",
"is_favorite": true,
"notes": "",
"currency": "EUR",
"discount": {
"amount": 1,
"amout_incl_tax": 1
},
"tax_amount": 1,
"wallet_funds_amount": 1.98,
"cost_before_discount": 1,
"total_cost": 14.99,
"amount_due": 13.01,
"amount_to_collect": "",
"fulfilled_by": {
"id": "5DD9C84FA60F9FE407140E20F707726A",
"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": 546733443345,
"estimated_completion_date": 122233443345,
"completed_on": 342342342344,
"cancelled_on": 34234342342,
"expiration_date": 1,
"requested_date": 1,
"started_on": 1
},
"cancellation_reason": {
"id": "",
"name": "Items out of stock"
},
"order_items": [
{
"id": "",
"quantity": 2,
"notes": "",
"unit_price": 1,
"discount": {
"amount": 1,
"amout_incl_tax": 1
},
"total_before_tax": 1.4,
"total_amount": 2.8,
"product": {
"id": "4AD9C84FA60F9FE407140E20F707726A",
"sku": "abc-12345",
"name": "Installation kit",
"description": "",
"classification": "EXPENSES_SERVICE",
"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"
},
"price_model": "VARIABLE",
"billing_model": "PRE_BILL"
},
"components": [
{
"id": "6CD9C84FA60F9FE407140E20F707726A",
"sku": "0012933-100",
"name": "Decoder",
"quantity": 2,
"price": 0.99,
"price_before_discount": 1,
"sub_total": 1.98
}
],
"variant_attributes": [
{
"key": "",
"name": "",
"value": ""
}
],
"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"
}
]
}
]
}
}
],
"payments": [
{
"payment_method_type": "ACCOUNT_DEBIT",
"paid_on": "ON_COMPLETE",
"posted_on": "",
"payment_method_details": {
"id": "",
"last4": "",
"funding_type": "",
"brand": ""
},
"amount": 1.99
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
],
"account_credit": 0.99
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "6514df04-9218-d354-9d59-ed9e98882fe6",
"number": "O000001",
"supply_method": "PICK_UP",
"life_cycle_state": "IN_PROGRESS",
"is_favorite": true,
"notes": "",
"currency": "EUR",
"discount": {
"amount": 1,
"amout_incl_tax": 1
},
"tax_amount": 1,
"wallet_funds_amount": 1.98,
"cost_before_discount": 1,
"total_cost": 14.99,
"amount_due": 13.01,
"amount_to_collect": "",
"fulfilled_by": {
"id": "5DD9C84FA60F9FE407140E20F707726A",
"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": 546733443345,
"estimated_completion_date": 122233443345,
"completed_on": 342342342344,
"cancelled_on": 34234342342,
"expiration_date": 1,
"requested_date": 1,
"started_on": 1
},
"cancellation_reason": {
"id": "",
"name": "Items out of stock"
},
"order_items": [
{
"id": "",
"quantity": 2,
"notes": "",
"unit_price": 1,
"discount": {
"amount": 1,
"amout_incl_tax": 1
},
"total_before_tax": 1.4,
"total_amount": 2.8,
"product": {
"id": "4AD9C84FA60F9FE407140E20F707726A",
"sku": "abc-12345",
"name": "Installation kit",
"description": "",
"classification": "EXPENSES_SERVICE",
"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"
},
"price_model": "VARIABLE",
"billing_model": "PRE_BILL"
},
"components": [
{
"id": "6CD9C84FA60F9FE407140E20F707726A",
"sku": "0012933-100",
"name": "Decoder",
"quantity": 2,
"price": 0.99,
"price_before_discount": 1,
"sub_total": 1.98
}
],
"variant_attributes": [
{
"key": "",
"name": "",
"value": ""
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"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"
}
]
}
]
}
}
],
"payments": [
{
"payment_method_type": "WALLET",
"paid_on": "ON_COMPLETE",
"posted_on": "",
"payment_method_details": {
"id": "",
"last4": "",
"funding_type": "",
"brand": ""
},
"amount": 1.99
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
],
"account_credit": 0.99
}
{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
roadmap
roadmap
roadmap
roadmap
roadmap
The cancellation reason of the Order. Applicable only when cancelling the Order
Responses
Body
The order identifier
PUT https://sandbox.crm.com/self-service/v1/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}
/ordersRetrieves a list of a contact’s Orders
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)
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
The amount that was used from wallet funds
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
Ttoal cost of the order befroe applying the discount, if any. Tax amount is included
The amount due. This is the due amount of the order’s invoice, calculated cosidering its due date
The amount of money that was collected to pay off the order’s invoice. This amount equals to the order’s cost minus wallet funds (if any)
The currency in which the Order will be/was paid
Details about the 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
The custom field’s unique key
The custom field’s value
GET https://sandbox.crm.com/self-service/v1/contacts/067083a5-607c-959e-e62a-3ba8d359bdd6/orders HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "3DD9C84FA60F9FE407140E20F707726A",
"number": "O000001",
"supply_method": "DIRECT_SALE",
"life_cycle_state": "IN_PROGRESS",
"is_favorite": "true",
"total_cost": 14.99,
"wallet_funds_amount": 1.98,
"discount": {
"amount": 1,
"amount_incl_tax": 1
},
"cost_before_discount": 1,
"amount_due": 13.01,
"amount_to_collect": 1,
"currency": "EUR",
"submitted_date": 11599124760,
"fulfilled_by": {
"id": "",
"name": ""
},
"order_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": ""
},
"auto_renew": true
}
}
}
],
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
]
}
{id}
/network{id}
{id}
/switch{id}
/networkRetrieve a list of organisations that consist the business network
Path variables
The organisation (identifier) whose network will be retrieved
Request parameters
The organisation name (should behave as like)
Filter based on the organisation’s relationship
Businesses
Merchants or Service Providers
Venues or Service Points
Industry filter for organisation
Industry sector filter for organisation
Business activity filter for organisation
The city that a merchant is located
Tag filter for organisation
Filter based on the organisation’s country
Filters organisations that use the service owner contact registry
Filter based on latitude coordinate
Filter based on longitude coordinate
Filter organisations based on distance in KM from the lat/lon coordinates
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
Determines whether custom fields should be retrieved or not
Filters based on custom fields (key/value set should be semicolon separated)
Filter based on TAP code
Defines whether WiFi Sites should be retrieved or not
Request headers
Authorization Token
Responses
The request has succeeded
Body
Information about the retrieved merchants (business units)
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
Information about the organisation’s contact details
Information about the specified addresses
The name of the contact information
The type of the contact information
The value of the specific contact information
The country code related to the contact detail of type phone
Details about the contact registry (applicable only if contact registry = true)
Defines whether a contact has already registered or not
Information about 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
Information about the 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
Information about the 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
GET https://sandbox.crm.com/self-service/v1/organisations/56854656-b466-463f-8e10-b6bf558b4666/network HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Alfa Bakery",
"description": "Lorem Ipsum",
"industry_name": "Restaurant",
"industry_sectors": [
{
"name": "Nightlife"
}
],
"business_activities": [
{
"name": "Bar & Grill"
}
],
"organisation_tags": [
{
"name": "Restaurant"
}
],
"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",
"distance": 3,
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
],
"contact_info": [
{
"name": "Main Office",
"type": "EMAIL",
"value": "john@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": [
"ALL"
],
"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"
}
]
}
]
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"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
Information about the retrieved organisations
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 information
Information about the specified addresses
The name of the contact information
The type of the contact information
The value of the specific contact information
The country code related to the contact detail of type phone
Defines the operation details of the organisation
Details about the organisation’s working hours
The day of the week that the organisation is open
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
Information about the 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/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"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
The organisation name (should behave as like)
Filter based on latitude coordinate
Filter based on longitude coordinate
Filter based on organisation is opened or not
Filter based on order type
How far should the distance be at a maximum default to 5KM
Industry filter for organisation
Industry sector filter for organisation
Business activity filter for organisation
Tag filter for organisation
Town/City filter for organisation
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
Body
The organisation identifier
The organisation name
The organisation description
The organisation location details
The location identifier
Location address line 1
Location address line 2
The address state/province.county
Location town/city
Location post code
Location country code
The location latitude coordinate
The location longitude coordinate
The supported distance from the lat/lon coordinates
The Google textual identifier that uniquely identifies a location
The organisation opening hours for the current day
The opening time (HH:MM format)
The clsoing time (HH:MM format)
Information about the specified addresses
The name of the contact information
The type of the contact information
The value of the specific contact information
The country code related to the contact detail of type phone
The 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
Information about the 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
Information about the 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/v1/locations?lat=35.1730837&lon=33.3761312 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": "",
"location": {
"id": "c8ea18e4-2804-3e8e-9450-600263614aac",
"address_line_1": "21 Elia Papakyriakou",
"address_line_2": "7 Stars Tower",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"lat": 35.15445,
"lon": 33.316777,
"distance": "12",
"google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
},
"opening_hours": [
{
"order_type": "DELIVERY",
"open_time": "12:45",
"close_time": "19:45"
}
],
"contact_info": [
{
"name": "Main Office",
"type": "PHONE",
"value": "john@crm.com",
"country_code": "CYP"
}
],
"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_method": [
"PICK_UP"
],
"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"
}
]
}
]
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"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"
}
]
}
]
}
Search for organisations with active reward commercial terms that participate in one of the customer’s reward schemes
Request parameters
The organisation name (should behave as like)
Defines which organisations will be retrieved
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Defines on which attribute the results should be sorted
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
Body
The organisation identifier
The organisation name
The organisation description
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
Information about the 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
{id}
/switchSwitch contact to another organisation that belongs
Path variables
The organisation (identifier) that will be switched to
Request headers
Authorization Token
Responses
OK
Body
The token that can be used in subsequent API calls
Used when access token gets expired in order to refresh
The token expiration date
Details about the authorised contact
The cotnact’s unique identifier
The contact’s title
The contact’s first name
The contact’s last name
The contact’s company name
The contact’s avatar
Defines whether the used identity is verified
Details about the organisations that the contact has joined
The organisation’s external identifier
The organisation type
The organisation name
POST https://sandbox.crm.com/self-service/v1/organisations/02ee09d0-c227-4479-a2e6-5e9958c7ea78/switch HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
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": "ORGANISATION",
"org_relationship": "MERCHANT",
"name": "CRMdotCOM"
}
]
}
Redeem a single pass
Request headers
Authorization Token
Request body
The pass code
The value of the pass to be redeemed
The OTP (if applicable)
The pass PIN (if applicable)
The contact’s unique wallet identifier for redeeming the pass
Unique id of contact redeeming the pass
Responses
OK
Body
The redeemed pass identifier
POST https://sandbox.crm.com/self-service/v1/passes HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"code": "123456789",
"value": "50",
"otp": "1234",
"pin": "1234",
"wallet_id": "2034880822564244",
"contact_id": "ade6d6cc-9a78-407e-b577-6c13d469774c"
}
{id}
{id}
/variants{id}
/components{id}
/tieringRetrieves 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.
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 request for product purchasing
Filter based on product type
Filter based on product category
Filter based on order catalog
Filter based on order category
Filter based on product brand
Filter based on product family
Filter based on product supply method
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
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
Search for a prodcut using its SKU or name
Request headers
Authorization Token
The publishable api key for application identification
Responses
Body
Indicate if the product has promotions active
List of Promotions
Applicable only for traceable physical goods with a rental price
The price’s unique identifier
List of prices per range. Applicable only for Tiers/Volume/Stairstep pricing models
The tier range price
Range lower tier. First tier always starts from 1.
Range upper tier. Last range does not have an upper tier
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
Information about the 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
GET https://sandbox.crm.com/self-service/v1/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": "",
"name": "",
"description": "",
"classification": "",
"type_composition": "",
"number_of_running_promotions": 1,
"promotions": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"name": "Sales season",
"short_description": "",
"long_description": "",
"life_cycle_state": "INACTIVE",
"availability": {
"from_date": 1,
"to_date": 1
},
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"usage_type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/logo.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
}
]
}
]
}
],
"number_of_components": 1,
"number_of_variants": 1,
"number_of_variant_attributes": 1,
"number_of_prices": 1,
"can_be_rented": true,
"availability": "",
"categories": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": ""
}
],
"type": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": ""
},
"family": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": ""
},
"brand": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": ""
},
"pricing": [
{
"id": "",
"price": 1,
"tiers": [
{
"price": 9.99,
"lower_tier": 1,
"upper_tier": 5
}
],
"currency": "",
"tax_model": "",
"rate_model": "",
"supply_method": "",
"price_terms": {
"terms_billing_cycles": 12,
"auto_renewed": true,
"price_model": "FIXED",
"billing_model": "POST_BILL",
"contract_period": {
"duration": 12,
"uot": "MONTHS"
},
"billing_period": {
"duration": 1,
"uot": "MONTHS"
},
"trial_period": {
"duration": 7,
"uot": "DAYS"
},
"rental_service": {
"id": "",
"sku": "",
"name": ""
}
},
"taxes": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
]
}
],
"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"
}
]
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
Get the product, its base price, indication that there are running promotions or its components
Path variables
The product identifier that will be retrieved
Request headers
Authorization Token
The publishable api key for application identification
Responses
Body
The product categories
The category identifier
The category name
The default modifier of this composition
The identifier of the product set as default modifier
The name of the product set as default modifier
The price’s unique identifier
List of prices per range. Available only for Tiered/Volume/Stairstep models.
Lower tier. First range’s tier is always set to 1
Upper tier. Last range does not have an upper tier
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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
GET https://sandbox.crm.com/self-service/v1/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": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "ABC12345",
"name": "Base TV",
"description": "Basic TV & myFlix",
"classification": "TERMED_SERVICE",
"type_composition": "FLEXIBLE_BUNDLE",
"number_of_running_promotions": 2,
"number_of_prices": 3,
"number_of_variant_attributes": 1,
"number_of_variants": 3,
"availability": "DISABLED",
"type": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": ""
},
"categories": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": ""
}
],
"family": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": ""
},
"brand": {
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": ""
},
"composition": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"item_type": "TYPE",
"item_id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "",
"name": "",
"minimum_quantity": 1,
"maximum_quantity": 3,
"mandatory": true,
"classification": "MODIFIER",
"price_inclusive": true,
"default_modifer": {
"id": "23458910-ebc2-d6c5-fb49-84bf99176171",
"name": "Premium Blend"
}
}
],
"pricing": [
{
"id": "",
"price": 9.99,
"currency": "EUR",
"rate_model": "FLAT",
"tax_model": "TAX_INCLUSIVE",
"supply_method": "DELIVERY",
"price_terms": {
"terms_billing_cycles": 12,
"auto_renewed": true,
"price_model": "FIXED",
"billing_model": "POST_BILL",
"contract_period": {
"duration": 12,
"uot": "MONTHS"
},
"billing_period": {
"duration": 1,
"uot": "MONTHS"
},
"trial_period": {
"duration": 7,
"uot": "DAYS"
},
"rental_service": {
"id": "",
"sku": "",
"name": ""
}
},
"taxes": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "",
"tax_code": "VAT",
"percentage": 19
}
],
"tiers": [
{
"price": 9.99,
"lower_tier": 1,
"upper_tier": 5
}
]
}
],
"upsells": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "",
"name": "",
"description": ""
}
],
"crosssells": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "",
"name": "",
"description": ""
}
],
"variant_attributes": [
{
"key": "size",
"label": "Size",
"value": "Small"
}
],
"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"
}
]
}
]
}
{id}
/variantsGet the detailed information of a composite product’s variant products, their prices, composition etc.
Path variables
The product identifier whose variants will be retrieved
Request headers
Authorization Token
The publishable api key for application identification
Responses
Body
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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
GET https://sandbox.crm.com/self-service/v1/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": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "ABC12345",
"name": "Small Latte",
"description": "Small Latte",
"type_composition": "FLEXIBLE_BUNDLE",
"pricing": [
{
"price": 9.99,
"currency": "EUR",
"rate_model": "FLAT",
"tax_model": "TAX_INCLUSIVE",
"supply_method": "DELIVERY",
"taxes": [
{
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 19
}
]
}
],
"variant_attributes": [
{
"key": "size",
"value": "Small",
"label": "Size"
}
],
"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"
}
]
}
]
}
]
{id}
/componentsReturns a list of products that could be added as components of a flexible bundle
Path variables
The product identifier whose components will be retrieved
Request parameters
Used when a component is added in a flexible termed service bundle in order to retrieve service components that have a price with the same billing cycle as the selected bundle
Applicable and required only when a billing period parameter is specified
Applicable only for termed services of flexible bundle composition. If specified, then it returns the service bundle’s existing (non-cancelled) service components and merges them with any additional components that can be included in the service bundle.
Search for products using their SKU or name
Include Creatives in response
Request headers
Authorization Token
The publishable api key for application identification
Responses
Body
The name of the component
The display name of the component
The default modifier of this component
The identifier of the product set as default modifier
The name of the product set as default modifier
If set to True, then this means that the product is already included as a 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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
GET https://sandbox.crm.com/self-service/v1/products/2f6a70b6-84d4-2859-d230-093cb7e95c62/components HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"item_type": "TYPE",
"item_id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "Milk Options Cappuccino Massimo",
"dispay_name": "Milks & Alternatives",
"mandatory": true,
"classification": "MODIFIER",
"price_inclusive": true,
"minimum_quantity": 1,
"maximum_quantity": 3,
"default_modifier": {
"id": "23458910-ebc2-d6c5-fb49-84bf99176171",
"name": "Almond milk"
},
"products": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "",
"name": "",
"description": "",
"is_included": "true",
"pricing": [
{
"id": "",
"price": 9.99,
"currency": "EUR",
"rate_model": "FLAT",
"tax_model": "TAX_INCLUSIVE",
"supply_method": "DELIVERY",
"taxes": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
]
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"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"
}
]
}
]
}
]
}
]
{id}
/tieringReturns a list of produts included within the specified product’s tier path
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
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
GET https://sandbox.crm.com/self-service/v1/products/{id}/tiering HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "3FD9C84FA60F9FE407140E20F707726A",
"sku": "abc-123456",
"name": "3Play",
"tier_level": 3,
"change_type": "DOWNGRADE",
"prices": [
{
"id": "",
"price": 1,
"currency": "",
"tax_model": "TAX_EXCLUSIVE",
"price_terms": {
"billing_period": {
"duration": 1,
"uot": ""
},
"terms_billing_cycles": 1,
"auto_renewed": true,
"contract_period": {
"duration": 1,
"uot": ""
},
"trial_period": {
"duration": 1,
"uot": ""
},
"price_model": "FIXED",
"billing_model": "POST_BILL"
}
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Get a list of Promotions
{id}
Request parameters
Search for an promotion using its name
Filter based on the organisation that the promotions are created for
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
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
Information about the 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
GET https://sandbox.crm.com/self-service/v1/promotions HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"name": "Sales season",
"short_description": "",
"long_description": "",
"life_cycle_state": "INACTIVE",
"availability": {
"from_date": 1,
"to_date": 1
},
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"usage_type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/logo.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
}
]
}
]
}
],
"pages": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}
Retrieve details of a specific promotion
Path variables
The promotion identifier that will be retrieved
Request headers
Authorization Token
Responses
Body
The segment identifier
The segment name
The segment description
The segment size
The organisation identifier
The organisation type
The organisation 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
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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
{id}
/categoriesReturns a list of active order catalogs configured for the Business
Request parameters
Search for an order catalog using its name, dispaly name or description
Retrieve order catalogs based on organisation
Retrieve order catalog based on supply method
Retreive order catalog 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
Authorization Token
The publishable api key for application identification
Responses
The request has succeeded
Body
The order catalog identifier
The order catalog name
The order catalog description
The order catalog 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
Information about the 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
GET https://sandbox.crm.com/self-service/v1/order_catalogs/?fulfilled_by=7CD9C84FA60F9FE407140E20F707726A HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "c5d37f18-2656-739d-6340-4b1413ca9617",
"name": "DRINKS",
"description": "A list of drinks that can be ordered",
"dislpay_name": "Drinks",
"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"
}
]
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/categoriesReturns a list of product categories
Path variables
The order catalog identifier
Request parameters
Search for an order category using its name
Retrieve only all child nodes that have as parent this product category
Defines whether all order 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 category identifier
The order category name
The order category description
The number of the order category’s child nodes
Details about the parent order category (applicable if this category is a child node)
The parent order category identifier
The parent order category name
GET https://sandbox.crm.com/self-service/v1/order_catalogs/{id}/order_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"
}
}
]
}
Rewards API
{id}
/performanceRetrieve all active reward schemes
Request parameters
The reward scheme name
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 reward schemes that are available
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 joined the 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
GET https://sandbox.crm.com/self-service/v1/reward_schemes HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Loyalty Scheme",
"description": "Lorem Ipsum",
"terms_and_conditions": "Only CRMdotCOM domain customer can sign up",
"sign_up_option": "SELF_SIGN_UP",
"is_joined": "false"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Retrieve all active reward offers that are applicable for a specific customer
Request parameters
Information about the industries that should be used as a filter
Information about the industry sectors that should be used as a filter
Information about the organisation tag that should be used as a filter
Information about the organisation location town/city that should be used as a filter
Information about the organisation location country (code) that should be used as a filter
Filter based on the organisation that the offers are created for
Filter reward offers whether are eligible to be used for performance purposes
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 reward offers
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
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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Defines whether the reward offer is featured or not
Defines whether the reward offer is eligible to be used for performance 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
Information about the 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
GET https://sandbox.crm.com/self-service/v1/reward_offers HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"name": "10% off on any purchase",
"reward_scheme": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Loyalty Scheme"
},
"short_description": "Short Description",
"long_description": "Long Description",
"terms_and_conditions": "Terms & Conditions",
"owned_by": {
"id": "CAD1E31269B76D7A65ACCE45B2E68987",
"name": "Pizza Yummy",
"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"
}
]
}
]
},
"is_featured": "false",
"performance_enabled": "true",
"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"
}
]
}
]
}
],
"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, whether it’s based on transaction amount or purchased products
The progression percentage for this offer
The number of purchases that were done so far and not awarded (applicable if the performance type is PRODUCT based)
The total amount of purchases that should be done in order for the offer to be awarded (applicable if the performance type is PRODUCT based)
The amount of money that was purchased so far if the offer (applicable if the performance type is AMOUNT based)
The total amount of money that should be purchased in order for the offer to be awarded (applicable if the performance type is AMOUNT based)
The number of events that were done so far and not awarded (applicable if the performance type is EVENT based)
The total number of events that should be done in order for the offer to provide the award (applicable if the performance type is EVENT based)
GET https://sandbox.crm.com/self-service/v1/reward_offers/a690caa5-9c4d-4eb0-b743-88076f1f5711/performance HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"type": "AMOUNT",
"percentage_progress": 90.11,
"current_amount": 0.99,
"target_amount": 123.78
}
Service requests shall be created via the self service platform.
{id}
/service_requests/{id}
/service_requests/{id}
/service_requests/Create 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/v1/contacts/6b888b83-b418-752f-604d-0653cf65885d/service_requests/ HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"description": "I have a query 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_requests/Retrieve all details relating to service requests created by or for the contact
Path variables
The contact id relating to the contact wishing to view the service request
Request parameters
Filter based on service request state
Any status that is not closed
Closed status
Request headers
Authorization Token
Responses
Body
The service request identifier
The sR number.
Decsription of service request
If closed - the response can be displayed.
The classification which relates to the queue type.
The status of the service request
status id
name of status
Colour code for status
If the service request is closed it should be noted whether it was resolved or not.
shall be displayed if 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
GET https://sandbox.crm.com/self-service/v1/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",
"response": "Contact has been spoken to.",
"classification": "",
"created_date": 1,
"status": {
"id": "JHSKJDHKFHJS87987",
"name": "Responded to customer",
"colour": "FA767HH"
},
"priority": "LOW",
"resolved": true,
"closure_reason": {
"id": "UGYUGUHIH768787",
"name": "Passed over to external 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}
/files{id}
/files/{file_id}
{id}
/files{id}
/filesUpload 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 service request attachment identifier created
POST https://sandbox.crm.com/self-service/v1/service_requests/6b888b83-b418-752f-604d-0653cf65885d/files 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}
/files/{file_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/v1/service_requests/6b888b83-b418-752f-604d-0653cf65885d/files/8dfc2223-edca-f05d-820b-dc96ba9df2c2 HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 204 No Content
{id}
/filesRetrieve 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
Details about attachment associated with an entity
The attachment identifier
Information about the creative type
The attachement description
The attachment file details
The file identifier
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
GET https://sandbox.crm.com/self-service/v1/service_requests/6b888b83-b418-752f-604d-0653cf65885d/files HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "af748ada-0521-0503-fc25-b67635a7d14d",
"mime": "png",
"description": "Image 1",
"file": {
"id": "0317868f-28f8-9f56-d248-5a78718b38cc",
"name": "image1.png"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/services{id}
{id}
{id}
/services{id}
/devices{id}
/servicesSubscribes the customer to new subscription services. Multiple services can be added per Web API call
Path variables
Request headers
The publishable api key for application identification
Request body
The unique identifer of the service product to which the customer subscribes
The unique identifer of the service’s price terms. Required if service has multiple prices
Responses
Body
The unique identifier of the Add service action
A proposed scheduled date
POST https://sandbox.crm.com/self-service/v1/contacts/{id}/services HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"services": [
{
"product_id": "",
"price_terms_id": "",
"quantity": 1,
"components": [
{
"product_id": "",
"price_terms_id": ""
}
]
}
],
"scheduled_date": 1,
"used_proposed_date": true
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "",
"proposed_scheduled_date": 1
}
{id}
Updates a single susbcription service. A service can be updated either in term of changing its state (e.g. Cancel, Activate) or it could update the service into another service or change its price terms. Each Web API call can either change the service’s state using one of the actions available or change the existing service’s terms.
Path variables
The identifier fo the service to be updated
Request headers
The publishable api key for application identification
Request body
Determines what kind of change will be performed on the service
Cateogrise the action using one of the avaialble categories.
The date on which the change will be performed.
When business rules define when the update is allowed to be performed, the Web API’s response will return a proposed date. If this field is set to true, then the Web API call instructs the process to use its proposed date
Applicable and required when pausing a service
The new price of the service. Applicable when changing the service only. A service’s price can be changed to any other price of a different set of price terms that might also include a different billing cycle
Applicable and required when upgrading or downgrading a service. The request should include the new service to which the existing one will be changed too as well as the new service’s set of price terms.
The unique identifier of the new service product
Required when the new service has multiple prices.
Applicable when the service’s product is a flexible bundle. The request should include the new components to be added to the existing service and/or the existing components that have to be removed. Amending a flexible bundle’s components, also results in classifying the change as an upgrade or a downgrade depending on the service’s recurring pricing.
Services that will be included in the bundle
The component’s product identifier
The component product’s price terms identifier
The existing service components to be removed from the flexible bundle
The component service’s identifier.
Responses
Body
The unique identifier of the action that updates the service. The identifier is returned only if the change is successfully submitted either to be immediatelly performed or submitted as a scheduled change. When business rules indicate a scheduled date (e.g. at the end of billing cycle), then no identifier is returned. In such cases, a proposed scheduled date is returned and used to infom subscribers about the service change allowed date.
Returned in cases where business rules dictate a scheduled date (so no identifier is returned). This proposed date can be used to call the Web API again with the proposed date. Another Web API call should be triggered again, using use_proposed_date set as True so as to enforce scheduling of the service change.
PUT https://sandbox.crm.com/self-service/v1/services/{id} 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": 1659594769,
"use_proposed_date": true,
"number_of_days": 1,
"price_terms_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"change_to_service": {
"product_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"price_terms_id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
},
"components": {
"added": [
{
"product_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"price_terms_id": "ab5f8b2e-092f-4848-8f46-31df1c014060"
}
],
"removed": [
{
"id": ""
}
]
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"proposed_scheduled_date": 1659595061
}
{id}
Updates subscription 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
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
Responses
Body
PUT https://sandbox.crm.com/self-service/v1/subscriptions/{id} HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"action": "CHANGE_PAYENT_METHOD",
"category_id": "ac5401c3-b2e6-2d99-171f-276084d97536",
"scheduled_date": 1,
"use_proposed_date": true,
"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",
"proposed_scheduled_date": 1
}
{id}
/servicesReturns a list of services to which the contact subscribed to
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
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
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
GET https://sandbox.crm.com/self-service/v1/contacts/{id}/services HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"classification": "EXPENSE",
"terms": {
"agreement_date": 12345678,
"billing_period": {
"duration": 1,
"uot": "MONTHS"
},
"billing_day": {
"day_of_month": 1,
"day_of_week": "MONDAY"
},
"payment_method": {
"id": "",
"type": "CARD",
"last4": "1234",
"brand": "VISA",
"funding_type": "PREPAID"
}
},
"subscription": {
"id": "",
"code": ""
},
"account": {
"id": "",
"number": "",
"name": ""
},
"service": {
"id": "",
"life_cycle_state": "EFFECTIVE",
"added_on": 1234567,
"removed_on": 1234567,
"first_activated_on": 1234567,
"is_recurring_charge": true,
"product": {
"id": "",
"sku": "",
"name": "",
"classification": "TERMED_SERVICE",
"type_composition": "FLEXIBLE_BUNDLE"
},
"price": {
"id": "",
"price": 9.99,
"currency": "EUR",
"price_type": "FIXED",
"billing_period": {
"duration": 1,
"uot": ""
},
"tax_model": "TAX_EXCLUSIVE"
},
"rating": {
"state": "PENDING",
"rated_from": 12345678,
"rated_to": 12345678
},
"terms": {
"billing_model": "PRE_BILL",
"auto_renew": true,
"in_contract": true,
"contract_period": {
"duration": 18,
"uot": "MONTHS",
"start_date": 12345678,
"end_date": 12345678
},
"termed_period": {
"billing_cycles": 1,
"start_date": 1,
"end_date": 1
}
},
"trial_period": {
"trial_state": "IN_TRIAL",
"start_date": 12345678,
"end_date": 12345677,
"duration": 7,
"uot": "DAYS"
},
"paused_period": {
"start_date": 12345678,
"end_date": 12345678
},
"components": [
{
"id": "",
"added_on": 1,
"first_activated_on": 1,
"in_contract": "",
"life_cycle_state": "",
"product": {
"id": "",
"sku": "",
"name": ""
},
"price": {
"price": 1,
"currency": ""
},
"trial_period": {
"trial_state": "IN_TRIAL",
"start_date": 1,
"end_date": 1
}
}
]
}
}
],
"pages": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/devicesReturns a list of Devices to which a service is already enabled on and devices onwed by the contact that are eligible to deliver the specified service
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
If not specified, then return all devices regardless of service being enabled on them or not
Request headers
The publishable api key for application identification
Responses
Body
Determined whether the service is already enabled on the device or not
Service enabled on the device
Service not enabled on the device
Detailed information of the device
Unique dentifier of the device
Device’s serial number
The device’s electronic ID
The traceable physical good related to the Device
Product unique identifer
Product SKU
Product name
GET https://sandbox.crm.com/self-service/v1/services/{id}/devices HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"state": "ENABLED",
"device": {
"id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
"serial_number": "STB0001023222",
"electronic_id": "123-456-789",
"product": {
"id": "2dc0809f-ed91-4b68-b912-5bd6064d901e",
"sku": "STB001",
"name": "Set-Top-Box"
}
}
}
]
}
Create a new Topup for a Wallet or an Account.
Request headers
The publishable api key for application identification
Request body
If not specified, then the current date is set
The topup’s amount
The top up’s currency. If not specified, then the wallet’s primary currency is used (if topping up the wallet). When topping up the account, then it’s the accounts currency by default.
The top up’s code. If not specified, then a unique 16-digit code is assigned
The top up’s payment method
One of the wallet’s payment methods that will be used to top up the wallet
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/v1/wallets/id/topup HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"topup_date": 14423423,
"amount": 1,
"currency_code": "EUR",
"code": "1234567891234567",
"payment_method_type": "CARD",
"payment_method_id": "",
"spend_condition_id": "",
"intent_id": "",
"custom_fields": [
{
"key": "custom_key",
"value": "0001-345"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": ""
}
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
Authorization Token
The publishable api key for application identification
Request body
A unique code to idetify the Transfer. If not specified, then a unique and random 16-digit code will be created.
The date on which the transfer is performed It defaults to current date if not specified
The amount of money to be transfered. The amount of money is in the origin account’s currency
From which account or wallet money will be transferred. Either an account or a wallet must be specified
To which account or wallet money will be transferred. Either an account or a wallet must be specified.
Spend conditions identifier if the transferred amount goes into a wallet’ comerce money
Responses
Body
The unique identifier of the Transfer
POST https://sandbox.crm.com/self-service/v1/transfers HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"code": "1234567891234567",
"transfer_date": 1620999582,
"amount": 9.99,
"origin": {
"account_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"wallet_id": "A65ACCE45B2E68DFDCAD1E31269B76D7"
},
"destination": {
"account_id": "CE45B2E68DFDCAD1E31269B76D7A65AC",
"wallet_id": "B76D7A65ACCCAD1E31269E45B2E68DFD"
},
"spend_condition_id": "B76D7A65ACCCAD1E31269E45B2E68DFD"
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "B76D7A65ACCCAD1E31269E45B2E68DFD"
}
{id}
{id}
/conditional_balances{id}
/transactions{id}
Updates Wallet’s Top-up settings
Path variables
The Wallet’s identifier
Request headers
Authorization Token
Request body
The wallet payment method identifier
The wallet payment method identifier
Responses
Body
The unique identifier of the updated waller
PUT https://sandbox.crm.com/self-service/v1/wallets/{id} HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"auto_topup": {
"threshold": 0.01,
"amount": 10.5,
"payment_method": {
"type": "CARD",
"id": ""
}
},
"termed_topup": {
"amount": 10.5,
"frequency": {
"period": "MONTHS",
"value": 1
},
"topup_day": {
"day_of_month": 1,
"day_of_week": "MONDAY"
},
"payment_method": {
"type": "CARD",
"id": ""
}
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": ""
}
{id}
/conditional_balancesGet the wallet’s balances split per spend condition
Path variables
The unique identification of the wallet whose balance spend conditions will be retrieved.
Request parameters
The organisation that requests the wallet balance
The id of a specific spend condition (optional). If not provided then all spend conditions are retrieved
If set to true, then the expiration information will also be retrieved
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 not specified, the wallet balance breakdown of the primary currency is returned
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
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 related to the wallet journal transaction
The type of the event
The event (unique) code
The amount that was awarded or spent
The reward event’s currency
Define how awards can be/were spent (for SPEND transactions only)
Instant Discount
Automatic Spend Requests
Spend on Customer Request
The event state
Applicable only for Award Transactions
The date on which such event was posted
Expiry date of awarded amount
Details of reward offer that triggered the award/spend (spend is related to an offer when it’s an instant discount)
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
Defines the reason for which the fee was applied on wallet
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 date on which the order was submitted
The organisation that fulfilled the order
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
GET https://sandbox.crm.com/self-service/v1/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": "CREDIT",
"posted_on": 1620912893,
"reward_event": {
"type": "SPEND",
"code": "123234342342432342324r43",
"amount": 14.99,
"currency_code": "USD",
"spend_method": "ON_REQUEST",
"state": "CANCELLED",
"date": 1614954223,
"expiry_date": 1669218231,
"reward_offer": {
"id": "7ff08bc0-c7e9-c9fe-f752-71cfb3ee0dc3",
"name": "Birthday Offer"
}
},
"financial_event": {
"type": "TOP_UP",
"id": "7ff08bc0-c7e9-c9fe-f752-71cfb3ee0dc3",
"number": "1234",
"reference_number": "REF12343",
"life_cycle_state": "REJECTED",
"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": "",
"submitted_on": 1634282740,
"fulfilled_by": {
"id": "087f8a94-a44c-5b0d-f932-2a50ec03c20c",
"name": "CRM"
}
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
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
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/v1/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
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
Contatc 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
POST https://sandbox.crm.com/self-service/v1/provisioning/service_commands HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"integration_id": "ab5f8b2e-092f-4848-8f46-31df1c014060",
"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
Information about the retrieved address lookups
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.
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 background color that the app will use as the main color (hex code). Note: will temporarily co-exist with landing_page_colours & screen_colours for backward compatibility purposes
The color that te app will use on card-like components (hex code). Note: will temporarily co-exist with landing_page_colours & screen_colours for backward compatibility purposes
The color that the app will use on all buttons, link text, selected tabs (hex code). Note: will temporarily co-exist with landing_page_colours & screen_colours for backward compatibility purposes
Colours applied to the landing page
The landing page background colour (hex code), this can be replaced by an image defined in creatives.usage_type = LANDING_PAGE_BACKGROUND_IMAGE
Landing page button colour (hex code)
Landing page text colour (hex code)
Colours applied to other screens
Screen button colour is applied to clickable buttons, selected tabs and text button options (hex code)
Colour of the wallet card (hex code). If reward tiering is configured then this colour is overridden with the reward tier colour
Colour used on card like components across all screens (hex code)
JSON script containing 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.
The colour scheme of the app
The text font style that the app will use
homepage_layout
Defines the app details (about, terms and conditions, privacy policy)
Details about us (URL or contact should be specified)
The about URL
The about rich content
Details about the terms and conditions (URL or contact should be specified)
The terms and conditions URL
The terms and conditions rich content
Details about the privacy policy (URL or contact should be specified)
The privacy policy URL
The privacy policy rich content
Details about the FAQs (URL or contact should be specified)
The FAQs URL
The FAQs rich content
Details about contact us
The contact us email address
The contact us phone number country code
The contact us phone number
The contact us website
Details about the features that will be supported by the app
Defines whether billing feature is supported
Defines whether rewards feature is supported
Defines whether ordering feature is supported
Defines whether subscriptions feature is supported
Defines whether finance feature is supported
Defines whether crm feature is supported
Defines whether marketing content feature is supported
Defines whether business network feature is supported
Defines whether mobile passes are configured (applicable only for app_type=WEB (Portal))
Defines the supported business network items (only if business network feature is supported)
Defines whether multitenancy will be supported
Defines the consumer ordering model
Supported contact features for app & portal
Are contact features supported?
How the contact code will be depicted on the app/portal, for scanning purposes
As a barcode
As a QR code
Defines the supported finance items (only if finance feature is supported)
Defines whether contacts will be able to top up their wallets
Defines whether contacts will be able to redeem a pass
Defines whether redeem pass should be supported by other attributes
Defines the supported ordering items (only if ordering feature is supported)
Defines whether pick up is supported as supply method
Defines whether delivery is supported as supply method
new object features.ordering_details.ordering_direct_sale
Defines whether contact can set preferred organisation for ordering
Defines the countries where orders will be applicable
The country (code)
Defines whether contact can pay for order 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 a list of order catalogs that should filter available products to order
the order catalog identifier
the order catalog name
Defines the supported rewards items (only if rewards feature is supported)
Defines whether automatic spend preferences will be supported
Details about the automatic spend settings that a contact can set up
Defines whether automatic spends can be set for any purchase
Defines whether contact can set preferred merchants on which automatic spends wil be applied (applicable only if any_purchase = true)
Contact auto spends will be applied on all merchant purchases
Contact will have the ability to select the merchants that auto spends will be applied
Defines whether automatic spends can be set for next purchase at merchant X
Defines whether the ability to select payment method for cashback returns will be supported
Defines whether customer self service purchase identification and OTP request to spend will be supported
Defines whether reward tiering will be supported
Defines whether contact can set preferred organisation for rewards
Defines whether refer a friend will be supported
Defines the communication method that should be used for refer a friend
Defines whether OTP send will be supported
Defines the supplementary attributes that will be supported for OTP spends
Defines how reclaim purchase identification will be made
Defines the supported crm items
false
Defines whether contacts will be able to submit service requests
Defines marketing content to display in front-end systems
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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Defines the supported Merchant App items
Defines whether the merchant app supports submission of Spend requests
Defines whether the purchase (front-end reduction) will be posted successfully only if requested spend amount fully covers the purchase amount
Details on how customers can auth by the app
Supported authentication based on email and password
Email Verification required (if auth method = email & password)
Supported authentication based on one time password
Supported authentication based on one time password
Supported authentication based on Facebook
Facebook App ID required for FB authentication
Supported authentication based on Google
Google 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
Details on supported contact attributes
Lists all supported contact attributes
The contact attribute
Defines if the profile attribute is supported or not
Lists all supported countries of agreement that contact can register to
The country code
Defines if the country is the default one or not
The allowed payment methods for the business
The allowed payment methods configured for the Business
The label of the payment method for display 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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
The image/video/animation that will be displayed in the app landing page
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
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Partner creatives for an partners assigned to the Business (by the Service Owner)
The creative identifier
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Details about the supported integrations
The integration type
Defined on the Service Owner level (inheritly utilized by Business as well)
The integration identifier
The integration name
A list of parameters that are required by the integration
The parameter key name
The parameter value
GET https://sandbox.crm.com/self-service/v1/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",
"app_type": "WEB",
"public_key": "71285392-8660-43e2-8fc3-ef1a61edbcd0",
"appearance": {
"background_color": "#eb4034",
"card_color": "#eb4034",
"button_color": "#eb4034",
"landing_page_colours": {
"background": "#eb4034",
"button": "#36e3d7",
"text": "#e3cf36"
},
"screen_colours": {
"button": "#36e3d7",
"wallet": "#eb4034",
"card": "#eb4034"
},
"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 }",
"dark_mode": "false",
"text_font": "San Francisco",
"homepage_layout": "LAYOUT3"
},
"about_details": {
"about": {
"url": "https?/crm.com",
"content": "About Us"
},
"terms_conditions": {
"url": "https?/crm.com",
"content": "Terms & Conditions"
},
"privacy_policy": {
"url": "https?/crm.com",
"content": "Privacy Policy"
},
"faqs": {
"url": "https?/crm.com",
"content": "FAQs"
},
"contact_us": {
"email_address": "info@crm.com",
"phone_country_code": "CYP",
"phone_number": "22265566",
"website": "https?/crm.com"
}
},
"features": {
"billing": true,
"rewards": true,
"ordering": true,
"subscriptions": "true",
"finance": "false",
"crm": "false",
"marketing_content": "false",
"business_network": "false",
"mobile_passes": true,
"business_network_details": {
"multitenancy": true,
"ordering_model": "SINGLE_BUSINESS"
},
"contact": {
"is_supported": true,
"code_representation": "BARCODE"
},
"finance_details": {
"wallet_top_up": "false",
"redeem_pass": "true",
"redeem_pass_attributes": [
"PIN"
]
},
"ordering_details": {
"ordering_pickup": true,
"ordering_delivery": true,
"ordering_direct_sale": true,
"preferred_organisation_orders": "true",
"ordering_countries": [
{
"country": "CYP"
}
],
"allow_wallet_funds_payment": "true",
"allow_specific_funds_amount": "true",
"allow_full_basket_wallet_fund": "false",
"order_catalogs": [
{
"id": "fc76f42c-6fcd-6f25-d0a3-2de49163cdf6",
"name": "WiFi Products"
}
]
},
"rewards_details": {
"automatic_spends": true,
"automatic_spend_options": {
"any_purchase": "true",
"any_purchase_collect_on": "ANY_MERCHANT",
"next_purchase_merchant": "true"
},
"return_cashback": true,
"customer_selfservice_purchases": true,
"reward_tiering": "false",
"preferred_organisation_rewards": "true",
"refer_friend": "true",
"refer_friend_communication_method": "SMS",
"otp_spend": "true",
"otp_spend_attributes": [
"AMOUNT"
],
"reclaim_purchase_methods": [
"BARCODE"
]
},
"crm_details": {
"service_request": "false"
},
"marketing_content_details": {
"embedded_links": [
{
"title": "News & upcoming event",
"url": "https://www.guababeachbar.com/news&events",
"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"
}
]
}
]
}
]
},
"merchant_app": {
"allow_spend": true,
"restrict_fully_covered": "true"
}
},
"auth_support": {
"email_password": true,
"email_verification": "false",
"email_otp": "false",
"sms_otp": true,
"facebook": true,
"fb_app_id": "sfsdf-23-we-wer-3ew-dw",
"google": true,
"google_app_id": "sfsdf-23-we-wer-3ew-dw"
},
"contact": {
"profile_details": [
{
"type": "GENDER",
"is_supported": true
}
],
"agreement_countries": [
{
"country": "CYP",
"is_default": "true"
}
]
},
"allowed_payment_methods": [
{
"payment_method_type": "CASH",
"label": "Cash"
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"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"
}
]
}
],
"background_creative": {
"id": "CA123456789AQWSXZAQWS1236547896541",
"usage_type": "BACKGROUND",
"width": 2159,
"height": 2159,
"format": "jpg, lottie, mp4",
"url": "https://assets.crm.com/image/background.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 1,
"height": 1,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/background.jpg"
}
]
},
"partner_creatives": [
{
"id": "WSXZAQWS1236547896541A123456789AQC",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/partner.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": "300",
"url": "https://asset.crm.com/image/offer/c_scale,w_200/partner.jpg"
}
]
}
],
"integrations": [
{
"type": "PAYMENT_GATEWAYS",
"id": "9f8d5fb5-81cc-140c-bdf4-834171abfa5d",
"name": "JCC",
"parameters": [
{
"key": "type",
"value": "pan_number"
}
]
}
]
}
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
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
}
}
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
The request has succeeded
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
GET https://sandbox.crm.com/self-service/v1/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
}
}
Returns a list of “enabled” custom fields configured in the system
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 (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
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
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
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
}
}
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 organisation tags
Request parameters
The name of the organisation tag
Defines which merchant tags belonging to industry should be retrieved
Defines which merchant tags belonging to industry sector should be retrieved
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 organisation tags
The organisation tag identifier
The organisation 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
GET /organisation_tags HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "E4AC253114B84DF2B347996DC277DDDF",
"name": "Restaurant"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 100
}
}
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/v1/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,
"product_count": 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 of this queue
Service request category id
Service request category name
GET https://sandbox.crm.com/self-service/v1/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": "HIGH",
"urgency": "URGENT",
"priority": "HIGH"
},
"default_tags": [
{
"tag_id": "93861e6b-2482-784a-5ff7-9d1c16a318e3",
"name": "",
"colour": ""
}
],
"default_categories": [
{
"id": "2f4ffc37-9463-4f17-9549-dd3cbc24f7e7",
"name": "Self-service SR"
}
]
}
}
]
}
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": "HIGH",
"urgency": "LOW",
"priority": "URGENT"
},
"default_tags": [
{
"tag_id": "93861e6b-2482-784a-5ff7-9d1c16a318e3",
"name": "",
"colour": ""
}
],
"default_categories": [
{
"id": "2f4ffc37-9463-4f17-9549-dd3cbc24f7e7",
"name": "Self-service SR"
}
]
}
}
]
}
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
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
GET https://sandbox.crm.com/self-service/v1/languages HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"language_code": "EN"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
Provides recommendation on products that the business wants to promote to its consumers through an application:
- Business promotes its best selling products (in term of quantities of items sold to consumers)
- Business recommends products to include in purchases and this will result in applying either a Reward Offer or a Promotion to the consumer.
- Business informs the consumer a list of products on which they can spend their awarded amounts based on their Busines spocket’s commerce balance and its product conditions.
Request parameters
The contact (identifier) for which product recommendation is performed.
The number of products to be returned in each recommended category. If not specified, then it defaults to 5, and the maximum allowed size is 50.
Responses
Body
GET https://sandbox.crm.com/self-service/v1/products/recommendation?contact_id= HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"category": {
"type": "REWARD_OFFER",
"id": "string",
"name": "string",
"description": "",
"validity_ends": 123456789
},
"product": {
"id": "string",
"sku": "string",
"name": "string",
"description": "string",
"pricing": {
"id": "string",
"price": 5.99,
"currency_code": "EUR",
"price_terms": {
"billing_cycle": {
"duration": 1,
"uot": "MONTH"
}
},
"tiers": {
"upper_tier": 5,
"number_of_tiers": 3
}
}
}
}