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.
The CRM.COM Self Service API uses a JWT token that is returned from a contact authentication call either using user / password or One Time Password request.
A pubic api key should be provided as part of the header for application identification, i.e. -H “api_key : crm_test_;dwfwgiuhjr412edws”
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
curl -X POST \
https://api.crm.com/selfservice/v3/contact/98765432/paymentmethod \
-H 'Authorization: Bearer secret_U0tfZGtqYXNmZGJob2VJUkZKRVdGSjo=' \
-H 'api_key: 8c54d563-b991-4b76-8a83-557c08166f95' \
-H 'Content-Type: application/json' \
-d '{
"accounts": [{
"account_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
"opt_in_subscriptions": true,
"opt_in_purchases": true,
"use_primary": false
}],
"payment_method_type": "STRIPE",
"card": {
"gateway_tokens": [{
"gateway": "STRIPE",
"token": "strp_dwfgrjefegrfew"
}]
}
}’
CRM.COM uses conventional HTTP response codes and human-readable messages in JSON format to indicate the success or failure of an API request
- 2xx success status codes confirm that your request worked as expected
- 4xx error status codes indicate an error because of the information provided (e.g., a required parameter was omitted)
- 5xx error status codes are rare and indicate an error with Stripe’s servers
Please note that some 4xx errors that could be handled programmatically (e.g. a contact already exists) contain the following informaiion
- HTTP Code (programmatic consumption)
- Message (human-readable)
- Attribute (attribute that caused the error)
Below is a list of our common error codes that can be returned, along with additional information about how to resolve them
The request has succeeded
The input request was invalid or incorrect, often due to missing a required parameter
The provided API Key or Token is invalid
The API key or Token does not have permissions to perform the request
The requested resource does not exist
The server encountered an unexpected condition which prevented it from fulfilling the request
The server received an invalid response from the upstream server it accessed in attempting to fulfill the request
The server 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 and/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" />
Ability to authenticate customers via a Mobile App or a Portal
{id}
/change_password{id}
/sign_outAuthenticate 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 (required for EMAIL). If password not provided then OTP request is triggered.
The contact’s password (applicable for EMAIL)
The token taken from the oAUTH service provider (required for Facebook and Google providers)
The contact’s phone number (required for PHONE). OTP request is triggered.
The contact’s phone number country code (required for PHONE)
The application identifier
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
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"
}
]
}
POST /contacts/authenticate HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"provider": "GOOGLE",
"token": "GOOGLEID1234567"
}
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"
}
]
}
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"
}
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
The value of the credential to check
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
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
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
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
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}
/change_passwordChanges the password for a contact’s identity (EMAIL based)
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}
/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
Verify a contact’s email address username
Request parameters
The token that will used for verifying the contact’s email address
Responses
The request has succeeded
POST /contacts/verify_email?token=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"
}
Contact Management
{id}
/credentials{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 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
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 PHONE and an OTP is generated)
The one time password auth id (applicable only when provider is 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"
}
{id}
/credentialsCreate a set of credentials for an existing customer
Path variables
The contact that should be updated
Request headers
Authorization Token
Request body
Details about the customer’s identity
The 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}
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 consent state to be updated
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 consent
The country code on which the contact agreed to register to
The custom field’s unique key
The custom field’s value
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"code": "ABC-123",
"type": "COMPANY",
"title": "Sir",
"first_name": "John",
"middle_name": "Alias",
"last_name": "Doe",
"preferred_language_code": "ENG",
"avatar_url": ""
}
{id}
/demographicsRetrieves the demographics of a single contact
Path variables
The unique ID for which the demographics will be returned
Responses
Body
The contact 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
Defines the purpose of preferred organisation
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
{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 addess 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"
}
]
}
{id}
/devices{id}
/devices{id}
/devicesAdd devices to a contact
Path variables
The contact (id) for which a device will be added
Request headers
Authorization Token
Request body
The device’s serial number or device ID
The device’s registration type
The device’s registration token
Responses
The request has succeeded
Body
The contact identifier
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/devices HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"serial_number": "00000000-000000000000000",
"registration_type": "ANDROID",
"registration_token": "4AD9C84FA60F9FE407140E20F707726A"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/devicesGet a list of contact devices.
Path variables
The contact identifier for which a list of devices 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 device identifier
The device’s serial number which can also be the device id
The device’s registration token
The device’s registration type based on the device’s product and the communication settings, which can be either Android or IOS
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/devices HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"device_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"serial_number": "00000000-000000000000000",
"registration_token": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"registration_type": "IOS"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
/files{id}
/files{id}
/filesAdd a new file to a Contact
Path variables
The contact identifier for which a file will be added
Request headers
Authorization Token
Request body
The unique identifier of the file to be added
A description of the file added
Examples
Responses
The request has succeeded
Body
The contact identifier
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/files HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"description": "This is the proof of address"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/filesRetrieve an existing Contact’s files
Path variables
The contact identifier for which the files will be retrieved
Request parameters
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
Responses
The request has succeeded
Body
The id of the file
The description of the file
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/files HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"description": "This is the proof of address"
}
],
"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}
/intents{id}
/payment_methodsAdd a new payment method for a contact supports BANK, CREDIT / DEBIT cards, or Payment Gateways such as Paypal.
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
Unique identifier for the payment method, if not specified it will be auto generated
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 bank details (required and applicable if the payment method is set to BANK)
The account holder name of the 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 bank sort code
The identifier of the bank
The identifier of the bank branch
The bank account swift number
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
Information regarding the card tokenization via a payment gateway
The payment gateway that tokenized the card
The card token or fingerprint hash
The phone details (required and applicable if the payment method is set to PHONE)
The phone name
The phone country code
The phone number
The phone msisdn (only country code and phone number, not special characters)
Information regarding the phone gateway for this payment method
The carrier gateway
Examples
Responses
The request has succeeded
Body
The payment method identifier
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"id": "34234234-34343",
"payment_method_type": "CARD",
"is_primary": "true",
"is_backup": "false",
"notes": "Lorem Ipsum",
"card": {
"name": "Default Card",
"first6": "424242",
"last4": "4242",
"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": "JCC",
"token": "123654789654"
}
]
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/payment_methods/{payment_method_id}
Update an existing payment method for a contact
Path variables
The contact identifier whose 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
The bank details (required and applicable if the payment method is set to BANK)
The account holder name of the 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 bank sort code
The identifier of the bank
The identifier of the bank branch
The bank account swift number
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
Information regarding the card tokenization via a payment gateway
The payment gateway that tokenized the card
The card token or fingerprint hash
The phone details (required and applicable if the payment method is set to PHONE)
The phone name
The phone country code
The phone number
The phone msisdn (only country code and phone number, not special characters)
Information regarding the phone gateway for this payment method
The carrier gateway
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
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"is_primary": "true",
"is_backup": "false",
"notes": "Lorem Ipsum",
"card": {
"name": "Default Card",
"brand": "VISA",
"first6": "42424242",
"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": "CY",
"use_billing_address": "true"
},
"gateway_token": [
{
"gateway": "JCC",
"token": "123654789654"
}
]
}
}
{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
The payment method that is related with the account
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 bank details (applicable if the payment method is set to BANK)
The account holder name of the bank
The bank account number. Either the bank account number or IBAN must be specified
The bank sort code
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 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
If set to true, then the card holder’a address is automatically set using the account’s billing address
Information regarding the card tokenization via a payment gateway
The payment gateway that tokenized the card
The card token
The phone details (applicable if the payment method is set to PHONE)
The phone name
The phone country code
The phone number
The phone msisdn (only country code and phone number, not special characters)
Information regarding the phone gateway for this payment method
The carrier 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 /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"payment_method_type": "DIRECT_DEBIT",
"is_primary": "true",
"is_backup": "false",
"notes": "Lorem Ipsum",
"card": {
"name": "Default Card",
"first6": "42424242",
"last4": "4242",
"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",
"use_billing_address": true
},
"gateway_token": [
{
"gateway_identifier": "",
"gateway": "STRIPE",
"token": "123654789654"
}
]
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 100
}
}
{id}
/intentsSet up a new payment 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
The payment gateway for which the Intent will be set up
Responses
The request has succeeded
Body
The client’s secret number retrieved by the 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_MERCHANT"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"parameters": [
{
"key": "app_id",
"value": "0fe90e81-b943-7d66-8e09-d4a3a62674d9"
},
{
"key": "app_key",
"value": "7ec6c35f-0fa3-fbab-ddda-66a5ea3ef578"
},
{
"key": "scheme",
"value": "JCC"
}
]
}
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}
/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
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}
/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}
/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 (applicable only if action = SIGNUP)
The code that will be used for awarding referral events (applicable only if action = SIGNUP)
Examples
Responses
The request has succeeded
POST https://sandbox.crm.com/self-service/v1/contacts/49144508-5520-48e7-8e64-6a1907afbb26/organisations HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNUP",
"organisation_id": "9086dd6b-2b9f-4fba-85ff-1b89143a56da",
"service_acceptance": "true",
"email_opt_out": "true",
"sms_opt_out": "true",
"consent_state": "PENDING",
"referral_code": "1234"
}
HTTP/1.1 200 OK
POST https://sandbox.crm.com/self-service/v1/contacts/49144508-5520-48e7-8e64-6a1907afbb26/organisations HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"action": "SIGNOFF",
"organisation_id": "9086dd6b-2b9f-4fba-85ff-1b89143a56da"
}
HTTP/1.1 200 OK
{id}
/organisationsRetrieves all 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)
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
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 HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "442428dc-c817-41a7-8a3e-b49070696d6f",
"name": "BrewCoffee"
}
]
}
{id}
/accounts{id}
{id}
/rewards{id}
/accounts{id}
/financials{id}
/rewards{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
Sets the credit limit of the account, within the allowed range based on settings
Responses
The response succeeded
Body
The account identifier
PUT /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 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 information for an existing account of a contact
Path variables
The account identifier whose reward information will be updated
Notes
Only Primary Accounts of a Contact hold Reward information
Request headers
Authorization Token
Request body
The new 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
The customer’s preferred payment method identifier that will be used for spending purposes for back-end reduction rewards (applicable payment methods are direct debit and credit cards related)
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’s life cycle state
The account’s currency
The account’s classification
The classification identifier
The classification name
The address identifier
The addess 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 /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1
Authorization: 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": "SUSPENDED",
"currency_code": "EUR",
"classification": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "VIP"
},
"billing_address": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"address_type": "HOME",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "Tower Star",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CY"
}
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 100
}
}
{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’s life cycle state
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 ID of the latest closed accounting period
The name of the account’s latest accounting period
The opening balance brought forwards after the latest closed accounting period
The unique identifier of the Account classification
The name of the Account classification
The account’s wallet information (if available)
The wallet’s unique identifier
A unique 16-digit code that if not provided, it is auto-generated
The total balance of the wallet
The commerce balance of the wallet
The open 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
The address identifier
The addess 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 /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/financials HTTP/1.1
Authorization: 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": 200,
"overdue_amount": 100.5,
"credit_limit": 100,
"accounting_period_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"accounting_period_name": "OCTOBER2018",
"opening_balance": 100.5,
"classification": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "VIP"
},
"wallet": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"code": "W00123456",
"balance": 150.5,
"commerce_balance": 98,
"open_balance": 1,
"life_cycle_state": "CANCELLED",
"minimum_balance": 10,
"limit_rules": [
{
"limit_amount": 100.5,
"transaction_type": "CREDIT",
"period": "DAILY"
}
]
}
],
"billing_address": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"address_line_1": "2265 Oak Street",
"address_line_2": "",
"state_province_county": "New York",
"town_city": "Old Forge",
"postal_code": "13420",
"country_code": "USA"
}
}
{id}
/rewardsRetrieve the Rewards details for a specific account
Path variables
The account identifier whose rewards information should be retrieved
Notes
Only Primary Accounts of a Contact hold Reward information
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}
/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
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
Claim Purchase via QR Code
- Scanning a QR Code, the app should interpret the bellow attributes (order is important)
- receipt number
- merchant number
- venue number
- Based on provided values, this API should be called with the following request attributes
- receipt_code = receipt number
- merchant_tap_code = merchant number (if provided)
- venue_tap_code = venue number (if provided
Claim Purchase via Barcode
- Scanning a Barcode, the app should interpret the bellow attributes (order is important)
- merchant number
- receipt number
- purchase amount (x100)
- Based on provided values, this API should be called with the following request attributes
- receipt_code = receipt number
- merchant_tap_code = merchant number
- total_amount = purchase amount / 100
Request headers
Authorization Token
Request body
The receipt code that identifies the purchase
The merchant tap code that submitted the purchase
The venue tap code that submitted the purchase
The purchase total amount
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"
}
{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 that will be signed up to the reward scheme
Notes
Sign up to a “Self Sign Up” Reward Scheme requires only the Reward Scheme attribute
Request to join a closed loop Reward Scheme based on specific email domains requires the Reward Scheme and Email Address attributes
Sign up to a closed loop Reward Scheme should be verified via the Verify Closed Loop Sign Up Request API
Sign up to a closed loop Reward Scheme based on an external system requires the Reward Scheme and Token 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
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 body
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
POST /reward_schemes/verify_sign_up HTTP/1.1
Content-Type: application/json
{
"sign_up_code": "ABCTKN123456798VGP2020"
}
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
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
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
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
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
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}
/balances{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}
/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 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
Request headers
Authorization Token
Responses
The response succeeded
Body
The unique ID of the spend condition group
The amount that is allocated to the specified spend condition
The name of the spend condition group
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 /wallets/CAD1E31269B76D7A65ACCE45B2E68DFD/balances HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"amount": 100.5,
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Happy Hour",
"organisations": [
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Cafe",
"locations": [
{
"name": "Head Office",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"lat": "35.157115",
"lon": "33.313719",
"googleplaceid": "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": 100
}
}
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
The invoice estimate identifier
Analytical breakdown for taxes
The tax amount
The tax rate identifier
The tax rate name
The tax rate code
The tax rate percentage value
Details about the applied promotions
The discount value of the promotion
The discount type of the promotion
The discount amount of the promotion
Details about the applied promotion
The promotion identifier
the promotion name
Details about the applied taxes
The tax amount
The tax exempt reason
The tax rate identifier
The tax rate name
The tax rate code
The tax rate percentage value
POST /estimates/invoicing HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"account_id": "",
"line_items": [
{
"product_id": "",
"bundle_product_id": "",
"quantity": 1,
"price": 9.99,
"discount_value": 1,
"discount_option": "PERCENTAGE",
"tax_model": "TAX_EXCLUSIVE"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "",
"issued_date": 123456789,
"due_date": 123456789,
"currency": "EUR",
"total_net_amount": 9,
"total_discount_amount": 1,
"total_tax_amount": 0.99,
"total_amount": 9.99,
"taxes_breakdown": [
{
"tax_amount": 0.99,
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"line_items": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "",
"name": "",
"tax_model": "TAX_INCLUSIVE",
"rate_model": "TIERED",
"quantity": 1,
"unit_price": 9.99,
"net_amount": 9.99,
"discount_amount": 0.1,
"tax_amount": 0.99,
"sub_total": 9.99,
"applied_promotions": [
{
"discount_value": 0.1,
"discount_type": "AMOUNT",
"discount_amount": 0.1,
"promotion": {
"id": "",
"name": ""
}
}
],
"applied_taxes": [
{
"tax_amount": 0.99,
"tax_exempt_reason": "CONTACT",
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
]
}
]
}
Preview order fulfillment information
Request parameters
Defines whether order catalog creatives will be included in the response
Request headers
Authorization Token
Request body
Preview order based on the 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 organisation address
The address line 1
The address line 2
The address state/province/county
The address town/city
The address postal code
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
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": "DELIVERY",
"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": "Ilia Papakyriakou 21",
"address_line_2": "7 Stars Tower",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"lat": "35.157115",
"lon": "33.313719",
"googleplaceid": "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_methods": [
""
],
"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"
}
]
}
]
}
}
]
Preview order information before making an order including fulfillment and invoice estimations
Request headers
Authorization Token
Request body
The account identifier that will place the order
The supply method for the order
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
Defines the desired payment method for order
Applicable and required only for termed and one-time services. If product has a single price then it is not required.
Responses
The request has succeeded
Body
POST https://sandbox.crm.com/self-service/v1/estimates/orders HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"account_id": "1bd3e4d3-5981-209b-787d-352dcd5389a3",
"supply_method": "DELIVERY",
"fulfilled_by": "",
"requested_delivery_at": {
"time": 30,
"time_unit": "MINUTES",
"date": 12312323123
},
"address_id": "84bfd840-b520-5bde-8f0a-b36937a2fce7",
"current_location": {
"address_line_1": "17 Baker Str",
"address_line_2": "",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "12462",
"country_code": "GR",
"lat": 12.345,
"lon": 11.452,
"googlePlaceId": "123ewd23rwe23w"
},
"notes": "Sample Notes",
"use_wallet_funds": "false",
"payment_method_type": "CARD",
"line_items": [
{
"id": "7f45ad8a-b164-2a67-eb93-8651c0f1b101",
"quantity": 1,
"price": 2.99,
"tax_model": "TAX_INCLUSIVE",
"notes": "",
"price_term_id": "",
"components": [
{
"id": "6e111025-002b-48d7-a675-6d9e48070b8f",
"quantity": 1,
"price": 0.5,
"tax_model": "TAX_INCLUSIVE"
}
]
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "",
"order_estimate": {
"fulfilled_by": {
"id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Bro Burgers"
},
"estimated_delivery": {
"time_to_deliver": 1,
"uot": "minutes",
"delivered_at": 12345565
}
},
"invoice_estimate": {
"issued_date": 123456789,
"due_date": 123456789,
"currency": "EUR",
"total_net_amount": 1,
"total_discount_amount": 1,
"total_tax_amount": 0.99,
"total_amount": 9.99,
"wallet_funds_amount": 11.99,
"amount_due": 9.99,
"taxes_breakdown": [
{
"tax_amount": 0.99,
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"line_items": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "",
"name": "",
"tax_model": "TAX_INCLUSIVE",
"rate_model": "TIERED",
"quantity": 1,
"unit_price": 9.99,
"net_amount": 9.99,
"discount_amount": 0.1,
"tax_amount": 0.99,
"sub_total": 9.99,
"applied_promotions": [
{
"discount_value": 0.1,
"discount_type": "AMOUNT",
"discount_amount": 0.1,
"promotion": {
"id": "0b551184-aa37-43af-646f-a40d9da017a8",
"name": ""
}
}
],
"applied_taxes": [
{
"tax_amount": 0.99,
"tax_exempt_reason": "CONTACT",
"tax_rate": {
"id": "0b551184-aa37-43af-646f-a40d9da017a8",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
]
}
]
},
"service_delivery_estimate": [
{
"action_allowed": true,
"allowed_execution_on": 12345678,
"next_billing_date": 1235678,
"next_payment_date": 12345678,
"subscription": {
"life_cycle_state": "ACTIVE",
"terms": {
"billing_period": {
"duration": 1,
"uot": "MONTHS"
},
"billing_day": {
"day_of_month": 5,
"day_of_week": "MONDAY"
}
}
},
"services_to_add": [
{
"life_cycle_state": "EFFECTIVE",
"product": {
"id": "",
"sku": "",
"name": ""
},
"trial_period": {
"starts_on": 12345678,
"ends_on": 12345678
},
"dependencies": [
{
"item_type": "",
"item_id": "",
"item_name": ""
}
]
}
],
"billing_estimate": {
"billing_date": 12345678,
"billed_period": {
"from_date": 12345678,
"to_date": 12345678
},
"totals": {
"total_amount": 9.99,
"tax_amount": 1.99,
"net_amount": 1.99,
"discount_amount": 1.99
},
"invoicing": [
{
"issue_date": 123456,
"due_date": 123456,
"currency": "EUR",
"is_credit": true,
"total_net_amount": 1,
"total_discount_amount": 1,
"total_tax_amount": 0.99,
"total_amount": 9.99,
"taxes_breakdown": [
{
"tax_amount": 0.99,
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"line_items": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "",
"name": "",
"tax_model": "TAX_INCLUSIVE",
"rate_model": "TIERED",
"quantity": 1,
"unit_price": 9.99,
"net_amount": 9.99,
"discount_amount": 0.1,
"tax_amount": 0.99,
"sub_total": 9.9,
"applied_taxes": [
{
"tax_amount": 0.99,
"tax_exempt_reason": "CONTACT",
"tax_rate": {
"id": "0b551184-aa37-43af-646f-a40d9da017a8",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
]
}
]
}
]
}
}
]
}
Returns the applicable routing rule that matches the parameters provided
Request parameters
The type of the payment method
The currency related to routing rule
The country related to the routing rule
Request headers
Authorization Token
Responses
The request has succeeded
Body
The routing rule’s payment gateway
GET https://sandbox.crm.com/self-service/v1/estimates/routing_rules?currency=EUR&country=CYP HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"connector": "STRIPE"
}
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"]
Responses
Body
POST https://sandbox.crm.com/self-service/v1/estimates/service_delivery HTTP/1.1
Content-Type: application/json
{
"action": "ADD",
"classification_code": "OPT_OUT_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": ""
},
"services_to_add": [
{
"product_id": "",
"price_terms_id": ""
}
],
"services_to_remove": [
"id1"
],
"services_to_change": [
{
"from_service_id": "",
"to_service_product_id": "",
"to_price_terms_id": ""
}
],
"service_term_changes": [
{
"service_id": "",
"auto_renewal_preference": "OPT_IN, OPT_OUT"
}
]
}
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": ""
}
]
}
],
"billing_estimate": {
"billing_date": 12345678,
"billed_period": {
"from_date": 12345678,
"to_date": 12345678
},
"totals": {
"total_amount": 9.99,
"tax_amount": 1.99,
"net_amount": 1.99,
"discount_amount": 1.99
},
"invoicing": [
{
"issue_date": 123456,
"due_date": 123456,
"currency": "EUR",
"is_credit": true,
"total_net_amount": 1,
"total_discount_amount": 1,
"total_tax_amount": 0.99,
"total_amount": 9.99,
"taxes_breakdown": [
{
"tax_amount": 0.99,
"tax_rate": {
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
],
"line_items": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "",
"name": "",
"tax_model": "TAX_INCLUSIVE",
"rate_model": "TIERED",
"quantity": 1,
"unit_price": 9.99,
"net_amount": 9.99,
"discount_amount": 0.1,
"tax_amount": 0.99,
"sub_total": 9.9,
"applied_taxes": [
{
"tax_amount": 0.99,
"tax_exempt_reason": "CONTACT",
"tax_rate": {
"id": "0b551184-aa37-43af-646f-a40d9da017a8",
"name": "",
"tax_code": "VAT",
"percentage": 1
}
}
]
}
]
}
]
}
}
]
}
Upload an avatar on an existing contact
Request body
The contact identifier that the media will be associated with
The type of usage of this media
The folder that this media will be added
A key that will be used for tracking purposes of this upload
Responses
Body
The media signature
The media context
The cloud name where media was uploaded
The date/time that the media was uploaded
The API Key that will be used to subsequent calls on Cloudinary
Details about the upload options
The folder where the media is uploaded
The key that will be used for tracking purposes of this upload
The usage type of the uploaded media
The group identifier that multiple media will be grouped (if applicable)
Any transaformation applicable on the media (if applicable)
Different media options
The type of the option
POST https://sandbox.crm.com/self-service/v1/media/upload/signature HTTP/1.1
Content-Type: application/json
{
"contact_id": "e66896ba-db0a-41e2-8093-9aca2ae02f29",
"usage_type": "AVATAR",
"folder": "/avatars",
"tracking_key": "e668"
}
Group containing Orders Web APIs
{id}
{id}
/orders{id}
{id}
/actions{id}
/items{id}
/items/{item_id}
{id}
/items/{item_id}
Creates a new Order for a contact based on an order’s estimation
Notes
The following APIs should be called in order to make an order
Request headers
The publishable api key for application identification
Request body
The estimation_id as this is returned back by the estimates/order Web API
At least one payment method must be specified.
The type of the payment method
Defines how the order will be paid
The payment method that was selected for this order
The token that payment will be processed
The payment amount
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)
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
The actual delivery time
POST https://sandbox.crm.com/self-service/v1/orders HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"estimation_id": "37b56acf-665c-1112-93fc-163b3639bcbe",
"payments": [
{
"payment_method_type": "CASH",
"paid_on": "ON_ORDER",
"payment_method_id": "37b56acf-665c-1112-93fc-163b3639bcbe",
"payment_token": "paytoken12344",
"amount": 112.12
}
],
"notes": "",
"use_wallet_funds": "true",
"wallet_funds_amount": 11.99,
"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": 1
}
}
{id}
Updates an existing Order
Path variables
The order’s GUID
Request headers
The publishable api key for application identification
Request body
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 custom field’s unique key
The custom field’s value
Responses
Body
The identifier of the updated Order
PUT /orders/{id} HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"notes": "",
"address_id": "",
"fulfilled_by": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"requested_delivery_at": {
"time": 1,
"time_unit": "HOURS",
"date": 1
},
"payments": [
{
"payment_method_type": "CASH",
"paid_on": "ON_ORDER",
"payment_method_id": "",
"amount": 1
}
]
}
{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 if the ordered items will be delivered at the contact or if the cotnact will pick them up
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 amount of all order items
The amount that was used from wallet funds
The amount due to be paid (total cost MINUS wallet funds)
The currency in which the Order will be/was paid
guid of organisation
Name of Organisation that fullfilled Order
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": "DELIVERY",
"life_cycle_state": "IN_PROGRESS",
"is_favorite": "true",
"total_cost": 14.99,
"wallet_funds_amount": 1.98,
"amount_due": 13.01,
"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"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "3DD9C84FA60F9FE407140E20F707726A",
"number": "O000001",
"supply_method": "DELIVERY",
"life_cycle_state": "IN_PROGRESS",
"is_favorite": "true",
"total_cost": 14.99,
"wallet_funds_amount": 1.98,
"amount_due": 13.01,
"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}
Retrieves detailed information for a specific order
Path variables
The order identifier
Request headers
Authorization Token
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
The custom field’s unique key
The custom field’s value
GET https://sandbox.crm.com/self-service/v1/orders/3DD9C84FA60F9FE407140E20F707726A HTTP/1.1
auth_token: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "3DD9C84FA60F9FE407140E20F707726A",
"number": "O000001",
"supply_method": "PICK_UP",
"life_cycle_state": "IN_PROGRESS",
"is_favorite": true,
"notes": "",
"total_cost": 14.99,
"wallet_funds_amount": 1.98,
"amount_due": 13.01,
"currency": "EUR",
"fulfilled_by": {
"id": "5DD9C84FA60F9FE407140E20F707726A",
"name": "Good Burgers"
},
"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"
},
"category": {
"id": "7BD9C84FA60F9FE407140E20F707726A",
"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": "",
"price": 1.4,
"total_amount": 2.8,
"product": {
"id": "4AD9C84FA60F9FE407140E20F707726A",
"sku": "abc-12345",
"name": "Installation kit",
"description": "",
"classification": "EXPENSES_SERVICE",
"price_terms": {
"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,
"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": "CARD",
"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"
}
]
}
{id}
/actionsUpdates an existing Order
Path variables
The order’s GUID
Request headers
The publishable api key for application identification
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 identifier of the updated Order
PUT /orders/{id}/actions HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"action": "PAUSE",
"cancellation_reason_id": "",
"scheduling_settings": {
"starts_on": 1,
"ends_on": 1,
"submit_at": "0900",
"on_specific_days": [
"FRIDAY", "SATURDAY", "SUNDAY"
]
}
}
{id}
/itemsAmend an existing, non-completed Order with additional items
Path variables
The order identifier that items will be added
Request headers
Authorization Token
Request body
Responses
Body
The order identifier that was updated
POST /orders/{id}/items HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"product_id": "",
"quantity": 2,
"notes": "",
"components": [
{
"product_id": "5AD1E31269B76D7A65ACCE45B2E68DFD",
"quantity": 2
}
]
}
{id}
/items/{item_id}
Updates a non-completed Order’s items in terms of quantity, characteristics etc
Path variables
The order itentifier that item will be updated
The item identifier that will be updated
Request headers
Authorization Token
Request body
The quantity of the ordered item
The ordered item notes
The order item components
The product identifier of the component
The quantity of the product component
Responses
Successfull request
Body
The order identifier that was updated
PUT https://sandbox.crm.com/self-service/v1/orders/457dbb31-aecd-a7ca-998c-a61a87327315/items/99c6896e-c7cc-a2c9-5fe9-cad34f11af94 HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"quantity": 2,
"notes": "shaken, not stirred",
"components": [
{
"product_id": "5AD1E31269B76D7A65ACCE45B2E68DFD",
"quantity": 2
}
]
}
HTTP/1.1 200 OK
{id}
/items/{item_id}
Removes items from a non-completed Order
Path variables
The order identifier that items will be removed
The item identifier that will be removed
Request headers
Authorization Token
Responses
DELETE https://sandbox.crm.com/self-service/v1/orders/7637cbdc-54d3-0cd0-138d-dee31d00e743/items/cc6f4195-0784-02ee-c39e-1be531275f41 HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/network{id}
{id}
/switch{id}
/networkRetrieve a list of organisations that consist the business network
Path variables
The organisation identifier whose bueiness network will be retrieved
Request parameters
The organisation name (should behave as like)
Filter based on the organisation’s relationship
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
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)
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
The order catalog identifier
The order catalog display name
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
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 /organisations/56854656-b466-463f-8e10-b6bf558b4666/network 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": "Nightlife"
}
],
"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": "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"
}
]
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
Retrieve all details for a specific organisation
Path variables
The organisation identifier
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
The organisation’s operation type
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)
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
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
ID of Merchant or Venue with Store Information
Distance from Supplied lat / lon
The Google textual identifier that uniquely identifies a location
Open Hours for the current day.
HH:MM format string
HH:MM format string
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
The day of the week the Order Catalog is available
The start time the Order Catalog
The end time the Order Catalog
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
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
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
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
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"
}
]
}
{id}
{id}
/variants{id}
/componentsRetrieves 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
Allow Targetng based on the contact belonging to segments or any promotions that are not segment targetted.
If true show promotions tjhat match contact_id or non-targeted promotions
Defines how the results will be ordered
Defines on which attribute the results should be sorted
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
Responses
Body
Indicate if the product has promotions active
List of Promotions
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
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "7CD9C84FA60F9FE407140E20F707726A",
"sku": "ABC12345",
"name": "Latte",
"description": "Coffee Latte",
"classification": "NON_TRACEABLE_PHYSICAL_GOOD",
"type_composition": "COMPOSITE",
"number_of_running_promotions": 3,
"number_of_components": 1,
"number_of_variants": 3,
"number_of_variant_attributes": 1,
"number_of_prices": 3,
"availability": "ENABLED",
"categories": [
{
"id": "",
"name": "Drinks"
}
],
"type": {
"id": "",
"name": ""
},
"family": {
"id": "",
"name": ""
},
"brand": {
"id": "",
"name": ""
},
"pricing": [
{
"price": "1.99",
"currency": "EUR",
"tax_model": "TAX_INCLUSIVE",
"rate_model": "FLAT",
"supply_method": "DELIVERY",
"taxes": [
{
"id": "",
"name": "Standard VAT",
"tax_code": "VAT",
"percentage": 19
}
]
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"usage_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"
}
]
}
]
}
],
"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
Responses
Body
The product categories
The category identifier
The category 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/products/{id}/ HTTP/1.1
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": "",
"name": ""
},
"category": {
"id": "",
"name": ""
},
"family": {
"id": "",
"name": ""
},
"brand": {
"id": "",
"name": ""
},
"composition": [
{
"id": "",
"item_type": "PRODUCT",
"item_id": "",
"sku": "",
"name": "",
"minimum_quantity": 1,
"maximum_quantity": 3,
"mandatory": true,
"classification": "MODIFIER",
"price_inclusive": true
}
],
"pricing": [
{
"price": 9.99,
"currency": "EUR",
"rate_model": "FLAT",
"tax_model": "TAX_INCLUSIVE",
"supply_method": "DELIVERY",
"taxes": [
{
"id": "",
"name": "",
"tax_code": "VAT",
"percentage": 19
}
]
}
],
"upsells": [
{
"id": "",
"sku": "",
"name": "",
"description": ""
}
],
"crosssells": [
{
"id": "",
"sku": "",
"name": "",
"description": ""
}
],
"variant_attributes": [
{
"key": "size",
"label": "Size",
"value": "Small"
}
],
"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"
}
]
}
]
}
{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
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
Authorization: 4AD9C84FA60F9FE407140E20F707726A
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 headers
Authorization Token
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/components HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"item_type": "PRODUCT",
"item_id": "8c939607-2262-544d-99ef-4634c6e8836d",
"name": "",
"mandatory": true,
"classification": "MODIFIER",
"price_inclusive": true,
"minimum_quantity": 1,
"maximum_quantity": 3,
"products": [
{
"id": "8c939607-2262-544d-99ef-4634c6e8836d",
"sku": "",
"name": "",
"description": "",
"pricing": [
{
"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": "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"
}
]
}
]
}
]
}
]
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 order catalogs configured for the Business
Request parameters
Search for an order catalog using its name, dispaly name or description
Retreive 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 id of the order catalog
The name of the order catalog
The description of the order catalog
The dislay name 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
{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
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 the reward scheme is already joined by the customer
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 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 /reward_offers HTTP/1.1
Authorization: 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"
},
"display_order": 1,
"is_featured": "false",
"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"
}
]
}
]
}
],
"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)
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
}
{id}
/services{id}
{id}
{id}
/services{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
GET https://sandbox.crm.com/self-service/v1/contacts/{id}/services HTTP/1.1
Content-Type: application/json
{
"services": [
{
"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. The update might change the service’s terms or its life cycle state
Path variables
Request headers
The publishable api key for application identification
Request body
Applicable and required when changing the service terms
Applicable and required when pausing a service
Applicable and required when upgrading or downgrading a service
The unique identifier of the new service products
Required when the new service has multiple prices.
Responses
Body
The unique idetifier of the action that updates the service
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": "PAUSE",
"classification_code": "OPT_IN_RENEWALS",
"category_id": "",
"scheduled_date": 1,
"use_proposed_date": true,
"number_of_days": 1,
"change_to_service": {
"product_id": "",
"price_terms_id": ""
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "",
"proposed_scheduled_date": 1
}
{id}
Updates subscripion information related to the customer’s billing terms for a set of services
Path variables
The unique identifier of a subscription
Request headers
The publishable api key for application identification
Request body
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
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": "ONE_TIME_SERVICE",
"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": "",
"service_by": {
"id": "ac5401c3-b2e6-2d99-171f-276084d97536",
"name": "CRM"
}
},
"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": {
"price": 9.99,
"currency": "EUR",
"price_type": "FIXED",
"billing_period": 1,
"billing_period_uot": "MONTH"
},
"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
}
}
}
],
"pages": {
"page": 2,
"size": 20,
"total": 1124
}
}
Lists a number of APIs that can be used for retrieving configuration settings, required by the mobile/web client
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
}
}
Retrieve details for a specific application
Request parameters
The platform application identifier
The application version number
Use cloud name to retrieve Web APP settings.
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)
The color that the app will use on all card like components (hex code)
The text font style that the app will use
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 business network feature is supported
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
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 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 the supported business network items (only if business network feature is supported)
Defines whether multitenancy will be supported
Defines the consumer ordering model
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
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
GET https://sandbox.crm.com/self-service/v1/applications?platform_app_id=f9e4b742-bfe1-09dc-f623-de71aaed61ff HTTP/1.1
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": "NATIVE",
"public_key": "71285392-8660-43e2-8fc3-ef1a61edbcd0",
"appearance": {
"background_color": "#eb4034",
"card_color": "#eb4034",
"text_font": "Open Sans"
},
"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,
"business_network": "false",
"ordering_details": {
"ordering_pickup": true,
"ordering_delivery": true,
"preferred_organisation_orders": "true",
"ordering_country": [
{
"country": "CYP"
}
]
},
"rewards_details": {
"automatic_spends": true,
"return_cashback": true,
"customer_selfservice_purchases": true,
"reward_tiering": "false",
"preferred_organisation_rewards": "true"
},
"business_network_details": {
"multitenancy": true
}
},
"auth_support": {
"email_password": true,
"email_verification": "false",
"email_otp": "false",
"sms_otp": true,
"facebook": true,
"google": true
},
"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": "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"
}
]
}
]
}
Get the business owner details of the Mobile APP or portal
Request parameters
cloud name resolved from the DNS settings such as crmdotcom.portal.crm.com
Responses
Body
The public API Key associated with the organisation
The organisation identifier
The organisation name
The cloud name associated with the organisation
The terms of service for the specific organisation
The privacy policy for the specific organisation
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/business_owner?cloud_name=crmdotcom HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"public_key": "sdf3ref32rwerf324r134rw23rfd32r23r23r32r",
"organisation": {
"id": "a47fb812-9d74-392c-ee52-443cc940e014",
"name": "CRM.COM",
"cloud_name": "crmdotcom"
},
"terms_service": "https://www.crm.com/terms-and-conditions/",
"privacy_policy": "https://www.crm.com/privacy-policy/",
"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"
}
]
}
]
}
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
}
}
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 organisation tags
Request parameters
The name of the organisation tag
Defines which merchant tags belonging to industry should be retreived
Defines which merchant tags belonging to industry sector should be retreived
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
Responses
The request has succeeded
Body
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 description
The number of the product category’s child nodes
The number of products in the category
Details about the parent product category (applicable if this category is a child node)
The parent product category identifier
The parent product category name
Defines whether the product category should be available in order menu
GET https://sandbox.crm.com/self-service/v1/product_categories HTTP/1.1
Authorization: 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"
},
"available_in_order_menus": "false"
}
]
}
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 “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"
}
]
}