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}
/sign_outAuthentication
Authenticate a contact and provide a token for subsequent API access
Request headers
The publc api key for application identification
Request body
The contact’s username
The contact’s password
Defines whether the contact’s credentials will not be required on the next authentication (Applicable from CRM.COM R18.2.0)
Examples
Responses
The request has succeeded
Body
The token that can be used in subsequent API calls
The token that can be used to obtain a new access token when the current one becomes invalid or expires
The token expiration date
POST /contacts/authenticate HTTP/1.1
Content-Type: application/json
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
{
"username": "johndoe@crm.com",
"password": "password1234"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"exp": "1572530655"
}
Provide authentication information using a refresh token that can be used in subsequent API calls
Notes
Available from CRM.COM R18.2.0
Request headers
The token that will be used to issue new authentication information
The publc api key for application identification
Responses
The request has succeeded
Body
The token that can be used in subsequent API calls
The token that can be used to obtain a new access token when the current one becomes invalid or expires
The token expiration date
POST /contacts/refresh HTTP/1.1
refresh_token: fdb8fdbecf1d03ce5e6125c067733c0d51de209c
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"exp": "1572530655"
}
Request a one time password for a specific contact via email or SMS. The request will send an outbound validation code that can be used to verify the contact
Request headers
The publc api key for application identification
Request body
The email where the OTP will be sent to
The phone number where the OTP will be sent to
Responses
The request has succeeded
Body
The obfuscated send method value (Applicable from CRM.COM R18.2.0)
Request an OTP via email
POST http://staging.crm.com/self-service/v1/contacts/otp HTTP/1.1
api_key: 731e4023-4c04-4278-8eb5-240651317e46
Content-Type: application/json
{
"email": "johndoe@crm.com"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"obfuscated_value": "35799***834"
}
Request an OTP via phone
POST /contacts/otp HTTP/1.1
Content-Type: application/json
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
{
"phone": "+35799000834"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"obfuscated_value": "35799***834"
}
Identify a specific contact using a set of contact identifiers and request a one time password for contact verification
Request headers
The publc 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
The value of the credential to check
Responses
The request has succeeded
Body
The obfuscated send method value (Applicable from CRM.COM R18.2.0)
The one time password auth id
POST http://staging.crm.com/self-service/v1/contacts/validate HTTP/1.1
api_key: 731e4023-4c04-4278-8eb5-240651317e46
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"
}
Verifies an one time password that was requested
Notes
Part of the OTP validation the email, phone, id_number, birthdate, passport, card or auth_otp should be provided
Request headers
The publc api key for application identification
Request body
The email that was used for generating an OTP (Prior CRM.COM R18.2.0 this was semi-optional)
The phone number that was used for generaiing an OTP (Prior CRM.COM R18.2.0 this was semi-optional)
The id number that was used for generating an OTP (Available from CRM.COM R18.5.0)
The birthdate that was used for generating an OTP (Available from CRM.COM R18.5.0)
The passport that was used for generating an OTP (Available from CRM.COM R18.5.0)
The card number that was used for generating an OTP (Available from CRM.COM R18.5.0)
The one time password auth id (Available from CRM.COM R18.5.0)
The OTP that should be used for verification purposes
Defines whether an OTP will not be required on the next authentication (Applicable from CRM.COM R18.2.0)
Examples
Responses
The request has succeeded
Body
The token that can be used in subsequent API calls
The token that can be used to obtain a new access token when the current one becomes invalid or expires
The token expiration date
POST /contacts/validate HTTP/1.1
Content-Type: application/json
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
{
"email": "johndoe@crm.com",
"code": "123456789"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"exp": "1572530655"
}
Requests a password reset for an existing contact
Request headers
The publc 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 http://staging.crm.com/self-service/v1/contacts/forgot_password HTTP/1.1
api_key: 731e4023-4c04-4278-8eb5-240651317e46
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 http://staging.crm.com/self-service/v1/contacts/change_password HTTP/1.1
Content-Type: application/json
{
"token": "ABCTKN123456798VGP2020",
"password": "wsxcde421qadfg"
}
HTTP/1.1 200 OK
{id}
/sign_outTerminates the contact’ session and will no longer be able to access the client
Path variables
The contact identifier that will be signed out
Notes
Available from CRM.COM R18.5.0
Request headers
Authorization Token
Responses
The request has succeeded
POST http://staging.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/sign_out HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Contact Management
{id}
/credentials{id}
{id}
{id}
/addresses{id}
/addresses/{address_id}
{id}
/addresses/{address_id}
{id}
/phones{id}
/phones/{phone_id}
{id}
/phones/{phone_id}
{id}
/emails{id}
/emails/{email_id}
{id}
/emails/{email_id}
{id}
/devices{id}
/devices{id}
/devices/{device_id}
{id}
/consentsCreate a new contact (person/company) into the system
Request headers
The publc api key for application identification
Request body
The contact first name (required if the contact represents a person)
The contact middle name (applicable if the contact represents a person)
The contact last name (required if the contact represents a person)
The email address of the contact
The initial password of the contact
The country that the phone number is registered
The phone number of the contact
Defines whether the contact has accepted the client service
Defines whether the email should be verified (Applicable from CRM.COM R18.2.0)
Examples
Responses
The request has succeeded
Register a new PERSON contact
POST /contacts/register HTTP/1.1
Content-Type: application/json
{
"first_name": "John",
"middle_name": "Alias",
"last_name": "Doe",
"email": "johndoe@crm.com",
"password": "password1234!",
"phone_country_code": "CYP",
"phone_number": "+447515650939",
"service_acceptance": "true"
}
HTTP/1.1 200 OK
{id}
/credentialsCreate a set of credentials for an existing customer
Path variables
The contact that should be updated
Request headers
Authorization Token
Request body
The contact’s username
The contact’s password
Examples
Responses
The request has succeeded
Body
The token that can be used in subsequent API calls
The token that can be used to obtain a new access token when the current one becomes invalid or expires
The token expiration date
POST /contact/CAD1E31269B76D7A65ACCE45B2E68DFD/register_existing HTTP/1.1
Content-Type: application/json
{
"username": "johndoe@crm.com",
"password": "password1234"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
"exp": "1572530655"
}
{id}
Updates an existing contact
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
Request body
The contact’s code
The company name
The person title
The person first name
The person middle name
The person last name
The contact preferred language
The contact statutory number
The contact authorisation setting for direct marketing
The contact authorisation setting for affiliate marketing
The contact’s category. Either id or code should be specified
The category’s GUID
The category’s code
Information about the person demographics
The person gender
The person country of residence
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
Information about the company profile
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 industry of the company/ Either the id or code should be specified
Information about the industry sectors
The industry sector identifier
the industry sector code
Information about the contact’s addresses
The address identifier
The type of the address
Defines whether the address is the primary one
The 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
Information about the contact’s phones
The phone identifier
The type of the phone
Define whether the phone is the primary one
The country that the phone is registered
The phone number
Information about the contact’s emails
The email identifier
The type of the email
Defines whether the email is the primary one
Information that can be used in order to display large pages
The custom field’s unique key
The custom field’s value
Responses
The request has succeeded
Body
The contact identifier
Update contact company
PUT /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"code": "ABC-123",
"company_name": "Alpha Bravo",
"preferred_language_code": "ENG",
"statutory_number": "EF-12345",
"category": {
"id": "",
"code": ""
},
"company_profle": {
"profile_year": 129876567,
"annual_turnover": 1568.14,
"established_on": 129876567,
"number_of_employees": 1,
"registration_number": "123456",
"registration_country_code": "CYP",
"tax_reference_number": "123456",
"vat_registration_number": "123456",
"industry": {
"id": "",
"code": ""
},
"industry_sectors": [
{
"id": "CAIQ1234567891234567891234567891",
"code": ""
}
]
},
"addresses": [
{
"id": "CK1234567890123456789012345678",
"address_type": "CUSTOM5",
"is_primary": true,
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CYP",
"care_of": ""
}
],
"phones": [
{
"id": "CK1234567890123456789012345678",
"phone_type": "CUSTOM4",
"is_primary": true,
"country_code": "CYP",
"number": "238065437"
}
],
"emails": [
{
"id": "CK1234567890123456789012345678",
"email_type": "CUSTOM1",
"is_primary": true,
"email_address": "johndoe@crm.com"
}
]
}
Update contact person
PUT http://staging.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"code": "ABC-123",
"title": "Sir",
"first_name": "John",
"middle_name": "Alias",
"last_name": "Doe",
"preferred_language_code": "ENG",
"statutory_number": "EF-12345",
"direct_marketing": "false",
"affiliate_marketing": "true",
"category": {
"id": "",
"code": ""
},
"demographics": {
"gender": "MALE",
"country_of_residence_code": "CYP",
"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"
}
},
"addresses": [
{
"id": "CK1234567890123456789012345678",
"address_type": "POBOX",
"is_primary": true,
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CYP",
"care_of": ""
}
],
"phones": [
{
"id": "CK1234567890123456789012345678",
"phone_type": "CUSTOM3",
"is_primary": true,
"country_code": "CYP",
"number": "238065437"
}
],
"emails": [
{
"id": "CK1234567890123456789012345678",
"email_type": "CUSTOM5",
"is_primary": true,
"email_address": "johndoe@crm.com"
}
],
"custom_fields": [
{
"key": "back_office",
"value": "AB00001"
}
]
}
{id}
Retrieve all details for a specific contact
Path variables
The contact identifier that should be returned
Notes
To display the actual image you need to construct a URL based on the creative media url and the authorization token (e.g. https://crm.com/asset.jpg&token=4AD9C84FA60F)
Request parameters
If defined then information about the contact’s rewards will also be retrieved (Available from CRM.COM R18.5.0)
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 quarter of the year
Any amount attributes will be filtered based on the current year
Any amount attributes will be filtered from registration date
Request headers
Authorization Token
Responses
The request has succeeded
Body
The contact’s identifier
The contact’s unique code
The contact’s type
The company name
The person’s title
The person’s first name
The person’s middle name
The person’s last name
The contact’s preferred language
The contact’s statutory number
The contact authorisation for direct marketing
The contact authorisation for affiliate marketing
The contact’s category
The person’s demographics information
The gender of the contact
The country of residence
Information about the passport
THe number of the passport
The country that issued the passport
The passport expiration date
Information about the id
The id number
The country that issued the id
The id expiration date
Information about the nameday
the name day month
The name day
Information about the birthdate
The birth year
The birth month
The birth day
The company’s profile information
The profile year
The annual turnover
The date that the company was established on
The number of employees for the company
The registration number
The country that registered the company
The tax reference number
The vat registration number
The industry name
The industry sectors
The industry sector name
The contact’s addresses
The address identifier
The type of the address
Defines whether the address is the primary one
The address care of
The address line 1
Additional address information
The address state/province/county
The address town/city
The address postal code
The address country
The contact’s phones
The phone identifier
The type of the phone
Defines whether the phone is the primary one
The country that the phone is registered
The phone number
The contact’s emails
The email identifier
The type of the email
Defines whether the email is the primary one
The email address
Rewards details about the contact’s primary account. Available when the include_rewards is enabled
The total awards of the account
The total spends of the account
Information that can be used in order to display large pages
The custom field’s unique key
The custom field’s value
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 http://staging.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"code": "ABC-123",
"contact_type": "PERSON",
"title": "Sir",
"first_name": "John",
"middle_name": "Alias",
"last_name": "Doe",
"preferred_language_code": "ENG",
"statutory_number": "EF-12345",
"direct_marketing": "false",
"affiliate_marketing": "true",
"category": {
"id": "GUID",
"code": "COO1",
"name": "Category A"
},
"demographics": {
"gender": "FEMALE",
"country_of_residence_code": "CYP",
"passport": {
"passport_number": "K123456",
"issue_country_code": "CYP",
"expiration_date": 129876567
},
"id_details": {
"id_number": "123456",
"issue_country_code": "CYP",
"expiration_date": "129876567"
},
"name_day": {
"month": 10,
"day": 4
},
"date_of_birth": {
"year": 2018,
"month": 10,
"day": "16"
}
},
"addresses": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"address_type": "CUSTOM4",
"is_primary": "true",
"care_of": "N/A",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country_code": "CYP"
}
],
"phones": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"phone_type": "CUSTOM1",
"is_primary": true,
"country_code": "CYP",
"number": "238065437"
}
],
"emails": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"email_type": "CUSTOM1",
"is_primary": true,
"email_address": "johndoe@crm.com",
"email_verification": "false"
}
],
"custom_fields": [
{
"key": "back_office",
"value": "AB00001"
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"type": "PROFILEIMAGE",
"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}
/addressesAdd a new address to an existing contact. A contact can have multiple addresses but only one per address type
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
The address care of
Defines whether the address is the primary one
Responses
The request has succeeded
Body
The address record identifier
POST /contact/CAD1E31269B76D7A65ACCE45B2E68DFD/address HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"address_type": "CUSTOM2",
"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}
Add a new address to an existing contact. A contact can have multiple addresses but only one per address type
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
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 /contact/CAD1E31269B76D7A65ACCE45B2E68DFD/address/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/phonesAdd a new phone to an existing contact. A contact can have multiple phones
Path variables
The contact (id) for which a communication method 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": "CUSTOM3",
"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
POST /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}
Delete an existing phone of an existing contact
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
PUT /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
HTTP/1.1 200 OK
{id}
/emailsAdd a new email to an existing contact. A contact can have multiple emails
Path variables
The contact (id) for which an email should be added
Request headers
Authorization Token
Request body
Defines the email type that should be added
Defines whether the email should be the primary one
The email address
Defines whether the email should be verified (Applicable from CRM.COM R18.2.0)
Responses
The request has succeeded
Body
The email record identifier
POST /contact/CAD1E31269B76D7A65ACCE45B2E68DFD/communications HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"email_type": "BUSINESS",
"is_primary": "true",
"email_address": "johndoe@crm.com"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/emails/{email_id}
Update an existing email of an existing contact
Path variables
The contact (id) for which an email should be updated
The email identifier that should be updated
Request headers
Authorization Token
Request body
Defines whether the email should be the primary one
The email address
Defines whether the email should be verified (Applicable from CRM.COM R18.2.0)
Responses
The request has succeeded
Body
The email record identifier
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/emails/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"is_primary": "true",
"email_address": "johndoe@crm.com"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/emails/{email_id}
Delete an existing email of an existing contact
Path variables
The contact (id) for which an email should be deleted
The email identifier that should be deleted
Request headers
Authorization Token
Responses
The request has succeeded
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/emails/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Verify a contact’s email address (Applicable from CRM.COM R18.2.0)
Request body
The token that will used for verifying the contact’s emaill address
Responses
The request has succeeded
POST /contacts/verify_email HTTP/1.1
Content-Type: application/json
{
"token": "ABCTKN123456798VGP2020"
}
HTTP/1.1 200 OK
{id}
/devicesAdds devices on an existing contact’s primary account
Path variables
The contact (id) for which a device will be added on its primary account
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
Add contact deivce
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/devices HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"serial_number": "00000000-000000000000000",
"registration_type": "IOS",
"registration_token": "4AD9C84FA60F9FE407140E20F707726A"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "658AB90A6A77437091D158FD8E697B11"
}
{id}
/devicesGet a list of contact devices.
Path variables
The contact identifier for which a list of devices will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
Information about the contact’s devies
The account identifier that the device belongs to
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
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/devices HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"account_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"device_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"serial_number": "00000000-000000000000000",
"registration_token": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"registration_type": "ANDROID"
}
]
}
HTTP/1.1 200 OK
{id}
/devices/{device_id}
Deletes devices from an existing contact’s primary account
Path variables
The contact (id) for which a device will be deleted
The device (id) to be deleted
Request headers
Authorization Token
Responses
The request has succeeded
Add contact deivce
DELETE http://staging.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/devices/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{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 unique identifier of the contact
PUT http://staging.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/consents HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"consent_state": "WITHDRAWN"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
{id}
{id}
/payment_methods{id}
/payment_methods{id}
/payment_methods/{payment_method_id}
{id}
/payment_methods/{payment_method_id}
{id}
/accounts{id}
Create a new account for an existing contact
Path variables
The account identifier that will be updated
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
The minimum wallet balance that should be available in order for an automatic awards spending to be applied.
The minimum amount that can be spend by that specific accounts receivable during auto spend
The maximum amount that can be spend by that specific accounts receivable during auto spend
The customer’s preferred payment method that will be used for spending purposes in rewards. The payment method’s unique identifier is specified. Available from CRM.COM R18.2.0
Examples
Responses
The response succeeded
Body
The account identifier
PUT /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"account_status": "ACTIVE",
"spend_preferences": {
"enable_automatic_spend": "true",
"minimum_wallet_balance": 5.21,
"minimum_spend_amount": 5.42,
"maximum_spend_amount": 12.24,
"preferred_payment_method_id": "33434FDA22100"
}
}
{id}
Retrieve all details for a specific account
Path variables
The account identifier that should be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The account identifier
The account number
Defines whether the account is the primary one
The account life cycle state
The balance of the account
The account currency
Indicates if the account owner is tax exempt or not
The classification of the retrieved accounts
The classification identifier
The classification name
Information about the account’s rewards
The customer’s preferred payment method that will be used for spending purposes in rewards. The payment method’s unique identifier is specified. Available from CRM.COM R18.2.0
The date that the accounts signed up
Defines whether the accounts enables automatic spend on purchase events or not
The minimum wallet balance that should be available in order for an automatic awards spending to be applied
The minimum amount that can be spend by that specific accounts during auto spend
The maximum amount that can be spend by that specific accounts during auto spend
Information about the reward tier
The reward tier id
The reward tier name
Information about the reward tier
The hexadecimal value of the tier’s color
Information about the schemes that the account has signed up
The date that the account signed up to the scheme
The email address that was used to sign up to a close loop reward scheme
Information about the reward scheme
The reward scheme identifier
The reward scheme name
Information about the merchants that are authorised by an account as part of its spend preferences
The merchant identifier
Defines whether the merchant is setup for automatic spend on the next visit
Information about the business unit
The business unit identifier
The business unit name
GET /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"number": "ACR001",
"is_primary": true,
"life_cycle_state": "SUSPENDED",
"balance": 450,
"currency_code": "EUR",
"is_tax_exempt": "true",
"classification": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "VIP Customer"
},
"rewards": {
"sign_up_on": 1572450998,
"enable_automatic_spend": "true",
"minimum_wallet_balance": 10,
"minimum_spend_amount": 1.24,
"maximum_spend_amount": 151.12,
"participating_schemes": [
{
"sign_up_on": 1572450998,
"reward_scheme": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Loyalty Scheme"
},
"email_address": "johndoe@crm.com"
}
],
"reward_tier": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Gold",
"marketing_information": {
"tier_color": "FFD700"
}
},
"merchants": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"business_unit": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Bravo Coffee"
},
"is_next_visit": "false"
}
]
}
}
{id}
/payment_methodsRetrieve all payment methods for a specific contact
Path variables
The contact identifier for which a list of payment methods should be returned
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
The payment method notes
Bank details information related to the payment method. Applicable only for payment methods of type DIRECT_DEBIT, GENERIC, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5
The bank sort code
The bank account number
Information related to the bank
Information related to the bank branch
The owner of the account
The international bank account number
The business identifier code that identifies the bank
The bank swift number
Information related with the card
The card’s name
Obsfucated card number
The card’s first six digits
The card’s last four digits
The card brand
The card’s funding type. Available from CRM.COM R18.2.0
The card’s expiration month
The card’s expiration year
Defines which card will be used by default
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
The state related to the card address
The country related to the card address
The card’s classification. Available from CRM.COM R18.2.0
The card’s classification unique identifier
The card’s classification name
Information about the gateway that tokenized the card
The payment gateway that processed the payment method details
The identifier of the payment method details
Information related to the provided mandate
The unique reference, which identifies a mandate that was signed by a Debtor for any given Creditor (supports up to 35 alphanumeric characters). Applicable only for payment methods of type DIRECT_DEBIT, GENERIC, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5
The date that the mandate was signed. Applicable only for payment preferences of type DIRECT_DEBIT, GENERIC, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5
The date that the mandate will be terminated. No payments should be send after that date (inclusive).Applicable only for payment preferences of type DIRECT_DEBIT, GENERIC, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5,
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": "CARD",
"notes": "Lorem Ipsum",
"bank_details": {
"sort_code": "102091",
"account_number": "001002001",
"bank": "Barclays",
"branch": "Ascot",
"account_holder_name": "John Doe",
"iban": "SE3550000000054910000003",
"business_identifier_code": "123456789",
"swift": "123658974454"
},
"card": {
"name": "Default Card",
"card_number": "424242****4242",
"first6": "42424242",
"last4": "4242",
"brand": "VISA",
"funding_type": "PREPAID",
"expiration_month": 10,
"expiration_year": 2020,
"is_default": true,
"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"
},
"classification": {
"id": "534535ABCE232",
"name": "Gold"
}
},
"payment_gateway_token": {
"gateway": "PAYPAL",
"username": "johndoe@crm.com"
},
"mandate_details": {
"unique_mandate_reference": "",
"mandate_signing_date": 1572423477,
"mandate_termination_date": 1572423477
}
}
]
}
{id}
/payment_methodsContacts can have multiple accounts and each of these accounts can have different payment methods
Path variables
The contact identifier for which a payment method will be added
Request headers
Authorization Token
Request body
The payment method that will be related with the account
The payment method notes
Details of the bank and bank account related to the payment method.
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
Information related with the card
The card name
The card number
The card’s first six digits
The card’s last four digits
The card’s brand
Uniquely identifies this particular card number
The card’s expiration month
The card’s expiration year
Defines which card will be used by default
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
If using the Generic Gateway specify the implementation code given to you by CRM.COM
The card token
Information about the gateway token
The payment gateway that processed the payment method details
The identifier of the payment method details
Examples
Responses
The request has succeeded
Body
The payment method identifier
Add a payment method related to Card
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"payment_method_type": "CARD",
"notes": "Lorem Ipsum",
"card": {
"name": "Default Card",
"card_number": "42424242****4242",
"first6": "42424242",
"last4": "4242",
"brand": "AMERICANEXPRESS",
"fingerprint": "Xt5EWLLDS7FJjR1c",
"expiration_month": 10,
"expiration_year": 2020,
"is_default": true,
"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"
},
"card_gateway_token": [
{
"gateway": "STRIPE",
"gateway_code": "",
"token": "123654789654"
}
]
}
}
{id}
/payment_methods/{payment_method_id}
Contacts can have multiple accounts and each of these accounts can have different payment methods
Path variables
The contact identifier for which a payment method will be updated
The payment method identifier that should be updated
Request headers
Authorization Token
Request body
The payment method notes
Detals of the bank and bank account related to the payment method.
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
Information related with the card
The card name
The card number with obfsucated numbers
The card’s first six digits
The card’s last four digits
The card’s brand
Uniquely identifies this particular card number
The card’s expiration month
The card’s expiration year
Defines which card will be used by default
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
If using the Generic Gateway specify the implementation code given to you by CRM.COM
The card token
Information about the gateway token
The payment gateway that processed the payment method details
The identifier of the payment method details
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
{
"notes": "Lorem Ipsum",
"card": {
"name": "Default Card",
"card_number": "42424242****4242",
"first6": "42424242",
"last4": "4242",
"brand": "AMERICANEXPRESS",
"fingerprint": "Xt5EWLLDS7FJjR1c",
"expiration_month": 10,
"expiration_year": 2020,
"is_default": true,
"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"
},
"card_gateway_token": [
{
"gateway": "GENERIC",
"gateway_code": "",
"token": "123654789654"
}
]
}
}
{id}
/payment_methods/{payment_method_id}
Remove an existing payment method from a specific contact
Path variables
The contact identifier that the payment method should be removed
The payment method identifier that should be removed
Request headers
Authorization Token
Responses
The request has succeeded
DELETE /contact/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_method/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/accountsGet a list of contact accounts for financial transactions. 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 for which a list of accounts will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
Information about the contact’s accounts
The account identifier
The account name
The account’s life cycle state
The account’s balance
The account’s currency
The account’s credit limit
The account’s credit rating code
Defines whether the account is the primary one
The account’s classification
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "ACR0001",
"life_cycle_state": "ACTIVE",
"balance": 1501.15,
"currency_code": "EUR",
"credit_limit": 100,
"credit_rating_code": "AAA",
"is_primary": true,
"classification": {
"id": "",
"name": "",
"code": ""
}
}
]
}
{id}
/reward_schemes{id}
/reward_schemes/{reward_scheme_id}
/signoff{id}
/merchants{id}
/merchants/{merchant_id}
/remove{id}
/reward_transactions{id}
/reward_schemesSign up the account to a specific reward scheme
Path variables
The account that will be signed up to the reward scheme
Request headers
Authorization Token
Request body
The reward scheme that the account has signed up
The email address that is associated with the unique reference code and was used while signing up to a reward scheme based on supported domains
The unique reference code that will be used while signing up to that specific reward scheme
Examples
Responses
The request has succeeded
Body
The reward scheme record identifier
POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_scheme HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"reward_scheme_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
HTTP/1.1 200 OK
{id}
/reward_schemes/{reward_scheme_id}
/signoffSign off the account from a specific reward scheme
Path variables
The account that will be signed off from the reward scheme
The reward scheme identifier that the account has signed off
Request headers
Authorization Token
Responses
The request has succeeded
POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes/CAD1E31269B76D7A65ACCE45B2E68DFD/signoff HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
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 business unit 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 business unit identifier that should be authorised to perform automatic awards spending
POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"merchants": [
{
"business_unit_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"is_next_visit": "false"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"merchants": [
{
"business_unit_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
]
}
{id}
/merchants/{merchant_id}
/removeRemove an exisintg merchant from an account spend preferences
Path variables
The account identifier that will remove existing merchants
The merchant identifier that should be removed
Request headers
Authorization Token
Responses
The request has succeeded
DELETE /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants/CAD1E31269B76D7A65ACCE45B2E68DFD/remove HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
{id}
/reward_transactionsGet a list of contact reward transactions. Each reward transaction is created against an account
Path variables
The contact identifier for which a list of reward transactions should be returned
Request parameters
The reward transaction type
The life cycle state of the reward transaction
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 records
The reward transaction identifier
The reward transaction type
The life cycle state of the reward transaction
The amount of the reward transaction in system currency
The amount of the reward transaction in alternative currency
The reward transaction expiration date
The reward offer based on which the reward award transaction was created
The reward offer identifier
The reward offer name
The reward offer code
The reward offer description
The reward offer short description marketing information
The account identifier that the reward transaction was created against
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/reward_transactions HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"type": "AWARD_TRANSACTION",
"life_cycle_state": "CANCELLED",
"amount": 2.24,
"alternative_amount": 1.12,
"expiration_date": 11572530655,
"reward_offer": {
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"name": "!% Cashback",
"code": "RO01",
"description": "Lorem Ipsum",
"marketing_information_short_description": "Lorem Ipsum"
},
"account_id": "6A24D2B5E44F44B28451FE021FCAD51E"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
{id}
/wallets{id}
{id}
/wallet_transactions{id}
{id}
/allotments/{allotment_id}
{id}
Update a wallet of a contact
Path variables
The account identifier that will be updated
Request headers
Authorization Token
Request body
Information about the individual wallet limits
Defines the annual limits of the wallet
Defines the daily limits of the wallet
The wallet transaction types on which the limits will be applied on
The wallet transaction type id
Examples
Responses
The response succeeded
Body
The wallet identifier
PUT /wallets/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json
{
"wallet_limits": {
"annual_limit": 1000,
"daily_limit": 10,
"wallet_transaction_types": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
]
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/walletsGet a list of contact wallets. Normally a contact will have a single wallet per account, but multiple wallets (therefore multiple accounts) can be used to service different currencies
Path variables
The contact identifier for which a list of wallets should be returned
Request headers
Authorization Token
Responses
The request has succeeded
Body
The wallet identifier
The related account identifier
The wallet number
The balance of the retrieved wallet in wallet currency
The balance of the retrieved wallet in wallet alternative currency
The wallet’s currency
The wallet’s alternative currency
The conditional balance of the retrieved wallet in wallet currency
The conditional balance of the retrieved wallet in wallet alternative currency
The unconditional balance of the retrieved wallet in wallet currency
The inconditional balance of the retrieved wallet in wallet alternative currency
The amount on hold of the retrieved wallet in wallet currency
The amount on hold of the retrieved wallet in wallet alternative currency
GET /contact/CAD1E31269B76D7A65ACCE45B2E68DFD/wallets HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"account_id": "6A24D2B5E44F44B28451FE021FCAD52E",
"number": "W000001",
"balance": 1234.56,
"alternative_balance": 231.54,
"currency_code": "EUR",
"alternative_currency_code": "PTS",
"conditional_balance": 25.34,
"conditional_alternative_balance": 1.52,
"unconditional_balance": 4.75,
"unconditional_alternative_balance": 4.57,
"amount_on_hold": 5.98,
"alternative_amount_on_hold": 2.34
}
{id}
Find details of a single wallet and the allotment conditions that are applicable
Path variables
The wallet identifier that should be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The wallet identifier
The wallet number
The wallet life cycle state
The balance of the wallet in the default currency
The balance of the wallet in the alternative currency
The total conditional balance of the retrieved wallet in wallet currency
The total conditional balance of the retrieved wallet in wallet alternative currency
The total unconditional balance of the retrieved wallet in wallet currency
The total unconditional balance of the retrieved wallet in wallet alternative currency
The amount in wallet currency that is not yet available for consumption due to validity restrictions
The amount in alternative currency that is not yet available for consumption due to validity restrictions
The default wallet currency
The alternative wallet currency
The ID of the related account
Information related with the amount allotted by the wallet grouped by the conditions related with the each allotted amount
The unique identifier of the allotment’s group condition set
The amount that was allotted in wallet currency
The amount that was allotted in wallet alternative currency
The time conditions related with the wallet alloted amount
The start of the time period related with the allotedt amount
The end of the time period related with the allotedt amount
The day conditions related with the wallet alloted amount
The product conditions related with the wallet alloted amount
The product id
The product sku
The product alternative code
The product description
The product type conditions related with the wallet alloted amount
The product type id
The product type name
The product type code
The product family conditions related with the wallet alloted amount
The product family id
The product family name
The product family code
The product category conditions related with the wallet alloted amount
The product category id
The product category name
The product category code
The product brand conditions related with the wallet alloted amount
The product brand id
The product brand name
The product brand code
The business unit conditions related with the wallet alloted amount
The business unit id
The business unit name
The business unit code
Details about the parent business unit (returned only if the business unit has a parent business unit)
The parent business unit identifier
The parent business unit name
The parent business unit identifier
Details about the parent group business unit (returned only if the business unit or its parent business unit has a parent group)
The parent group business unit identifier
The parent group business unit name
The parent group business unit code
GET http://staging.crm.com/self-service/v1/wallets/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"number": "W0001",
"life_cycle_state": "CANCELLED",
"balance": 2.24,
"alternative_balance": 1.12,
"conditional_balance": 0.24,
"conditional_alternative_balance": 0.12,
"unconditional_balance": 2,
"unconditional_alternative_balance": 1,
"amount_on_hold": 1,
"alternative_ amount_on_hold": 1,
"currency_code": "EUR",
"alternative_currency_code": "PTS",
"account_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"allotments": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"amount": 2,
"alternative_amount": 1,
"times": [
{
"from": "10",
"to": "11"
}
],
"days": [
"MONDAY, FRIDAY"
],
"products": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"sku": "1000012",
"alternative_code": "FRES00001",
"description": "Freddo Espresso"
}
],
"product_types": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Iced Coffee",
"code": "IC001"
}
],
"product_families": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Coffee",
"code": "CO001"
}
],
"product_categories": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Origin",
"code": "O01"
}
],
"product_brands": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Variety Coffee",
"code": "VC001"
}
],
"business_units": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "New Brewery",
"code": "NB01"
}
]
}
}
{id}
/wallet_transactionsGet a list of contact wallet transactions. Each wallet transaction is created against an account
Path variables
The contact identifier for which a list of wallet transactions should be returned
Request parameters
The wallet transaction classification
The wallet transaction life cycle state
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 records
The wallet transaction identifier
The wallet transaction number
The wallet transaction classification
The life cycle state of the wallet transaction
The amount of the wallet transaction in system currency
The amount of the wallet transaction in alternative currency
An extra added amount in wallet currency
An extra added amount in wallet alternative currency
The date that the wallet transaction was made
The wallet transaction expiration date
The account id that the wallet transaction was created against
The wallet transaction currency
The wallet transaction alternative currency
Informationb about the source that created the wallet transaction
The process that created the wallet transaction
The name of the entity that caused the creation of the wallet transaction
The value of the entity that caused the creation of the wallet transaction
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/wallet_transactions HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"number": "W12345",
"classification": "CREDIT",
"life_cycle_state": "VOIDED",
"amount": 2.24,
"alternative_amount": 1.12,
"extra_added_amount": 125.34,
"extra_added_alternative_amount": 24.56,
"transaction_date": 1573545935,
"expiration_date": 1573545935,
"account_id": "6A24D2B5E44F44B28451FE021FCAD51E",
"currency_code": "GBP",
"alternative_currency_code": "PTS",
"transaction_source": {
"process_name": "CREATE_AWARD_REWARD_TRXN",
"entity_name": "REWARDAWARDTRANSACTIONS",
"entity_value": "10540F31CB60400EB7E9F0E2420086FD"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
Get a list of contact reward transactions. Each reward transaction is created against an account
Path variables
The wallet transaction identifier that should be returned
Request headers
Authorization Token
Responses
The request has succeeded
Body
Information about the retrieved wallet transaction
The wallet transaction identifier
The wallet transaction classification
The life cycle state of the wallet transaction
The amount of the wallet transaction in system currency
The amount of the wallet transaction in alternative currency
An extra added amount in wallet currency
An extra added amount in wallet alternative currency
The date that the transaction took place
The wallet transaction expiration date
The account identifier that the wallet transaction was created against
The wallet transaction currency
The wallet transaction alternative currency
Information about the products that are related to the wallet transaction
The product identifier
The product sku
The product alternative code
The product description
Informationb about the source that created the wallet transaction
The process that created the wallet transaction
The name of the entity that caused the creation of the wallet transaction
The value of the entity that caused the creation of the wallet transaction
Information about the customer events that are related to the wallet transaction
The customer event identifier
The customer event type
The customer event reference number
Information about the reward offers that are related to the wallet transaction
The reward offer identifier
The reward offer name
Information about the payment method that is related to the wallet transaction
The payment method that will be related with the account
The bank account number
The international bank account number
The card number with obfsucated numbers
The card’s first six digits
The card’s last four digits
The identifier of the payment method details
GET /wallet_transactions/CAD12345678912345678912345678912 HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"classification": "TRANSFER",
"life_cycle_state": "VOIDED",
"amount": 2.24,
"alternative_amount": 1.12,
"extra_added_amount": 124.5,
"extra_added_alternative_amount": 24.65,
"transaction_date": 1572530655,
"expiration_date": 1572530655,
"account_id": "6A24D2B5E44F44B28451FE021FCAD51E",
"currency_code": "GBP",
"alternative_currency_code": "PTS",
"products": [
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"sku": "wp-fee",
"alternative_code": "WP123",
"description": "Service Fee"
}
],
"transaction_source": {
"process_name": "CREATE_AWARD_REWARD_TRXN",
"entity_name": "REWARDAWARDTRANSACTIONS",
"entity_value": "10540F31CB60400EB7E9F0E2420086FD",
"customer_events": [
{
"id": "10540F31CB60400EB7E9F0E2420086FD",
"type": "PURCHASE",
"reference_number": "PCE1234"
}
],
"reward_offers": [
{
"id": "10540F31CB60400EB7E9F0E2420086FD",
"name": "1% Cashback"
}
],
"payment_method": {
"payment_method_type": "CARD",
"card_number": "42424242****4242",
"first6": "424242",
"last4": "4242"
}
}
}
]
}
{id}
/allotments/{allotment_id}
Retrieve details of a specific allotment group condition of a specific wallet
Path variables
The wallet identifier for which the allotment will be retrieved
The identifier of the wallet allotment to be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The amount that was allotted in wallet currency
The amount that was allotted in wallet alternative currency
The time conditions related with the wallet alloted amount
The start of the time period related with the alloted amount
The end of the time period related with the allotedt amount
The day conditions related with the wallet alloted amount
The product conditions related with the wallet alloted amount
The product ID
The product sku
The product alternative code
The product description
The product type conditions related with the wallet alloted amount
The product type ID
The product type name
The product type code
The product family conditions related with the wallet alloted amount
The product family id
The product family name
The product family code
The product category conditions related with the wallet alloted amount
The product category id
The product category name
The product category code
The product brand conditions related with the wallet alloted amount
The product brand id
The product brand name
The product brand code
The business unit conditions related with the wallet alloted amount
The business unit id
The business unit name
The business unit code
A breakdown providing the expiration information of the allotment’s amount
The amount to be expired
The alternative amount to be expired
The expiration date of the specified amount
GET http://staging.crm.com/self-service/v1/wallet/CAD1E31269B76D7A65ACCE45B2E68DFD/allotment/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"amount": 2,
"alternative_amount": 1,
"times": [
{
"from": "10",
"to": "11"
}
],
"days": [
"MONDAY, FRIDAY"
],
"products": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"sku": "1000012",
"alternative_code": "FRES00001",
"description": "Freddo Espresso"
}
],
"product_types": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Iced Coffee",
"code": "IC001"
}
],
"product_families": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Coffee",
"code": "CO001"
}
],
"product_categories": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Origin",
"code": "O01"
}
],
"product_brands": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Variety Coffee",
"code": "VC001"
}
],
"business_units": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "New Brewery",
"code": "NB01"
}
],
"expiration_breakdown": [
{
"amount": 1,
"alternative_amount": "2",
"expiration_date": "1585649285"
}
]
}
{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
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 customer event number
The customer event reference number
The customer event life cycle state
The total amount of the retrieved customer event
The net amount of the retrieved customer event
The tax amount of the retrieved customer event
The amount that was requested to be spend via the customer event
The alternative amount that was requested to be spend via the customer event
The amount that was awarded via the customer event
The alternative amount that was awarded via the customer event
The amount that was spent via the customer event
The alternative amount that was spent via the customer event
The date that the customer event was actually performed
Information about the business unit that performed the customer event
The business unit identifier
The business unit name
Information about the business parent of the unit that the purchase was performed. Available only if the performed by business unit (outlet) has a parent (merchant)
The business unit identifier
The business unit name
The account identifier that the customer event was created against
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 /contact/CAD1E31269B76D7A65ACCE45B2E68DFD/customer_events/purchase HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"number": "1254",
"reference_number": "0012345",
"life_cycle_state": "POSTED",
"total_amount": 125.98,
"net_amount": 100.9,
"tax_amount": 25.08,
"requested_spend_amount": 10.54,
"requested_spend_alternative_amount": 5.24,
"total_awarded_amount": 1.54,
"total_awarded_alternative_amount": 0.27,
"total_spend_amount": 1.59,
"total_spend_alternative_amount": 0.97,
"performed_on": 1572534147,
"performed_by_business_unit": {
"id": "658AB90A6A77437091D158FD8E697B11",
"name": "CRMdotCOM Nicosia"
},
"account_id": "658AB90A6A77437091D158FD8E697B11"
}
]
}
Rewards API
{id}
{id}
Retrieve all reward schemes from a specific organisation
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 name
The reward scheme description
Marketing information about the reward scheme
The scheme short description
The scheme long description
The terms and conditions for the retrieved reward scheme
Creatives images for marketing includes the primary image and scaled versions to create a srcset
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
The life cycle state of the retrieved reward scheme
GET /reward_schemes HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Loyalty Scheme",
"code": "LS",
"description": "Lorem Ipsum",
"marketing_information": {
"short_description": "Lorem Ipsum",
"long_description": "Lorem Ipsum",
"terms_and_conditions": "Lorem Ipsum",
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
},
"life_cycle_state": "NOT_EFFECTIVE"
}
]
}
Retrieve all effective reward offers that are applicable for a specific customer
Request parameters
Information about the reward offer categories that should be used as a filter (Prior CRM.COM R18.2.0, this attribute was a single value based instead of an array)
Information about the industries that should be used as a filter (Prior CRM.COM R18.2.0, this attribute was a single value based instead of an array)
Information about the industry sectors that should be used as a filter (Prior CRM.COM R18.2.0, this attribute was a single value based instead of an array)
Information about the merchant/outlet location that should be used as a filter (should behave as like and case insensitive) (case insensitive is available from CRM.COM R18.6.0, prior CRM.COM R18.2.0, this attribute was a single value based instead of an array)
Filter based on the organisation that owns such reward offers
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
The reward offer description
Information about the reward offer category
The category identifier
The category name
Infromation about the reward scheme of this offer
The reward scheme identifier
The reward scheme name
Markeing information related to the reward offer
The reward offer short description
The reward offer long description
The terms and conditions for the retrieved reward offer
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 unit that owns the reward offer
The business unit identifier
The business name name
Defines the order that will be used for displaying the reward offers
Defines whether the reward offer is featured or not
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",
"description": "Lorem Ipsum",
"category": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Seasonal"
},
"reward_scheme": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Loyalty Scheme"
},
"marketing_information": {
"short_description": "Lorem Ipsum",
"long_description": "Lorem Ipsum",
"terms_and_conditions": "Lorem Ipsum",
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
},
"owned_by_business_unit": {
"id": "CAD1E31269B76D7A65ACCE45B2E68987",
"name": "Pizza Yummy"
},
"display_order": 1
}
],
"paging": {
"page": 2,
"size": 20,
"total": 1124
}
}
{id}
Retrieve all effective reward offers that are applicable for a specific customer
Path variables
The reward offer (identifier) that will be retrieved
Request headers
Authorization Token
Responses
The request has succeeded
Body
The reward offer identifier
The reward offer name
The reward offer description
The reward offer short description
The reward offer long description
The terms and conditions for the retrieved reward offer
Information about the reward offer category
The category identifier
The category name
Infromation about the reward scheme of this offer
The reward scheme identifier
The reward scheme name
Information about the business unit that owns the reward offer
The business unit identiifer
The business unit name
The award type
The award amount/percentage value, when amount type is based on FIXED or PERCENTAGE on all products (for Universal Offer Percentage based, this attribute will be the default percentage)
Details about specific product award conditions
The product condition identifier (can be the identifier of a product, brand or family)
The product condition type
Increase Revenue, Product Based
The product condition name (can be the name of a product)
The product condition alternative code
The product condition description (can be the description of a product)
The award amount/percentage value (applicable only if award should be different for this product)
The purchased quantity that award will be based on
Details about specific business unit conditions (applicable for Universal Offer)
The business unit identifier
The business unit name
The award amount/percentage value (applicable only if award should be different for this business unit)
Details about specific industry conditions (applicable for Universal Offer)
The industry identifier
The industry name
The award amount/percentage value (applicable only if award should be different for this industry)
Details about award that will be provided based on percentage of awarded amount within X UOT
The time duration that will be considered during award
The unit of time that will be considered during award
Award Validity (from)
The validity type
Award will be available from a specific period
Award will be available from a specific DATE
Award will be available from THE DAY OF AWARDING
The date from which the award will be valid (applicable when type is set to specific date)
The period from which the award will be valid (applicable when type is set to period)
The unit of time from which the award will be valid (applicable when type is set to period)
Award Expiration
The expiration type
Award will never expire
Award will expire on specific date
Award will expire at the end of the month that was provided
Award will expire at the end of the year that was provided
Award will expired at the end of X years that was provided
Award will expired at the end of a specific period
The date that the award will expire (applicable when type is specific date)
The period up to which the award will be expired (applicable when type is set to period or end of X years)
The unit of time up to which the award will be expired (applicable when type is set to period)
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 http://sandbox.crm.com/self-service/v1/reward_offers/b12295b7-57ed-a51e-3390-73666e959124 HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "0aa0203f-c049-3300-a7cb-3cfb8b6c2789",
"name": "10% off on any purchase",
"description": "Lorem Ipsum",
"short_description": "Lorem Ipsum",
"long_description": "Lorem Ipsum",
"terms_and_conditions": "Lorem Ipsum",
"category": {
"id": "cb93ed4f-fc73-c51f-42c7-652a1a543dc6",
"name": "Seasonal"
},
"reward_scheme": {
"id": "88e2b65b-680b-746d-03b0-34b92155f11c",
"name": "Loyalty Scheme"
},
"owned_by_business_unit": {
"id": "e4412e30-a2a8-2ef8-2d4c-72828c55ff75",
"name": "Pizza Yummy"
},
"award": {
"type": "PERCENTAGE",
"amount": null,
"business_units": null,
"industries": null,
"products": [{
"id": "d7656d5d-4336-6a93-59ab-998d83ce5f52",
"id_type": "PRODUCT",
"name": "SKU00001",
"alternative_code": "AC1",
"description": "Coffee Latte",
"amount": 1.99,
"quantity": null
},
{
"id": "d7656d5d-4336-6a93-59ab-998d83ce5f52",
"id_type": "PRODUCT",
"name": "SKU00001",
"alternative_code": "AC2",
"description": "Coffee Latte",
"amount": 2.99,
"quantity": null
}]
},
"validity": {
"validity_type": "SPECIFIC_DATE",
"valid_date": 1622808033,
"period": null,
"period_unit": null
},
"expiration": {
"expiration_type": "SPECIFIC_DATE",
"expiry_date": "1622808309",
"period": 3,
"period_unit": "DAYS"
},
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"type": "PROFILEIMAGE",
"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"
}
]
}
]
}
Retrieve a list of merchants that participate in one of the customer’s reward schemes
Request parameters
The merchant name (should behave as like and case insensitive) (case insensitive is available from CRM.COM R18.6.0)
Industry filter for merchant (Available from CRM.COM R18.2.0)
Industry sector filter for merchant (Prior CRM.COM R18.2.0, this attribute was a single value based instead of an array)
Defines whether merchants should be grouped by their parent
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 merchants (business units)
The business unit identifier
The name of the business unit
The description of the retrieved business unit
Information about the merchant’s award based on the universal offer (Applicable from CRM.COM R18.2.0)
The reward offer identifier
The currency code that the award will be provided in
The amount that the universal offer will provide
The percentage that the universal offer will provide for that merchant
The business unit industry
The business unit industry sectors
The industry sector name
Information about the merchant’s addresses
The type of the address
Defines whether the address is the primary one
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
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 /merchants HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Alfa Bakery",
"description": "Lorem Ipsum",
"universal_offer": {
"id": "10540F31CB60400EB7E9F0E2420086FD",
"currency_code": "EUR",
"award_percentage": 14.52
},
"industry_name": "Restaurant",
"industry_sectors": [
{
"name": "Bar"
}
],
"address": [
{
"address_type": "CUSTOM4",
"is_primary": true,
"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"
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"type": "PROFILEIMAGE",
"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 merchant
Path variables
The merchant identifier
Notes
To display the actual image you need to construct a URL based on the creative media url and the authorization token (e.g. https://crm.com/asset.jpg&token=4AD9C84FA60F)
Request parameters
Defines if child business units should be returned or not
Request headers
Authorization Token
Responses
The request has succeeded
Body
Information about the retrieved merchants (business units)
The business unit identifier
The name of the business unit
The description of the retrieved business unit
The business unit industry
The business unit industry sectors
The industry sector name
Information about the specified addresses
The address identifier
The type of the address
Defines whether the address is the primary one
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
Information about the merchant’s outlets
The business unit identifier
The child business unit name
The description of the retrieved child business unit
Information about the specified addresses
The address identifier
The type of the address
Defines whether the address is the primary one
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 contact’s phones
The phone identifier
The type of the phone
Defines whether the phone is the primary one
The country that the phone is registered
The phone number
Information about the business parent of this business unit. Available only if the business unit has a parent business unit
The business unit identifier
The business unit 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 http://staging.crm.com/self-service/v1/merchants/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"
}
],
"addresses": [
{
"id": "",
"address_type": "POBOX",
"is_primary": true,
"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"
}
],
"child_business_units": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68D78",
"name": "Alfa Bakery Egkomis",
"description": "Lorem Ipsum",
"addresses": [
{
"id": "",
"address_type": "CUSTOM3",
"is_primary": true,
"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"
}
],
"phones": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"phone_type": "CUSTOM4",
"is_primary": true,
"country_code": "CYP",
"number": "238065437"
}
]
}
],
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"type": "MARKETING",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/offer.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
}
]
}
]
}
}
{id}
/communications{id}
{id}
/mark_viewed{id}
/mark_archived{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 ID of the retrieved communication
The communication number
The communication subject
The communication subtitle (applicable if communication is IN APP)
The communication content
Defines whether the communication was viewed or not
Defines the date that the communication was viewed
Defines the date that the communication was created
The communication category
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/communications HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"number": "124",
"subject": "Lorem Ipsum",
"content": "Lorem Ipsum",
"viewed": "true",
"viewed_on": 1573763120,
"created_on": 1573763120,
"category": {
"id": "",
"code": "",
"name": ""
}
}
],
"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 communication identifier
The communication number
The communication subject
The communication subtitle (applicable if communication is IN APP)
The communication content
Defines whether the communication was viewed or not
The date that the communciation was viewed
The communication category
The communication category identifer
The communication category name
GET /communications/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"number": "125",
"subject": "Lorem Ipsum",
"content": "Lorem Ipsum",
"viewed": "true",
"viewed_on": 1572530655,
"category": {
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"name": "Marketing"
}
}
{id}
/mark_viewedMark an existing communication as viewed
Path variables
The communication identifier that should be makred as viewed
Request headers
Authorization Token
Responses
The request has succeeded
Body
The communication identifier
PUT /communications/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}
/mark_archivedMark an existing communication as archived. Available from R18.2.0 onwards
Path variables
The communication identifier that should be makred as archived
Request headers
Authorization Token
Responses
The request has succeeded
Body
The communication identifier
PUT /communications/CAD1E31269B76D7A65ACCE45B2E68DFD/mark_archived HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Lists a number of APIs that can be used for retrieving configuration settings, required by the mobile/web client
Returns a list of categories based on the provided type
Request parameters
Defines which entity categories to retrieve
Request headers
Authorization Token
Responses
The request has succeeded
Body
Information about the retrieved categories
The category identifier
The category name
The category description
GET /categories?entity=REWARDOFFER HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "E4AC253114B84DF2B347996DC277DDDF",
"name": "Seasonal",
"description": "Lorem Ipsum"
}
]
}