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)
The contact’s password (required for EMAIL)
The token taken from the oAUTH service provider (required for Facebook and Google providers)
The contact’s phone number (required for PHONE)
The contact’s phone number country code (required for PHONE)
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
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"
}
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"
}
]
}
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 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"
}
]
}
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 content of the communication sent
The actual subject of the communication sent (if applicable)
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
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
GET https://sandbox.crm.com/self-service/v1/communications/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 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
}
{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}
{id}
/consents{id}
{id}
/demographicsCreate 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)
The contact’s password (required for EMAIL)
Defines whether the username (email) should be verified (required for EMAIL)
The contact’s phone number (required for PHONE)
The contact’s phone number country code (required for PHONE)
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
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}
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
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
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 signle contact
Path variables
The unique ID for which the demographics will be returned
Responses
Body
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}
/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
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
The address line 1
The address line 2
The address county
The address city
The address postal code
The address country identifier
The address care of
Defines whether the address is the primary one
The latitude of the address
The longitude of the addrsss
The Google textual identifier that uniquely identifies an address
Responses
The request has succeeded
Body
The address record identifier
PUT /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Star",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CY",
"care_of": "",
"is_primary": true
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/addresses/{address_id}
Remove an existing address from a specific contact
Path variables
The contact (id) from which the address will be removed
The address identifier that should be removed
Request headers
Authorization Token
Responses
The request has succeeded
Remove an existing contact address
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/addressesRetrieve the addresses of a specific contact
Path variables
The contact identifier for which his/her addresses will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The address identifier
The address’ type
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 unique Google identifier for the 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}
/fingerprints{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
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 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’s main information. Required and applicable if the payment method type is CARD
The card name
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
ISO 3 chars 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
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": "ACCOUNT",
"is_primary": "true",
"is_backup": "false",
"notes": "Lorem Ipsum",
"bank_details": {
"account_holder_name": "John Doe",
"account_number": "001002001",
"sort_code": "102491",
"iban": "SE3550000000054910000003",
"bank": "Barclays",
"branch": "Ascot",
"swift": "12345678"
},
"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": "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
The international bank account number
The bank sort code
The identifier of the bank
The identifier of the bank branch
The bank account swift number
The card’s main information. Required and applicable if the payment method type is CARD
The card name
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 f the card. Either the card number or the first 6 and last 4 digits must be specified
iso 3 char coutnry 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 processed the payment method details
The card token
Examples
Responses
The request has succeeded
Body
The payment method identifier
PUT /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"is_primary": "true",
"is_backup": "false",
"notes": "Lorem Ipsum",
"bank_details": {
"account_holder_name": "John Doe",
"account_number": "001002001",
"iban": "SE3550000000054910000003",
"sort_code": "102491",
"bank": "Barclays",
"branch": "Ascot",
"swift": "12345678"
},
"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_code": "CY",
"use_billing_address": "true"
}
},
"gateway_token": {
"gateway_identifier": "",
"gateway": "JCC",
"token": "123654789654"
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/payment_methods/{payment_method_id}
Remove an existing payment method from a specific contact
Path variables
The contact identifier whose payment method will be removed
The payment method identifier that will be removed
Request headers
Authorization Token
Responses
The request has succeeded
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/payment_methodsList of Payment methods allocated to contact.
Path variables
The contact identifier whose payment methods will be retrieved
Request parameters
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 card’s main information. Required and applicable if the payment method type is CARD
The card name
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
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
Unique Identifier such as PayPal Username
The payment gateway that tokenized the card
The card token
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
Path variables
The contact identifier for which a Payment Intent will be set up
Request headers
Authorization Token
Request body
The payment gateway for which the Intent will be set up
Examples
Responses
The request has succeeded
Body
The client’s secret number retrieved by the gateway
Add a payment method
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/intents HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"payment_gateway": "STRIPE"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"client_secret": ""
}
{id}
/fingerprintsAllows a credit card to be hashed to provide the details for both a CIM and for later use as card identifier for redemption, or refunds.
Path variables
The contact identifier for which a Payment Intent will be set up
Request headers
Authorization Token
Request body
The payment gateway for which the Intent will be set up
16 Digit card number to provide a fingerprint
Examples
Responses
The request has succeeded
Body
Fingerprint of the card number
Add a payment method
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/intents HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"payment_gateway": "STRIPE"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"client_secret": ""
}
{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
Defines whether the phone will be the primary one
The phone number
The country that the phone is registered to
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
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
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
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 ID
Examples
Responses
The response succeeded
Body
The account id
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"
}
{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 billing address of the account which is the same as one of the contact’s addresses
The address line 1
The address line 2
The address county
The address city
The address postal code
The address country identifier
The page number
The number of records per page
The total number of records overall
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 id of the billing 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
ID of reward tier
The reward tier name
Color of Tier
Date reached current tier
Points collected during the period
Total Lifetime Points
point need to maintain current tier
dates point must be collected by
next Tier ID
Next Tier name
Points Needed to progress to next tier
Points need to be collected by date
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)
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)
The preferred payment method identifier
The customer’s preferred payment method identifier that will be used for spending purposes
The first six digits of the card (applicable only if the payment method type is card based)
The last four digits of the card (applicable only if the payment method type is card based)
The bank’s iban (applicable only if the payment method type is direct debit based)
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
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
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 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
Request headers
Authorization Token
Request body
The code that identifies the purchase
Responses
The request has succeeded
Body
The puchase customer event identifier
PUT https://staging.crm.com/self-service/v1/purchases/link HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"auth_code": "e863d773-6a82-e596-3415-f34d1f74ff74d82f441d-d9a4-d9a8-12f4-b186394a1dd81596703136"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "f248292d-2950-2175-851a-9be073b71c5b"
}
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",
"+35722265566"
]
}
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}
/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 close 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 close 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}
/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 amount that is allocated to the specified spend condition
The unique ID of the spend condition group
The name of the spend condition group
The organisations where the amount can be spent at
The ID of the organisation
The name of the organisation
The location of the organisation
The products that the amount can be spent for
The type of the ID to be provided
The ID of the product (based on the type provided)
The name of the product
The descrtipion of the product
The time when the amount can be spent
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 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 GUID of the routing rule
The routing rule’s payment gateway
The type of the payment method
The currency code applicable for this rule
The country code(s) applicable for this rule
GET /estimates/routing_rules HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "F8F8E9DA009A4B70BCEEB113B183456D",
"connector": "STRIPE",
"payment_method_type": "PAYPAL",
"currency": "",
"countries": [
"GR"
]
}
Preview order information before making an order including fulfillment and invoice estimations
Request headers
Authorization Token
Request body
The supply method for the order
Required for Delivery orders
Responses
The request has succeeded
Body
The uniue identifier of the order’s estimation. To be used to make a new order
The organisation identifier that will fulfill the order
The organisation name that will fulfill the order
POST /estimates/orders HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"account_id": "",
"supply_method": "DELIVERY",
"fulfilled_by": "",
"requested_delivery_at": {
"time": 30,
"time_unit": "MINUTES",
"date": 12312323123
},
"address_id": "",
"notes": "",
"line_items": [
{
"id": "",
"quantity": 1,
"price": 2.99,
"tax_model": "TAX_INCLUSIVE",
"notes": "",
"components": [
{
"id": "",
"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": 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": 19
}
}
],
"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": 19
}
}
]
}
]
}
}
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
Responses
Body
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 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
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
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
POST https://sandbox.crm.com/self-service/v1/estimates/order_fulfillment HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"supply_method": "DELIVERY",
"address_id": "28441e3e-767a-b6cc-9a59-6d7705de6428",
"is_open": true,
"requested_organisation_id": "4456e728-019c-86e4-3e4f-bb7920e2ef75"
}
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"
},
"parent_organisation": {
"id": "b1607c37-e750-2324-ac49-6591a86f54b8",
"name": "Best Burger",
"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"
}
]
}
]
}
}
}
]
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 milestone must be specified.
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 /orders HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json
{
"estimation_id": "",
"payments": [
{
"payment_method_type": "CASH",
"paid_on": "ON_ORDER",
"payment_method_id": "",
"amount": 2,
"payment_token": ""
}
]
}
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
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
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 Order’s total amount
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
GET /contacts/{id}/orders HTTP/1.1
Authorization: 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,
"currency": "EUR",
"submitted_date": 1,
"order_items": [
{
"quantity": 1,
"product": {
"id": "",
"sku": "",
"name": ""
}
}
]
}
{id}
Retrieves detailed information for a specific order
Path variables
The order identifier
Request headers
Authorization Token
Responses
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
GET /orders/{id} HTTP/1.1
Authorization: 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,
"currency": "EUR",
"fulfilled_by": {
"id": "5DD9C84FA60F9FE407140E20F707726A",
"name": "Good Burgers"
},
"address": {
"address_line_1": "17 Baker Str",
"address_line_2": "",
"state_province_county": "",
"town_city": "",
"postal_code": "12462",
"country_code": "GR"
},
"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": ""
},
"components": [
{
"id": "6CD9C84FA60F9FE407140E20F707726A",
"sku": "0012933-100",
"name": "Decoder",
"quantity": 2,
"price": 0.99,
"sub_total": 1.98
}
]
}
],
"payments": [
{
"payment_method_type": "CARD",
"paid_on": "ON_COMPLETE",
"posted_on": "",
"pyment_method_details": {
"id": "",
"last4": "",
"funding_type": "",
"brand": ""
},
"amount": 1
}
]
}
{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
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
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
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
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 /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
The contact detail identifier
The contact detail name
The contact detail type
The contact detail value
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
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
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
Request headers
Authorization Token
Responses
Body
ID of Merchant or Venue with Store Information
Distance from Supplied lat / lon
Open Hours for the current day.
HH:MM format string
HH:MM format string
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 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
Defines which organisations will be retrieved
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
{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 product brand
Filter based on product family
Filter based on product supply method
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
Responses
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/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"
}
]
}
]
}
]
}
]
Rewards API
Retrieve 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
Authorization: 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 merchant/outlet location that should be used as a filter
Filter based on the organisation that the offers 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
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
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
}
}
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
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 latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies a location
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
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
Request headers
The publishable api key for application identification
Responses
Successfull Completed
Body
The application identifier
The application name
The application description
The application type
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 the supported rewards items (only if rewards feature is supported)
Defines whether automatic spend preferences will be supported
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 the supported business network items (only if business network feature is supported)
Defines whether multitenancy will be supported
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 Facebook
Supported authentication based on Google
Details on supported contact attributes
Lists all supported contact attributes
The contact attribute
Defines if the profile attribute is supported or not
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?app_id=f9e4b742-bfe1-09dc-f623-de71aaed61ff&version=1.1 HTTP/1.1
api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "0b9ab3de-af32-47f9-faca-ff5c94063819",
"name": "Brew Coffee App",
"description": "Best coffee app",
"app_type": "WEB",
"appearance": {
"background_color": "#eb4034",
"card_color": "#eb4034",
"text_font": "Open Sans"
},
"about_details": {
"about": {
"content": "About Us"
},
"terms_conditions": {
"content": "Terms & Conditions"
},
"privacy_policy": {
"url": "https?/crm.com"
},
"contact_us": {
"email_address": "info@crm.com",
"phone_country_code": "357",
"phone_number": "22265566",
"website": "https?/crm.com"
}
},
"features": {
"billing": false,
"rewards": true,
"ordering": true,
"ordering_details": {
"ordering_pickup": true,
"ordering_delivery": true
},
"rewards_details": {
"automatic_spends": true,
"return_cashback": true,
"customer_selfservice_purchases": true
}
},
"auth_support": {
"email_password": true,
"email_verification": false,
"sms_otp": true,
"facebook": true,
"google": true
},
"contact": {
"profile_details": [
{
"type": "BIRTHDATE",
"is_supported": true
}
]
}
}
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
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 /industry_sectors HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "E4AC253114B84DF2B347996DC277DDDF",
"name": "Consultancy",
"related_industries": [
{
"id": "",
"name": ""
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 100
}
}
Returns a list of organisation tags
Request parameters
The name of the organisation tag
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
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
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
{
"id": "fe0bbf83-f7df-d922-dca4-d4e1f20087ea",
"name": "Cold Drinks",
"description": "Cold Beverages",
"child_nodes": 2,
"parent": {
"id": "fe0bbf83-f7df-d922-dca4-d4e1f20087ea",
"name": "Drinks"
},
"available_in_order_menus": "false"
}