Self Service

Introduction

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.

Authentication

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.

Example 1
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"
        }]
    }
}’
Error Codes

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

200 OK
Applied to all operations

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Responsive Images

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.

Example 1
<img srcset="small.jpg 256w,
            medium.jpg 512w,
			large.jpg 1024w"
		sizes="(max-width: 30em) 25em, 100vw"
		src="medium.jpg"
		alt="responsive image" />
Operations
Authentication

Ability to authenticate customers via a Mobile App or a Portal

POST /contacts/authenticate
POST /contacts/otp
POST /contacts/refresh
POST /contacts/validate-otp
POST /contacts/forgot_password
POST /contacts/change_password
POST /contacts/{id}/change_password
POST /contacts/{id}/sign_out
POST /contacts/verify_email
Authenticate Contact
POST /contacts/authenticate

Authenticate a contact and provide a token for subsequent API access

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
provider
string required

The contact’s identity provider

Enumeration:
EMAIL
FACEBOOK
GOOGLE
PHONE

PENDING

MW4

CRM.COM auth server

username
string required nullable

The contact’s username (required for EMAIL)

Example:
johndoe@crm.com
password
string required nullable

The contact’s password (required for EMAIL)

Example:
password1234
token
string required nullable

The token taken from the oAUTH service provider (required for Facebook and Google providers)

Example:
234er43ergt34eett34
phone_number
string required nullable

The contact’s phone number (required for PHONE)

Example:
21000000
country_code
string required nullable

The contact’s phone number country code (required for PHONE)

Example:
CYP
Examples

Responses

200 OK

The request has succeeded

Body
Object
access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
exp
string epoch

The token expiration date

Example:
1572530655
contact
Object

Details about the authorised contact

title
string

The contact’s title

Example:
Mr
first_name
string

The contact’s first name

Example:
John
last_name
string

The contact’s last name

Example:
Doe
avatar
string

The contact’s avatar

Example:
avatar
is_verified
boolean

Defines whether the used identity is verified

Example:
false
organisations
Array

Details about the organisations that the contact has joined

Object
external_id
string GUID

The organisation’s external identifier

Example:
QWERTY12345671234567324ETFTGBY78
org_type
string

The organisation type

Enumeration:
SERVICE_OWNER
ORGANISATION
org_relationship
string

The organisation relationship

Enumeration:
BUSINESS
SUBSIDIARY
MERCHANT
name
string

The organisation name

Example:
CRMdotCOM
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
Example 2
Example 3
POST /contacts/authenticate HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "provider": "EMAIL",
    "username": "johndoe@crm.com",
    "password": "password1234"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "SERVICE_OWNER",
            "org_relationship": "MERCHANT",
            "name": "CRMdotCOM"
        }
    ]
}
POST /contacts/authenticate HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "provider": "GOOGLE",
    "token": "GOOGLEID1234567"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "ORGANISATION",
            "org_relationship": "MERCHANT",
            "name": "CRMdotCOM"
        }
    ]
}
POST https://sandbox.crm.com/self-service/v1/contacts/authenticate HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "provider": "MW4",
    "token": "234er43ergt34eett34"
}
Request One Time Password
POST /contacts/otp

Request a one time password for a specific contact. The request will identify the contact details and send an outbound validation number that can be used to verify the contact

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
send_method
string required

How to send the validation code

Enumeration:
EMAIL
SMS
credentials
Array required

Information on how the contact will be identified

Object
name
string

The predetermined information that will be used to identify the contact

Enumeration:
BIRTHDATE

Lookup on contact details

PASSPORT

Lookup on contact details

ID_NUMBER

Lookup on contact details

CARD

Lookup on contact customer identification medium (if enabled) and then on contact details

PHONE

Lookup on contact identity, then on customer identification medium (if enabled) and last on contact details

EMAIL

Lookup on contact identity, then on customer identification medium (if enabled) and last on contact details

value
string

The value of the credential to check

Example:
1234567

Responses

200 OK

The request has succeeded

Body
Object
obfuscated_value
string

The obfuscated send method value

Example:
+35799***834
auth_otp
string

The one time password auth id

Example:
731e4023-4c04-4278-8eb5-240651317e46
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/otp HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "send_method": "SMS",
    "credentials": [
        {
            "name": "ID_NUMBER",
            "value": "1234567"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "obfuscated_value": "+35799***834",
    "auth_otp": "731e4023-4c04-4278-8eb5-240651317e46"
}
Refresh Token
POST /contacts/refresh

Authenticate a contact and provide a token for subsequent API access

Request headers

Authorization
string required

Refresh Token supplied when authenticated

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg

Responses

200 OK

The request has succeeded

Body
Object
access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
exp
string epoch

The token expiration date

Example:
1572530655
contact
Object

Details about the authorised contact

title
string

The contact’s title

Example:
Mr
first_name
string

The contact’s first name

Example:
John
last_name
string

The contact’s last name

Example:
Doe
avatar
string

The contact’s avatar

Example:
avatar
is_verified
boolean

Defines whether the used identity is verified

Example:
false
organisations
Array

Details about the organisations that the contact has joined

Object
external_id
string GUID

The organisation’s external identifier

Example:
QWERTY12345671234567324ETFTGBY78
org_type
string

The organisation type

Enumeration:
SERVICE_OWNER
ORGANISATION
org_relationship
string

The organisation relationship

Enumeration:
BUSINESS
SUBSIDIARY
MERCHANT
name
string

The organisation name

Example:
CRMdotCOM
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST https://sandbox.crm.com/self-service/v1/contacts/refresh HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "ORGANISATION",
            "org_relationship": "SUBSIDIARY",
            "name": "CRMdotCOM"
        }
    ]
}
Validate One Time Password
POST /contacts/validate-otp

Verifies an one time password that was requested

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
credentials
Array required

Information on how the contact will be identified

Object
name
string required

Contact identification credentials

Enumeration:
AUTH_OTP

One Time Password Auth Id

EMAIL

The email address that was used to request the otp

PHONE

The phone number that was used to request the otp

ID_NUMBER

The contact’s id number that was used to request the otp

PASSPORT

The contact’s passport that was used to request the otp

BIRTHDATE

The contact’s birthdate that was used to request the otp

CARD

The contact’s card that was used to request the otp

value
string required

The value of the credential to verify the contact’s authenticity

Example:
12345
code
string required

The OTP that should be used for verification purposes

Example:
123456789
Examples

Responses

200 OK

The request has succeeded

Body
Object
access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
exp
string epoch

The token expiration date

Example:
1572530655
contact
Object

Details about the authorised contact

title
string

The contact’s title

Example:
Mr
first_name
string

The contact’s first name

Example:
John
last_name
string

The contact’s last name

Example:
Doe
avatar
string

The contact’s avatar

Example:
avatar
is_verified
boolean

Defines whether the used identity is verified

Example:
false
organisations
Array

Details about the organisations that the contact has joined

Object
external_id
string GUID

The organisation’s external identifier

Example:
QWERTY12345671234567324ETFTGBY78
org_type
string

The organisation type

Enumeration:
SERVICE_OWNER
ORGANISATION
org_relationship
string

The organisation relationship

Enumeration:
BUSINESS
SUBSIDIARY
MERCHANT
name
string

The organisation name

Example:
CRMdotCOM
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/validate-otp HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "credentials": [
        {
            "name": "AUTH_OTP",
            "value": "12345"
        }
    ],
    "code": "123456789"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "SERVICE_OWNER",
            "org_relationship": "SUBSIDIARY",
            "name": "CRMdotCOM"
        }
    ]
}
Forgot Password
POST /contacts/forgot_password

Requests a password reset for an existing contact

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
username
string required

The username that will be used to request a new password

Example:
johndoe@crm.com
Examples

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/forgot_password HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "username": "johndoe@crm.com"
}

HTTP/1.1 200 OK 
Change Forgotten Password
POST /contacts/change_password

Changes the password for a contact’s identity (EMAIL based)

Request body

Object
token
string required

The token that will verify that the client is trusted (required only if the identity is EMAIL based)

Example:
ABCTKN123456798VGP2020
password
string required

The new password

Example:
wsxcde421qadfg
Examples

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/change_password HTTP/1.1 

Content-Type: application/json

{
    "token": "ABCTKN123456798VGP2020",
    "password": "wsxcde421qadfg"
}

HTTP/1.1 200 OK 
Change Password
POST /contacts/{id}/change_password

Changes the password for a contact’s identity (EMAIL based)

Path variables

id
string GUID required

The contact identifier whose password will be changed

Example:
0980af1d-3c24-6379-9eb9-a40e3a3f5208

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
password
string required

The new password

Example:
wsxcde421qadfg
Examples

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/0980af1d-3c24-6379-9eb9-a40e3a3f5208/change_password HTTP/1.1 

Content-Type: application/json
Authorization: 4AD9C84FA60F9FE407140E20F707726A

{
    "password": "wsxcde421qadfg"
}

HTTP/1.1 200 OK 
Sign Out Contact
POST /contacts/{id}/sign_out

Terminates the contact’ session and will no longer be able to access the client

Path variables

id
string GUID required

The contact identifier that will be signed out

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/sign_out HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Verify Contact Email
POST /contacts/verify_email

Verify a contact’s email address username

Request parameters

token
string required

The token that will used for verifying the contact’s email address

Example:
ABCTKN123456798VGP2020

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/verify_email?token=ABCTKN123456798VGP2020 HTTP/1.1 

HTTP/1.1 200 OK 
Communications
GET /contacts/{id}/communications
GET /communications/{id}
PUT /communications/{id}/actions
List Communications
GET /contacts/{id}/communications

Get a list of a contact’s communications

Path variables

id
string GUID required

The contact identifier for which the related communications will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20
channel
string optional

The type of the communications to be retrieved

Enumeration:
EMAIL
SMS
DEVICE
INAPP
archived
boolean optional

If set to TRUE, only archived communications will be retrieved

Example:
true
viewed
boolean optional

If set to TRUE, only viewed communications will be retrieved

Example:
true

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array

Information about the retrieved communication records

Object
id
string GUID

The communication identifier

Example:
6A24D2B5E44F44B28451FE021FCAD51E
life_cycle_state
string

The state of the communication

Enumeration:
PENDING
COMPLETED
REJECTED
Example:
PENDING
contact_id
string GUID

The contact identifier that communication was sent to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
Example:
EMAIL
is_viewed
boolean

Defines whether the communication has been viewed

Example:
false
viewed_on
integer epoch

The datetime that the recipient viewed the communication

Example:
1583846865
is_archived
boolean

Defines whether the communication has been archived

Example:
true
clicked_on
integer epoch

The date links in the communication where first clicked by the recipient

language
string

The language tha the communication was sent in

Example:
ENG
sender
string

The default sender

Example:
dev@crm.com
recipient
string

The email or number of the recipient

Example:
jon@crm.com
content
string

The actual content of the communication sent

subject
string

The actual subject of the communication sent (if applicable)

name
string

The name of the communication plan in case the communication was created from a plan

Example:
Happy Birthday
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/communications HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "6A24D2B5E44F44B28451FE021FCAD51E",
            "life_cycle_state": "PENDING",
            "contact_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "channel": "EMAIL",
            "is_viewed": true,
            "viewed_on": 1583846865,
            "is_archived": true,
            "clicked_on": 1,
            "language": "ENG",
            "sender": "dev@crm.com",
            "recipient": "jon@crm.com",
            "content": "",
            "subject": "",
            "name": "Happy Birthday"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Get Communications
GET /communications/{id}

Get a specific contact’s communication

Path variables

id
string GUID required

The communication identifier that should be returned

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 200

The request has succeeded

Body
application/json
Object
life_cycle_state
string

The state of the communication

Enumeration:
PENDING
COMPLETED
REJECTED
Example:
PENDING
contact
Object
id
string GUID

The unique identifier of the contact

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The full name of the contact

Example:
John Johnson
code
string

The unique code of the contact

Example:
C123
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
Example:
EMAIL
is_viewed
boolean

Defines whether the communication has been viewed

Example:
false
viewed_on
integer epoch

The datetime that the recipient viewed the communication

Example:
1583846865
is_archived
boolean

Defines whether the communication has been archived

Example:
true
clicked_on
integer epoch

The date links in the communication where first clicked by the recipient

language
string

The language tha the communication was sent in

Example:
ENG
sender
string

The default sender

Example:
dev@crm.com
recipient
string

The communication’s recipient information

Example:
jon@crm.com
subject
string

The actual subject of the communication sent (if applicable)

Example:
Award Provided
content
string

The actual content of the communication sent

Example:
You have been awarded!
name
string

The name of the communication plan in case that the communication was created based on a plan

Example:
Happy Birthday
created_on
integer epoch

The date and time that the communication was created

Example:
1583846865
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/communications/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "life_cycle_state": "PENDING",
    "contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Johnson",
        "code": "C123"
    },
    "channel": "EMAIL",
    "is_viewed": true,
    "viewed_on": 1583846865,
    "is_archived": true,
    "clicked_on": 1,
    "language": "ENG",
    "sender": "dev@crm.com",
    "recipient": "jon@crm.com",
    "subject": "Award Provided",
    "content": "You have been awarded!",
    "name": "Happy Birthday",
    "created_on": 1583846865
}
Communications Actions
PUT /communications/{id}/actions

Mark an existing communication as viewed and/or archived

Path variables

id
string GUID required

The communication identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
viewed
boolean

Sets the communication as viewed

Example:
true
archived
boolean

Sets the communication as archived

Example:
true

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
PUT https://sandbox.crm.com/self-service/v1/communications/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "viewed": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Contact

Contact Management

POST /contacts/register
PUT /contacts/{id}
PUT /contacts/{id}/consents
GET /contacts/{id}
GET /contacts/{id}/demographics
Register Contact
POST /contacts/register

Create a new contact (of type person)

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
first_name
string required nullable

The contact first name (required for EMAIL and PHONE providers)

Example:
John
last_name
string required nullable

The contact last name (required for EMAIL and PHONE providers)

Example:
Doe
identity
Object required

Details about the customer’s identity

provider
string required

The identity provider

Enumeration:
EMAIL
PHONE
GOOGLE
FACEBOOK
username
string required nullable

The contact’s username (required for EMAIL)

Example:
johndoe@crm.com
password
string required nullable

The contact’s password (required for EMAIL)

Example:
12345
validation_required
boolean required nullable

Defines whether the username (email) should be verified (required for EMAIL)

Example:
true
phone_number
string required nullable

The contact’s phone number (required for PHONE)

Example:
2265577
country_code
string required nullable

The contact’s phone number country code (required for PHONE)

Example:
CYP
token
string required nullable

The token taken from the oAUTH service provider (required for Facebook and Google)

Example:
YOJDAKEb9l1U0sUzrskM6X4emzrSeXqb
service_acceptance
boolean nullable

Defines whether the contact has accepted the client service

Default:
true
Example:
true
email_opt_out
boolean nullable

The contact setting for receiving emails

Default:
false
Example:
true
sms_opt_out
boolean nullable

The contact setting for receiving sms

Default:
false
Example:
true
consent_state
string

The contact setting for consent

Enumeration:
PENDING
ACCEPTED
REJECTED
WITHDRAWN
referral_code
string nullable
Examples

Responses

200 OK

The request has succeeded

Body
Object
access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
exp
string epoch

The token expiration date

Example:
1572530655
contact
Object

Details about the authorised contact

title
string

The contact’s title

Example:
Mr
first_name
string

The contact’s first name

Example:
John
last_name
string

The contact’s last name

Example:
Doe
avatar
string

The contact’s avatar

Example:
avatar
is_verified
string

Defines whether the used identity is verified

Example:
false
organisations
Array

Details about the organisations that the contact has joined

Object
external_id
string GUID

The organisation’s external identifier

Example:
QWERTY12345671234567324ETFTGBY78
org_type
string

The organisation type

Example:
ORGANISATION
org_relationship
string

The organisation relationship

Example:
MERCHANT
name
string

The organisation name

Example:
CRMdotCOM
obfuscated_value
string

The obfuscated send method value (applicable only when provider is PHONE and an OTP is generated)

Example:
+35799***834
auth_otp
string

The one time password auth id (applicable only when provider is PHONE and an OTP is generated)

Example:
731e4023-4c04-4278-8eb5-240651317e46
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
Example 2
POST /contacts/register HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "first_name": "John",
    "last_name": "Doe",
    "identity": {
        "provider": "EMAIL",
        "username": "johndoe@crm.com",
        "password": "12345",
        "validation_required": false
    },
    "service_acceptance": "true",
    "email_opt_out": "true",
    "sms_opt_out": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    }
}
POST /contacts/register HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "first_name": "John",
    "last_name": "Doe",
    "identity": {
        "provider": "PHONE",
        "phone_number": "22265577",
        "country_code": "CYP"
    },
    "service_acceptance": "true",
    "email_opt_out": "true",
    "sms_opt_out": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "obfuscated_value": "+35799***834",
    "auth_otp": "731e4023-4c04-4278-8eb5-240651317e46"
}
Update Contact
PUT /contacts/{id}

Updates an existing contact

Path variables

id
string GUID required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
company_name
string nullable

Company Name if the Contact represents a company, required attribute if the type is a Company.

Example:
Alpha Bravo
title
string nullable

The title of the contact. Applicable only if the type is PERSON

Example:
Sir
first_name
string nullable

The first name of the contact. Applicable and mandatory only if the type is PERSON

Example:
John
middle_name
string nullable

The middle name of the contact. Applicable and mandatory only if the type is PERSON

Example:
Alias
last_name
string nullable

The last name of the contact. Applicable and mandatory only if the type is PERSON

Example:
Doe
preferred_language_code
string nullable

The contact preferred language

Example:
ENG
category_id
string GUID

The contact’s category ID

Example:
4AD9C84FA60F9FE407140E20F707726A
statutory_number
string nullable

The contact statutory number

Example:
EF-12345
demographics
Object nullable

Information about the person demographics

gender
string nullable

The person gender

Enumeration:
MALE
FEMALE
passport
Object nullable

Information about the person passport

passport_number
string

The passport number

Example:
123456
issue_country_code
string

The country that issued the passport

Example:
CYP
expiration_date
integer epoch

The passport expiration date

Example:
129876567
id_details
Object nullable

Information about the person id

id_number
string

The id number

Example:
K123456
issue_country_code
string

The country that issued the id

Example:
CYP
expiration_date
integer epoch

The id expiration date

Example:
129876567
name_day
Object nullable

Information about the person nameday

month
integer required

The nameday month

Example:
10
day
integer required

The nameday day

Example:
4
date_of_birth
Object nullable

Information about the person birthdate

year
integer required

The birth year

Example:
2018
month
integer required

The birth month

Example:
10
day
string required

The birth day

Example:
16
company_profle
Object nullable

A company’s profile. Applicable only if contact_type is COMPANY

profile_year
integer epoch

The company’s profile year

Example:
129876567
annual_turnover
number

The annual turnover

Example:
1568.14
established_on
integer epoch

The date that the company was established on

Example:
129876567
number_of_employees
integer

The company’s number of employees

Example:
1
registration_number
string

The company registration number

Example:
123456
registration_country
string

The country that the company is registered to

Example:
CYP
tax_reference_number
string

The company tax reference number

Example:
123456
vat_registration_number
string

The company vat registration number

Example:
123456
industry_id
string GUID

The company’s Industry ID

Example:
4AD9C84FA60F9FE407140E20F707726A
industry_sectors
Array

The company’s Industry Sectors.

string GUID
Example:
4AD9C84FA60F9FE407140E20F707726A
email_address
string

The contact’s email address

Example:
bill@gmail.com
sms_opt_out
boolean

The contact setting for receiving sms

Example:
false
email_opt_out
boolean

The contact setting for receiving email

Example:
false
is_tax_exempt
boolean

Defiens whether the contact is tax exempt or not

Example:
false

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
658AB90A6A77437091D158FD8E697B11
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1

Update contact

PUT https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "company_name": "Alpha Bravo",
    "title": "Sir",
    "first_name": "John",
    "middle_name": "Alias",
    "last_name": "Doe",
    "preferred_language_code": "ENG",
    "category_id": "4AD9C84FA60F9FE407140E20F707726A",
    "statutory_number": "EF-12345",
    "demographics": {
        "gender": "MALE",
        "passport": {
            "passport_number": "123456",
            "issue_country_code": "CYP",
            "expiration_date": 129876567
        },
        "id_details": {
            "id_number": "K123456",
            "issue_country_code": "CYP",
            "expiration_date": 129876567
        },
        "name_day": {
            "month": 10,
            "day": 4
        },
        "date_of_birth": {
            "year": 2018,
            "month": 10,
            "day": "16"
        }
    },
    "company_profle": {
        "profile_year": 129876567,
        "annual_turnover": 1568.14,
        "established_on": 129876567,
        "number_of_employees": 1,
        "registration_number": "123456",
        "registration_country": "CYP",
        "tax_reference_number": "123456",
        "vat_registration_number": "123456",
        "industry_id": "4AD9C84FA60F9FE407140E20F707726A",
        "industry_sectors": [
            "4AD9C84FA60F9FE407140E20F707726A"
        ]
    },
    "email_address": "bill@gmail.com",
    "sms_opt_out": "false",
    "email_opt_out": "false",
    "is_tax_exempt": "false",
    "consent_state": "ACCEPTED"
}
PUT /contacts/{id}/consents

Updates the Consent state of the Contact

Path variables

id
string GUID required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
consent_state
string

The consent state to be updated

Enumeration:
PENDING
ACCEPTED
REJECTED
WITHDRAWN

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
658AB90A6A77437091D158FD8E697B11
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1

Update contact

PUT https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/consents HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "consent_state": "ACCEPTED"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "658AB90A6A77437091D158FD8E697B11"
}
Get Contact
GET /contacts/{id}

Retrieve basic details for a specific contact

Path variables

id
string GUID required

The contact identifier that should be returned

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
code
string

The contact code

Example:
ABC-123
type
string

Tje contact type

Enumeration:
PERSON
COMPANY
title
string

The contact title

Example:
Sir
first_name
string

The contact first name

Example:
John
middle_name
string

The contact middle name

Example:
Alias
last_name
string

The contact last name

Example:
Doe
preferred_language_code
string

The contact preferred language

Example:
ENG
avatar_url
string

The contact URL of Avatar

email
string

The contact email address

Example:
jon@crm.com
referral_code
string

The contact referral code

Example:
REF123
loyalty_identifier
Array

The contact loyalty identifiers

Object
identifier
string

The contact loyalty identifier

Example:
123423435434534534543
sms_opt_out
boolean

The contact setting for receiving sms

Example:
false
email_opt_out
boolean

The contact setting for receiving email

Example:
true
consent_state
string

The contact consent

Enumeration:
PENDING
ACCEPTED
REJECTED
WITHDRAWN
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "code": "ABC-123",
    "type": "COMPANY",
    "title": "Sir",
    "first_name": "John",
    "middle_name": "Alias",
    "last_name": "Doe",
    "preferred_language_code": "ENG",
    "avatar_url": ""
}
Get Contact Demographics
GET /contacts/{id}/demographics

Retrieves the demographics of a signle contact

Path variables

id
string required

The unique ID for which the demographics will be returned

Responses

200 OK
Body
Object
gender
string
Example:
FEMALE
passport
Object
number
string
Example:
K123456
issue_country_code
string
Example:
CYP
expiration_date
integer
Example:
129876567
id_details
Object
number
string
Example:
123456
issue_country_code
string
Example:
CYP
expiration_date
integer
Example:
129876567
name_day
Object
month
integer
Example:
10
day
integer
Example:
4
date_of_birth
Object
year
integer
Example:
1990
month
integer
Example:
10
day
integer
Example:
16
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /contacts/{id}/demographics HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "gender": "FEMALE",
    "passport": {
        "number": "K123456",
        "issue_country_code": "CYP",
        "expiration_date": 129876567
    },
    "id_details": {
        "number": "123456",
        "issue_country_code": "CYP",
        "expiration_date": 129876567
    },
    "name_day": {
        "month": 10,
        "day": 4
    },
    "date_of_birth": {
        "year": 1990,
        "month": 10,
        "day": 16
    }
}
Addresses
POST /contacts/{id}/addresses
PUT /contacts/{id}/addresses/{address_id}
DELETE /contacts/{id}/addresses/{address_id}
GET /contacts/{id}/addresses
Add Contact Address
POST /contacts/{id}/addresses

Add a new address to an existing contact. A contact can have multiple addresses

Path variables

id
string GUID required

The contact identifier for which an address will be added

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
address_type
string required

The address type

Enumeration:
HOME
BUSINESS
address_line_1
string required

The address line 1

Example:
Elia Papakyriakou
address_line_2
string nullable

The address line 2

Example:
Tower Star
state_province_county
string nullable

The address county

Example:
Egkomi
town_city
string nullable

The address city

Example:
Nicosia
postal_code
string nullable

The address postal code

Example:
2000
country_code
string required

The address country identifier

Example:
CY
is_primary
boolean nullable

Defines whether the address is the primary one

Example:
true
lat
number nullable

The address geolocation latitude

Example:
12.212
lon
number nullable

The address geolocation longtitude

Example:
12.234
googlePlaceId
string nullable

The Google textual identifier that uniquely identifies an address

Example:
234242423424
care_of
string nullable

The address care of

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The address record identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "address_type": "BUSINESS",
    "address_line_1": "Elia Papakyriakou",
    "address_line_2": "Tower Star",
    "state_province_county": "Egkomi",
    "town_city": "Nicosia",
    "postal_code": "2000",
    "country_code": "CY",
    "is_primary": true
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Update Contact Address
PUT /contacts/{id}/addresses/{address_id}

Update an existing address of a contact

Path variables

id
string GUID required

The contact identifier for which an address should be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
address_id
string GUID required

The address identifier that should be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
address_line_1
string nullable

The address line 1

Example:
Elia Papakyriakou
address_line_2
string nullable

The address line 2

Example:
Tower Star
state_province_county
string nullable

The address county

Example:
Egkomi
town_city
string nullable

The address city

Example:
Nicosia
postal_code
string nullable

The address postal code

Example:
2000
country_code
string nullable

The address country identifier

Example:
CY
care_of
string nullable

The address care of

is_primary
boolean nullable

Defines whether the address is the primary one

Example:
true
lat
number nullable

The latitude of the address

Example:
12.456
lon
number nullable

The longitude of the addrsss

Example:
11.231
googlePlaceId
string nullable

The Google textual identifier that uniquely identifies an address

Example:
12312424324

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The address record identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
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"
}
Remove Contact Address
DELETE /contacts/{id}/addresses/{address_id}

Remove an existing address from a specific contact

Path variables

id
string GUID required

The contact (id) from which the address will be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
address_id
string GUID required

The address identifier that should be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1

Remove an existing contact address

DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
List Contact Addresses
GET /contacts/{id}/addresses

Retrieve the addresses of a specific contact

Path variables

id
string GUID required

The contact identifier for which his/her addresses will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The address identifier

Example:
4AD9C84FA60F9FE407140E20F707726A
address_type
string

The address’ type

Enumeration:
HOME
BUSINESS
address_line_1
string

The address line 1

Example:
Elia Papakyriakou 1
address_line_2
string

The address line 2

Example:
Tower Star
state_province_county
string

The address county

Example:
Egkomi
town_city
string

The address city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2000
country_code
string

The address country identifier

Example:
CY
is_primary
boolean

Defines whether the address is the primary one

Example:
true
lat
number

The address geolocation latitude

Example:
12.234
lon
number

The address geolocation longtitude

Example:
12.234
googlePlaceId
string

The unique Google identifier for the address

Example:
32342432342wer23
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "type": "HOME",
            "address_line_1": "Elia Papakyriakou 1",
            "address_line_2": "Tower Star",
            "state_province_county": "Egkomi",
            "town_city": "Nicosia",
            "postal_code": "2000",
            "country_code": "CY",
            "is_primary": "true"
        }
    ]
}
Devices
POST /contacts/{id}/devices
GET /contacts/{id}/devices
Add Contact Devices
POST /contacts/{id}/devices

Add devices to a contact

Path variables

id
string GUID required

The contact (id) for which a device will be added

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
serial_number
string

The device’s serial number or device ID

Example:
00000000-000000000000000
registration_type
string

The device’s registration type

Enumeration:
IOS
ANDROID
registration_token
string

The device’s registration token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/devices HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "serial_number": "00000000-000000000000000",
    "registration_type": "ANDROID",
    "registration_token": "4AD9C84FA60F9FE407140E20F707726A"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
List Contact Devices
GET /contacts/{id}/devices

Get a list of contact devices.

Path variables

id
string GUID required

The contact identifier for which a list of devices will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
device_id
string GUID

The device identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
serial_number
string

The device’s serial number which can also be the device id

Example:
00000000-000000000000000
registration_token
string

The device’s registration token

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
registration_type
string

The device’s registration type based on the device’s product and the communication settings, which can be either Android or IOS

Enumeration:
IOS
ANDROID
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/devices HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "device_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "serial_number": "00000000-000000000000000",
            "registration_token": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "registration_type": "IOS"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Files
POST /contacts/{id}/files
GET /contacts/{id}/files
Add Contact Files
POST /contacts/{id}/files

Add a new file to a Contact

Path variables

id
string GUID required

The contact identifier for which a file will be added

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
id
string GUID

The unique identifier of the file to be added

Example:
4AD9C84FA60F9FE407140E20F707726A
description
string

A description of the file added

Example:
This is the proof of address
Examples

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/files HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "id": "4AD9C84FA60F9FE407140E20F707726A",
    "description": "This is the proof of address"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
List Contact Files
GET /contacts/{id}/files

Retrieve an existing Contact’s files

Path variables

id
string GUID required

The contact identifier for which the files will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The id of the file

Example:
4AD9C84FA60F9FE407140E20F707726A
description
string

The description of the file

Example:
This is the proof of address
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/files HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "description": "This is the proof of address"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Payment Methods
POST /contacts/{id}/payment_methods
PUT /contacts/{id}/payment_methods/{payment_method_id}
DELETE /contacts/{id}/payment_methods/{payment_method_id}
GET /contacts/{id}/payment_methods
POST /contacts/{id}/intents
POST /contacts/{id}/fingerprints
Add Payment Methods
POST /contacts/{id}/payment_methods

Add a new payment method for a contact supports BANK, CREDIT / DEBIT cards, or Payment Gateways such as Paypal.

Path variables

id
string GUID required

The contact identifier for which a payment method will be added

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
id
string

Unique identifier for the payment method, if not specified it will be auto generated

Example:
34234234-34343
payment_method_type
string required

The payment method that will be related with the account

Enumeration:
CARD
DIRECT_DEBIT
PAYPAL
WALLET
ACCOUNT
is_primary
boolean

Marks the payment method as the contact’s primary one

Example:
true
is_backup
boolean

Marks the payment method as the backup

Example:
false
notes
string nullable

Notes related to te payment method

Example:
Lorem Ipsum
bank_details
Object required nullable

The bank details.Required and applicable if the payment method is set to BANK

account_holder_name
string nullable

The account holder name of the bank

Example:
John Doe
account_number
string required nullable

The bank account number. Either the bank account number or IBAN must be specified

Example:
001002001
sort_code
string nullable

The bank sort code

Example:
102491
iban
string required nullable

The IBAN code. Either the bank account number or IBAN must be specified

Example:
SE3550000000054910000003
bank
string nullable

The identifier of the bank

Example:
Barclays
branch
string nullable

The identifier of the bank branch

Example:
Ascot
swift
string

The bank account swift number

Example:
12345678
card
Object required nullable

The card’s main information. Required and applicable if the payment method type is CARD

name
string nullable

The card name

Example:
Default Card
first6
string nullable

The first 6 digits of the card. Either the card number or the first 6 and last 4 digits must be specified

Example:
42424242
last4
string required nullable

The last 4 digits of the card. Either the card number or the first 6 and last 4 digits must be specified

Example:
4242
country_of_issue
string

ISO 3 chars country code.

Example:
CYP
card_holder_details
Object nullable

Information about the card holder

card_holder_name
string required

The name of the card holder

Example:
John Alias Doe
address_line_1
string nullable

The address related to the card

Example:
Elia Papakyriakou
address_line_2
string nullable

Additional address information related to the card

Example:
Tower Stars
address_city
string nullable

The city related to the card

Example:
Nicosia
address_zip
string nullable

The zip code related to the card address

Example:
2000
address_state
string nullable

The state related to the card address

Example:
Egkomi
address_country
string nullable

The country related to the card address

Example:
CY
use_billing_address
boolean nullable

If set to True, then the card holder’a address is automatically set using the account’s billing address

Example:
true
gateway_token
Array nullable

Information regarding the card tokenization via a payment gateway

Object
gateway
string required

The payment gateway that tokenized the card

Enumeration:
JCC
JCC_MERCHANT
token
string required

The card token or fingerprint hash

Example:
123654789654
Examples

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The payment method identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "id": "34234234-34343",
    "payment_method_type": "ACCOUNT",
    "is_primary": "true",
    "is_backup": "false",
    "notes": "Lorem Ipsum",
    "bank_details": {
        "account_holder_name": "John Doe",
        "account_number": "001002001",
        "sort_code": "102491",
        "iban": "SE3550000000054910000003",
        "bank": "Barclays",
        "branch": "Ascot",
        "swift": "12345678"
    },
    "card": {
        "name": "Default Card",
        "first6": "42424242",
        "last4": "4242",
        "card_holder_details": {
            "card_holder_name": "John Alias Doe",
            "address_line_1": "Elia Papakyriakou",
            "address_line_2": "Tower Stars",
            "address_city": "Nicosia",
            "address_zip": "2000",
            "address_state": "Egkomi",
            "address_country": "CY",
            "use_billing_address": "true"
        },
        "gateway_token": [
            {
                "gateway_identifier": "",
                "gateway": "JCC",
                "token": "123654789654"
            }
        ]
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Update Payment Method
PUT /contacts/{id}/payment_methods/{payment_method_id}

Update an existing payment method for a contact

Path variables

id
string GUID required

The contact identifier whose paymeny method will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
payment_method_id
string GUID required

The payment method identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
is_primary
boolean

Marks the payment method as the contact’s primary one

Example:
true
is_backup
boolean

Marks the payment method as the backup

Example:
false
notes
string nullable

The payment method notes

Example:
Lorem Ipsum
bank_details
Object required nullable

The bank details.Required and applicable if the payment method is set to BANK

account_holder_name
string nullable

The account holder name of the bank

Example:
John Doe
account_number
string nullable

The bank account number

Example:
001002001
iban
string nullable

The international bank account number

Example:
SE3550000000054910000003
sort_code
string nullable

The bank sort code

Example:
102491
bank
string nullable

The identifier of the bank

Example:
Barclays
branch
string nullable

The identifier of the bank branch

Example:
Ascot
swift
string

The bank account swift number

Example:
12345678
card
Object required nullable

The card’s main information. Required and applicable if the payment method type is CARD

name
string nullable

The card name

Example:
Default Card
first6
string nullable

The first 6 digits of the card. Either the card number or the first 6 and last 4 digits must be specified

Example:
42424242
last4
string required nullable

The last 4 digits f the card. Either the card number or the first 6 and last 4 digits must be specified

Example:
4242
country_of_issue
string

iso 3 char coutnry code

Example:
CYP
card_holder_details
Object nullable

Information about the card holder

card_holder_name
string required

The name of the card holder

Example:
John Alias Doe
address_line_1
string nullable

The address related to the card

Example:
Elia Papakyriakou
address_line_2
string nullable

Additional address information related to the card

Example:
Tower Stars
address_city
string nullable

The city related to the card

Example:
Nicosia
address_zip
string nullable

The zip code related to the card address

Example:
2000
address_state
string nullable

The state related to the card address

Example:
Egkomi
address_country_code
string nullable

The country related to the card address

Example:
CY
use_billing_address
boolean nullable

If set to True, then the card holder’a address is automatically set using the account’s billing address

Example:
true
gateway_token
Array required nullable

Information regarding the card tokenization via a payment gateway

Object
gateway
string required

The payment gateway that processed the payment method details

Enumeration:
JCC
JCC_MERCHANT
token
string

The card token

Example:
1234567
Examples

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The payment method identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
PUT /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "is_primary": "true",
    "is_backup": "false",
    "notes": "Lorem Ipsum",
    "bank_details": {
        "account_holder_name": "John Doe",
        "account_number": "001002001",
        "iban": "SE3550000000054910000003",
        "sort_code": "102491",
        "bank": "Barclays",
        "branch": "Ascot",
        "swift": "12345678"
    },
    "card": {
        "name": "Default Card",
        "first6": "42424242",
        "last4": "4242",
        "card_holder_details": {
            "card_holder_name": "John Alias Doe",
            "address_line_1": "Elia Papakyriakou",
            "address_line_2": "Tower Stars",
            "address_city": "Nicosia",
            "address_zip": "2000",
            "address_state": "Egkomi",
            "address_country_code": "CY",
            "use_billing_address": "true"
        }
    },
    "gateway_token": {
        "gateway_identifier": "",
        "gateway": "JCC",
        "token": "123654789654"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Remove Payment Method
DELETE /contacts/{id}/payment_methods/{payment_method_id}

Remove an existing payment method from a specific contact

Path variables

id
string GUID required

The contact identifier whose payment method will be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
payment_method_id
string GUID required

The payment method identifier that will be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
List Payment Methods
GET /contacts/{id}/payment_methods

List of Payment methods allocated to contact.

Path variables

id
string GUID required

The contact identifier whose payment methods will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information related to the payment methods

Object
id
string GUID

The payment method identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
payment_method_type
string

The payment method that is related with the account

Enumeration:
CARD
DIRECT_DEBIT
PAYPAL
WALLET
ACCOUNT
is_primary
boolean

Indicates which payment mehod is the contact’s primary one

Example:
true
is_backup
boolean

Indicates which payment mehod is the contact’s backup one

Example:
false
notes
string

Notes related to the payment method

Example:
Lorem Ipsum
card
Object

The card’s main information. Required and applicable if the payment method type is CARD

name
string

The card name

Example:
Default Card
first6
string

The first 6 digits of the card. Either the card number or the first 6 and last 4 digits must be specified

Example:
42424242
last4
string

The last 4 digits of the card. Either the card number or the first 6 and last 4 digits must be specified

Example:
4242
country_of_issue
string

3 char country code

Example:
CYP
card_holder_details
Object

Information about the card holder

card_holder_name
string

The name of the card holder

Example:
John Alias Doe
address_line_1
string

The address related to the card

Example:
Elia Papakyriakou
address_line_2
string

Additional address information related to the card

Example:
Tower Stars
address_city
string

The city related to the card

Example:
Nicosia
address_zip
string

The zip code related to the card address

Example:
2000
address_state
string

The state related to the card address

Example:
Egkomi
address_country
string

The country related to the card address

Example:
CY
use_billing_address
boolean

If set to True, then the card holder’a address is automatically set using the account’s billing address

Example:
true
gateway_token
Array

Information regarding the card tokenization via a payment gateway

Object
gateway_identifier
string

Unique Identifier such as PayPal Username

gateway
string

The payment gateway that tokenized the card

Enumeration:
PAYPAL
JCC
STRIPE
JCC_LOYALTY
token
string

The card token

Example:
123654789654
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "payment_method_type": "DIRECT_DEBIT",
            "is_primary": "true",
            "is_backup": "false",
            "notes": "Lorem Ipsum",
            "card": {
                "name": "Default Card",
                "first6": "42424242",
                "last4": "4242",
                "card_holder_details": {
                    "card_holder_name": "John Alias Doe",
                    "address_line_1": "Elia Papakyriakou",
                    "address_line_2": "Tower Stars",
                    "address_city": "Nicosia",
                    "address_zip": "2000",
                    "address_state": "Egkomi",
                    "address_country": "CY",
                    "use_billing_address": true
                },
                "gateway_token": [
                    {
                        "gateway_identifier": "",
                        "gateway": "STRIPE",
                        "token": "123654789654"
                    }
                ]
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 100
    }
}
Set Up Intents
POST /contacts/{id}/intents

Set up a new payment intent for a specific contact

Path variables

id
string GUID required

The contact identifier for which a Payment Intent will be set up

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
payment_gateway
string

The payment gateway for which the Intent will be set up

Enumeration:
STRIPE
JCC
Examples

Responses

200 OK

The request has succeeded

Body
Object
client_secret
string

The client’s secret number retrieved by the gateway

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1

Add a payment method

POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/intents HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "payment_gateway": "STRIPE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "client_secret": ""
}
Fingerprint
POST /contacts/{id}/fingerprints

Allows a credit card to be hashed to provide the details for both a CIM and for later use as card identifier for redemption, or refunds.

Path variables

id
string GUID required

The contact identifier for which a Payment Intent will be set up

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
gateway
string

The payment gateway for which the Intent will be set up

Enumeration:
JCC_LOYALTY
card_number
string

16 Digit card number to provide a fingerprint

Examples

Responses

200 OK

The request has succeeded

Body
Object
fingerprint
string

Fingerprint of the card number

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1

Add a payment method

POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/intents HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "payment_gateway": "STRIPE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "client_secret": ""
}
Phones
POST /contacts/{id}/phones
PUT /contacts/{id}/phones/{phone_id}
DELETE /contacts/{id}/phones/{phone_id}
GET /contacts/{id}/phones
Add Contact Phone
POST /contacts/{id}/phones

Add a new phone to an existing contact. A contact can have multiple phones

Path variables

id
string GUID required

The contact (id) for which a phone will be added

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
phone_type
string required

The phone type that should be added

Enumeration:
LANDLINE
MOBILE
is_primary
boolean nullable

Defines whether the phone will be the primary one

Example:
true
number
string required

The phone number

Example:
91000000
country_code
string required nullable

The country that the phone is registered to

Example:
CY

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The phone number record identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "phone_type": "MOBILE",
    "is_primary": true,
    "number": "91000000",
    "country_code": "CY"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Update Contact Phone
PUT /contacts/{id}/phones/{phone_id}

Update an existing phone form an existing contact

Path variables

id
string GUID required

The contact (id) for which a phone should be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
phone_id
string GUID required

The phone identifier that should be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
is_primary
boolean nullable

Defines whether the phone will be the primary one

Example:
true
number
string required

The phone number

Example:
91000000
country_code
string required nullable

The country that the phone is registered to

Example:
CY

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The phone number record identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
PUT /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "is_primary": true,
    "number": "91000000",
    "country_code": "CY"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Remove Contact Phone
DELETE /contacts/{id}/phones/{phone_id}

Removes a contact phone. A single phone can be removed at a time

Path variables

id
string GUID required

The contact (id) for which a phone should be deleted

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
phone_id
string GUID required

The phone identifier that should be deleted

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
List Contact Phones
GET /contacts/{id}/phones

Retrieves phones of an existing contact

Path variables

id
string GUID required

The contact ID for which the phones will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The phone identifier

Example:
6c38316b-d871-a01e-afbb-d6bca3b27b01
phone_type
string

The phone type that should be added

Enumeration:
LANDLINE
MOBILE
is_primary
boolean

Defines whether the phone will be the primary one

Example:
true
number
string

The phone number

Example:
91000000
country_code
string

The country that the phone is registered to

Example:
CY
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "fab9c379-d6b3-0162-8ac1-ca0bfe0c2f1e",
            "phone_type": "LANDLINE",
            "is_primary": "true",
            "number": "91000000",
            "country_code": "CY"
        }
    ]
}
Tokens
POST /contacts/{id}/tokens
GET /contacts/{id}/tokens
Request Contact Token
POST /contacts/{id}/tokens

Request a contact token

Path variables

id
string GUID required

The contact identifier that a token will be created

Example:
33749faa-4ef0-426d-f9f0-83b91bf5ab3f

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
intent
string required

The intent for which such token is requested

Enumeration:
SPEND
spend_amount
number nullable

The amount requested to be spent. If not specified, all amount can be spend (applicable if intent = SPEND)

Example:
14.52

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact token identifier

Example:
0b2f69e7-a9a6-2e6f-b1f2-0a643d9ca6b7
value
string

The requested token

Example:
123456
expiration
integer epoch

The token expiration date

Example:
1596714307
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST https://sandbox.crm.com/self-service/v1/contacts/33749faa-4ef0-426d-f9f0-83b91bf5ab3f/tokens HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "intent": "SPEND",
    "spend_amount": 14.52
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "0b2f69e7-a9a6-2e6f-b1f2-0a643d9ca6b7",
    "value": "123456",
    "expiration": 1596714307
}
List Contact Tokens
GET /contacts/{id}/tokens

List all contact tokens for a specific contact

Path variables

id
string GUID required

The contact identifier whose tokens will be retrieved

Example:
33749faa-4ef0-426d-f9f0-83b91bf5ab3f

Request parameters

intent
string optional

Filter based on the intent that tokens were requested

Enumeration:
SPEND

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The contact token identifier

Example:
0b2f69e7-a9a6-2e6f-b1f2-0a643d9ca6b7
value
string

The contact token value

Example:
123456
expiration
integer epoch

The contact token expiration date

Example:
1596714307
spend_amount
number

The amount requested to be spent. If not specified, all amount can be spend (applicable if intent = SPEND)

Example:
1.99
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://staging.crm.com/self-service/v1/contacts/33749faa-4ef0-426d-f9f0-83b91bf5ab3f/tokens HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "0b2f69e7-a9a6-2e6f-b1f2-0a643d9ca6b7",
            "value": "123456",
            "expiration": 1596714307
        }
    ]
}
Applications Usage
POST /contacts/{id}/applications
Add Application Usage
POST /contacts/{id}/applications

Add application usage to a contact

Path variables

id
string GUID required

The contact identifier where application usage will be set

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
application_id
string GUID required

The application identifier that usage will be set

Example:
d9acc889-098f-7811-b5fb-bb06dd87f8cd
platform
string required

The platform on which the application is downloaded and used

Enumeration:
IOS
ANDROID

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/applications HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "application_id": "00000000-000000000000000"
}

HTTP/1.1 200 OK 
Organisation Operations
POST /contacts/{id}/organisations
GET /contacts/{id}/organisations
Sign up/out Organisation
POST /contacts/{id}/organisations

Contact joins an existing organisation

Path variables

id
string GUID required

The contact (registry) identifier that will sign up/out to/from an organisation

Example:
49144508-5520-48e7-8e64-6a1907afbb26

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
action
string required

The action that should be applied on the organisation

Enumeration:
SIGNUP
SIGNOFF
organisation_id
string GUID required

The organisation identifier that the action will be applied

Example:
9086dd6b-2b9f-4fba-85ff-1b89143a56da
service_acceptance
boolean nullable

Defines whether the contact has accepted the client service (applicable only if action = SIGNUP)

Default:
true
Example:
true
email_opt_out
boolean nullable

The contact setting for receiving emails (applicable only if action = SIGNUP)

Default:
false
Example:
true
sms_opt_out
boolean nullable

The contact setting for receiving sms (applicable only if action = SIGNUP)

Default:
false
Example:
true
consent_state
string nullable

The contact setting for consent (applicable only if action = SIGNUP)

Enumeration:
PENDING
ACCEPTED
REJECTED
WITHDRAWN
referral_code
string nullable

The code that will be used for awarding referral events (applicable only if action = SIGNUP)

Example:
1234
Examples

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
Example 2
POST https://sandbox.crm.com/self-service/v1/contacts/49144508-5520-48e7-8e64-6a1907afbb26/organisations HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "action": "SIGNUP",
    "organisation_id": "9086dd6b-2b9f-4fba-85ff-1b89143a56da",
    "service_acceptance": "true",
    "email_opt_out": "true",
    "sms_opt_out": "true",
    "consent_state": "PENDING",
    "referral_code": "1234"
}

HTTP/1.1 200 OK 
POST https://sandbox.crm.com/self-service/v1/contacts/49144508-5520-48e7-8e64-6a1907afbb26/organisations HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "action": "SIGNOFF",
    "organisation_id": "9086dd6b-2b9f-4fba-85ff-1b89143a56da"
}

HTTP/1.1 200 OK 
Get Contact Organisations
GET /contacts/{id}/organisations

Retrieves all organisations that the contact is signed up to

Path variables

id
string GUID required

The contact (registry) identifier whose joined organisations will be retrieved

Example:
49144508-5520-48e7-8e64-6a1907afbb26

Request parameters

name
string optional

The organisation name (should behave as like)

Example:
Coffee Brew
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The organisation identifier

Example:
442428dc-c817-41a7-8a3e-b49070696d6f
name
string

The organisation name

Example:
BrewCoffee
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/contacts/49144508-5520-48e7-8e64-6a1907afbb26/organisations HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "442428dc-c817-41a7-8a3e-b49070696d6f",
            "name": "BrewCoffee"
        }
    ]
}
Contact Account Operations
POST /contacts/{id}/accounts
PUT /accounts/{id}
PUT /accounts/{id}/rewards
GET /contacts/{id}/accounts
GET /accounts/{id}/financials
GET /accounts/{id}/rewards
Add Account for Contact
POST /contacts/{id}/accounts

Add a new customer account to an existing contact

Path variables

id
string GUID required

The contact identifier for which a new account will be added

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
name
string

Account Name

currency_code
string nullable

The account’s currency

Default:
Auto-set by the system (based on business rules)
Example:
EUR
is_primary
boolean nullable

If set to true, then the account will be set as the primary one even if a different one exists

Example:
false
billing_address_id
string GUID nullable

The unique identification of a contact address which will be set as the billing address of the account. By default, the primary addres (if exists) will be provided

Example:
4AD9C84FA60F9FE407140E20F707726A
classification_id
string GUID

The account’s classification ID

Example:
4AD9C84FA60F9FE407140E20F707726A
Examples

Responses

200 OK

The response succeeded

Body
Object
id
string

The account id

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "currency_code": "EUR",
    "is_primary": "false",
    "billing_address_id": "4AD9C84FA60F9FE407140E20F707726A",
    "classification_id": "4AD9C84FA60F9FE407140E20F707726A"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Update Account
PUT /accounts/{id}

Update an existing account of a contact

Path variables

id
string GUID required

The account identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
classification_id
string GUID

The account’s classification ID

Example:
4AD9C84FA60F9FE407140E20F707726A
is_primary
boolean

If set to true, then the account will be set as the primary one even if a different one exists

Example:
true
billing_address_id
string GUID

The unique identification of a contact address which will be set as the billing address of the account. By default, the primary addres (if exists) will be provided

Example:
4AD9C84FA60F9FE407140E20F707726A
credit_limit
number

Sets the credit limit of the account, within the allowed range based on settings

Example:
200

Responses

200 OK

The response succeeded

Body
Object
id
string GUID

The account identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
PUT /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "classification_id": "4AD9C84FA60F9FE407140E20F707726A",
    "is_primary": "true",
    "billing_address_id": "4AD9C84FA60F9FE407140E20F707726A",
    "credit_limit": 200
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Update Account Rewards
PUT /accounts/{id}/rewards

Update the Reward information for an existing account of a contact

Path variables

id
string GUID required

The account identifier whose reward information will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Notes

Only Primary Accounts of a Contact hold Reward information

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
account_status
string required nullable

The new account status

Enumeration:
ACTIVE
SUSPENDED
TERMINATED
automatic_spend_settings
Object nullable

Information about the automatic spend preferences

enable_automatic_spend
boolean required nullable

Defines whether automatic spends will be enabled or not

Default:
false
Example:
true
automatic_spend_preference
string nullable

Defines whether automatic spends will occur on the next purchase of a specific merchant or based on wallet balance and purchase amount to a group of merchants

Enumeration:
NEXT_MERCHANT_PURCHASE
ALL_MERCHANT_PURCHASE
minimum_wallet_balance
number nullable

The minimum wallet balance amount that should be available for the spend to be performed. Applicable when automatic spend preference is for all merchant purchases

Default:
1
Example:
5.21
from_purchase_amount
number nullable

The min amount (inclusive) that the purchase customer event total amount should be in order for the automatic spend to be applied. Applicable when automatic spend preference is for all merchant purchases

Default:
1
Example:
5.42
preferred_payment_method_id
string GUID

The customer’s preferred payment method identifier that will be used for spending purposes for back-end reduction rewards (applicable payment methods are direct debit and credit cards related)

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
Examples

Responses

200 OK

The response succeeded

Body
Object
id
string

The account identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
PUT /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "account_status": "TERMINATED",
    "spend_preferences": {
        "enable_automatic_spend": "true",
        "minimum_wallet_balance": 5.21,
        "minimum_spend_amount": 5.42,
        "maximum_spend_amount": 12.24
    },
    "peferred_pament_method_id": "33434FDA22100"
}
List Contact Accounts
GET /contacts/{id}/accounts

Get a list of Contact Accounts. Normally a contact will have a single account but multiple accounts can be used to service different currencies, or different spending profiles.

Path variables

id
string GUID required

The contact identifier whose accounts will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

is_primary
string optional

If set to true, then only the primary account of the contact will get retrieved

sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
accounts
Array
Object
id
string GUID

The account identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
is_primary
boolean

Indicates the primary account of the contact

Example:
true
name
string

The account name

Example:
ACR123456-JohnDoe
number
string

The account name

Example:
AC123456
life_cycle _state
string

The account’s life cycle state

Enumeration:
ACTIVE
SUSPENDED
TERMINATED
currency_code
string

The account’s currency

Example:
EUR
classification
Object

The account’s classification

id
string GUID

The classification identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The classification name

Example:
VIP
billing_address
Object

The billing address of the account which is the same as one of the contact’s addresses

id
string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
address_type
string
Enumeration:
HOME
BUSINESS
address_line_1
string

The address line 1

Example:
Elia Papakyriakou 21
address_line_2
string

The address line 2

Example:
Tower Star
state_province_county
string

The address county

Example:
Egkomi
town_city
string

The address city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2000
country_code
string

The address country identifier

Example:
CY
lat
number
lon
number
googlePlaceId
string
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The total number of records overall

Example:
100
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "accounts": [
                {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "is_primary": true,
                    "name": "ACR123456-JohnDoe",
                    "number": "AC123456",
                    "life_cycle _state": "SUSPENDED",
                    "currency_code": "EUR",
                    "classification": {
                        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                        "name": "VIP"
                    },
                    "billing_address": {
                        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                        "address_type": "HOME",
                        "address_line_1": "Elia Papakyriakou 21",
                        "address_line_2": "Tower Star",
                        "state_province_county": "Egkomi",
                        "town_city": "Nicosia",
                        "postal_code": "2000",
                        "country_code": "CY"
                    }
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 100
    }
}
Get Account Financials
GET /accounts/{id}/financials

Get a single Account with its financial information

Path variables

id
string GUID required

The unique identification of the Account to be retrieved.

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
name
string

The account’s name

Example:
John Smith AC00123456
number
string

The account’s number

Example:
AC00123456
is_primary
string

Defines whether the account is the primary one of the contact

Example:
true
life_cycle_state
string

The account’s life cycle state

Enumeration:
ACTIVE
SUSPENDED
TERMINATED
currency_code
string

The account’s currency (3 code currency)

Example:
EUR
balance
integer

The account’s calculated balance

Example:
200
overdue_amount
number

The unpaid amount that is passed its due date

Example:
100.5
credit_limit
number

The account’s credit limit

Example:
100
accounting_period_id
string GUID

The ID of the latest closed accounting period

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
accounting_period_name
string

The name of the account’s latest accounting period

Example:
OCTOBER2018
opening_balance
number

The opening balance brought forwards after the latest closed accounting period

Example:
100.5
classification
Object
id
string GUID

The unique identifier of the Account classification

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the Account classification

Example:
VIP
wallet
Array

The account’s wallet information (if available)

Object
id
string GUID

The wallet’s unique identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
code
string

A unique 16-digit code that if not provided, it is auto-generated

Example:
W00123456
balance
number

The total balance of the wallet

Example:
150.5
commerce_balance
integer

The commerce balance of the wallet

Example:
98
open_balance
integer

The open balance of the wallet

Example:
1
life_cycle_state
string

The wallet’s life cycle state

Enumeration:
EFFECTIVE
CANCELLED
minimum_balance
number

The minimum wallet balance threshold. If not provided, the global rules apply

Example:
10
limit_rules
Array

Defines the limit rules applied on specific wallet. If not provided, the global rules apply

Object
limit_amount
number

The maximum amount allowed

Example:
100.5
transaction_type
string

The wallet transaction type for which the limit is applied

Enumeration:
CREDIT
DEBIT
period
string

The period for which the limit is applied

Enumeration:
DAILY
MONTHLY
ANNUAL
billing_address
Object
id
string GUID

The id of the billing address

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
address_line_1
string
Example:
2265 Oak Street
address_line_2
string
state_province_county
string
Example:
New York
town_city
string
Example:
Old Forge
postal_code
string
Example:
13420
country_code
string
Example:
USA
lat
number
lon
number
googlePlaceId
string
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/financials HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "John Smith AC00123456",
    "number": "AC00123456",
    "is_primary": "true",
    "life_cycle_state": "ACTIVE",
    "currency_code": "EUR",
    "balance": 200,
    "overdue_amount": 100.5,
    "credit_limit": 100,
    "accounting_period_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "accounting_period_name": "OCTOBER2018",
    "opening_balance": 100.5,
    "classification": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "VIP"
    },
    "wallet": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "code": "W00123456",
            "balance": 150.5,
            "commerce_balance": 98,
            "open_balance": 1,
            "life_cycle_state": "CANCELLED",
            "minimum_balance": 10,
            "limit_rules": [
                {
                    "limit_amount": 100.5,
                    "transaction_type": "CREDIT",
                    "period": "DAILY"
                }
            ]
        }
    ],
    "billing_address": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "address_line_1": "2265 Oak Street",
        "address_line_2": "",
        "state_province_county": "New York",
        "town_city": "Old Forge",
        "postal_code": "13420",
        "country_code": "USA"
    }
}
Get Account Rewards
GET /accounts/{id}/rewards

Retrieve the Rewards details for a specific account

Path variables

id
string GUID required

The account identifier whose rewards information should be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Notes

Only Primary Accounts of a Contact hold Reward information

Request parameters

include_rewards
string optional

If defined then information about the total rewards

Enumeration:
DAILY

Any amount attributes will be filtered based on the current day

WEEKLY

Any amount attributes will be filtered based on the current week

MONTHLY

Any amount attributes will be filtered based on the current month

YEARLY

Any amount attributes will be filtered based on the current year

OVERALL

Any amount attributes will be filtered based on the registration date

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The account identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The account name

Example:
John Smith AC00123456
number
string

The account number

Example:
ACR001
currency_code
string

The account currency

Example:
EUR
signed_up_on
integer epoch

The date when the account was signed up for the first time

Example:
1583846865
spending_blocked_status
boolean

Defines whether the account can spend or not

Example:
false
automatic_spend_settings
Object

Information about the automatic spend settings for the account

enable_automatic_spend
boolean

Defines whether automatic spend is enabled for the account

Example:
true
automatic_spend_preference
string

Defines whether automatic spends will occur on the next purchase of a specific merchant or based on wallet balance and purchase amount to a group of merchants

Enumeration:
NEXT_MERCHANT_PURCHASE
ALL_MERCHANT_PURCHASE
minimum_wallet_balance
number

The minimum wallet balance amount that should be available for the spend to be performed. Applicable when automatic spend preference is for all merchant purchases

Example:
1.87
from_purchase_amount
number

The min amount (inclusive) that the purchase customer event total amount should be in order for the automatic spend to be applied. Applicable when automatic spend preference is for all merchant purchases

Example:
23.98
reward_tier
Object

Information about the account’s reward tier

id
string

ID of reward tier

name
string

The reward tier name

Example:
Red
color
string

Color of Tier

Example:
#d4af37
achieved_date
integer

Date reached current tier

period_value_units
number

Points collected during the period

Example:
2000
lifetime_value_units
number

Total Lifetime Points

Example:
12543
maintain_tier
Object
points_needed
number

point need to maintain current tier

Example:
200
collected_by
integer

dates point must be collected by

progress
Object
id
string

next Tier ID

Example:
guid
name
string

Next Tier name

Example:
Gold
points_needed
string

Points Needed to progress to next tier

Example:
1400
collected_by
integer

Points need to be collected by date

joined_reward_schemes
Array

Information about the reward schemes that the account has signed up to

Object
id
string GUID

The reward scheme identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The reward scheme name

Example:
CRMdotCOM Scheme
signed_up_on
integer epoch

The date when the account was signed up on the specific reward scheme

Example:
1583846865
email_address
string

The email address that was used during sign up (applicable if the reward scheme is a close loop scheme based on email domains)

Example:
johndoe@crm.com
preferred_payment_method
Object

The customer’s preferred payment method identifier that will be used for spending purposes for back-end reduction rewards (applicable payment methods are direct debit and credit cards related)

id
string GUID

The preferred payment method identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
payment_method_type
string

The customer’s preferred payment method identifier that will be used for spending purposes

Enumeration:
CARD
DIRECTDEBIT
first6
string

The first six digits of the card (applicable only if the payment method type is card based)

Example:
424242
last4
string

The last four digits of the card (applicable only if the payment method type is card based)

Example:
4242
iban
string

The bank’s iban (applicable only if the payment method type is direct debit based)

Example:
CY3550000000054910000003
rewards
Object

Rewards details. Available when the include_rewards is enabled

total_awards
string

The total awards of the account

Example:
123.23
total_spends
string

The total spends of the account

Example:
43.56
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/rewards HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "name": "John Smith AC00123456",
    "number": "ACR001",
    "currency_code": "EUR",
    "signed_up_on": 1583846865,
    "spending_blocked_status": "false",
    "automatic_spend_settings": {
        "enable_automatic_spend": "true",
        "automatic_spend_preference": "NEXT_MERCHANT_PURCHASE",
        "minimum_wallet_balance": 1.87,
        "from_purchase_amount": 23.98
    },
    "reward_tier": {
        "id": "",
        "name": "Red",
        "achieved_date": 1,
        "period_value_units": 2000,
        "lifetime_value_units": 12543,
        "maintain_tier": {
            "points_needed": 200,
            "collected_by": "15678943"
        },
        "progress": {
            "points_needed": "1400",
            "collected_by": "15678943",
            "id": "guid",
            "name": "Gold"
        }
    },
    "joined_reward_schemes": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "CRMdotCOM Scheme",
            "signed_up_on": 1583846865,
            "email_address": "johndoe@crm.com"
        }
    ],
    "preferred_payment_method": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "payment_method_type": "DIRECTDEBIT",
        "first6": "424242",
        "last4": "4242",
        "iban": "CY3550000000054910000003"
    },
    "rewards": {
        "total_awards": "123.23",
        "total_spends": "43.56"
    }
}
Contact Events
Purchases
GET /contacts/{id}/purchases
PUT /purchases/reclaim
Search Contact Purchases
GET /contacts/{id}/purchases

Get a list of contact purchase customer events. Each purchase customer event is created against an account

Path variables

id
string GUID required

The contact identifier for which a list of purchase customer events should be returned

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

from_date
integer epoch optional

Filters customer events that were performed from that date onwards

Example:
1582852959
to_date
integer epoch optional

Filters customer events that were performed from that date backwards

Example:
1582852959
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information about the retrieved purchase customer events

Object
id
string GUID

The customer event identifier

Example:
6A24D2B5E44F44B28451FE021FCAD51E
account_id
string GUID

The account identifier that the customer event was created against

Example:
658AB90A6A77437091D158FD8E697B11
reference_number
string

The customer event reference number

Example:
0012345
life_cycle_state
string

The customer event life cycle state

Enumeration:
POSTED
CANCELLED
payment_medium_identifier
string

The unique identifier of the payment medium used in the purchase (e.g. the first 6 digits of a credit card)

Example:
424242
total_net_amount
number

The net amount of the retrieved customer event

Example:
100.9
total_tax_amount
number

The tax amount of the retrieved customer event

Example:
25.08
discount_amount
number

The discount amount of the customer event

Example:
0.5
total_amount
number

The total amount (net + tax) of the retrieved customer event, after discount

Example:
125.38
requested_spend_amount
number

The amount in real currency that was requested to be spend via the customer event

Example:
10.54
performed_on
integer epoch

The date that the customer event was performed

Example:
1572534147
classification
Object

Details about purchase customer event classification

id
string GUID

The customer event classification identifier

Example:
18670ca7-0bc4-45d7-8464-91afab817bbe
name
string

The customer event classification name

Example:
Delivery
pass
Object

Details about the pass used on the purchase

id
string GUID

The pass identifier

Example:
89136fa9-0dc9-451d-833a-d22bf9d8b947
code
string

The pass code

Example:
13456789
performed_by_organisation
Object

Information about the organisation that performed the customer event

id
string GUID

The organisation identifier

Example:
658AB90A6A77437091D158FD8E697B11
name
string

The organisation name

Example:
CRMdotCOM Nicosia
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
parent_organisation
Object

Information about the business parent of the organisation that the purchase was performed. Available only if the performed by organisation is a venue

id
string GUID

The organisation (business/merchant) identifier

Example:
658AB90A6A77437091D158FD8E697B22
name
string

The organisation (business/merchant) name

Example:
CRMdotCOM
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
rewards
Object

Infromation about the award/spend amounts for such purchase

total_award_amount
number

The amount in real currency that was awarded via the customer event

Example:
121.99
total_spend_amount
number

The amount in real currency that was spent via the customer event

Example:
12.22
total_automatic_spend_amount
number

The total amount in real currency that was spent automatically via the customer event

Example:
2.22
total_instant_discount_amount
number

The total amount in real currency that was spent instantly via the customer event

Example:
4.49
total_spend_request_amount
number

The total amount in real currency that was actually spent on request via the customer event (may differ than the requested_spend_amount)

Example:
4.51
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/purchases HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "6A24D2B5E44F44B28451FE021FCAD51E",
            "account_id": "658AB90A6A77437091D158FD8E697B11",
            "reference_number": "0012345",
            "life_cycle_state": "CANCELLED",
            "payment_medium_identifier": "424242",
            "total_net_amount": 100.9,
            "total_tax_amount": 25.08,
            "discount_amount": 0.5,
            "total_amount": 125.38,
            "requested_spend_amount": 10.54,
            "performed_on": 1572534147,
            "performed_by_organisation": {
                "id": "658AB90A6A77437091D158FD8E697B11",
                "name": "CRMdotCOM Nicosia"
            },
            "parent_organisation": {
                "id": "658AB90A6A77437091D158FD8E697B22",
                "name": "CRMdotCOM"
            },
            "rewards": {
                "total_award_amount": 121.99,
                "total_spend_amount": 12.22,
                "total_automatic_spend_amount": 2.22,
                "total_instant_discount_amount": 4.49,
                "total_spend_request_amount": 4.51
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Reclaim Purchase to Contact
PUT /purchases/reclaim

Reclaim a purchase customer event to a contact

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
reclaim_code
string

The code that identifies the purchase

Example:
e863d773-6a82-e596-3415-f34d1f74ff74d82f441d-d9a4-d9a8-12f4-b186394a1dd81596703136

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The puchase customer event identifier

Example:
f248292d-2950-2175-851a-9be073b71c5b
401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
PUT https://staging.crm.com/self-service/v1/purchases/link HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "auth_code": "e863d773-6a82-e596-3415-f34d1f74ff74d82f441d-d9a4-d9a8-12f4-b186394a1dd81596703136"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "f248292d-2950-2175-851a-9be073b71c5b"
}
Referrals
POST /send_referrals
POST /referrals
Refer a friend
POST /send_referrals

Send referrals to contacts, inviting them to register to the business scheme and in return to award their referred by friend

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
recipients
Array

The email address or phone numbers that referrals will be sent to

Unique items: YES
string
Examples:
j_doe@crm.com+35722265566

Responses

200 200

OK

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /send_referrals HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "recipients": [
        "j_doe@crm.com",
        "+35722265566"
    ]
}

HTTP/1.1 200 OK 
Create Referral
POST /referrals

Create a referral customer event

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
referral_code
string

The referral code

Example:
REF123

Responses

200 200

OK

Body
Object
id
string GUID

The customer event identifier

Example:
fe7bcab9-59cf-4906-a100-482396f5bf3f
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /referrals HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "referral_code": "REF123"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "fe7bcab9-59cf-4906-a100-482396f5bf3f"
}
Contact Reward Operations
POST /accounts/{id}/reward_schemes
POST /reward_schemes/verify_sign_up
POST /accounts/{id}/merchants
DELETE /accounts/{id}/merchants/{organisation_id}
GET /accounts/{id}/merchants
Sign up/out a Reward Scheme
POST /accounts/{id}/reward_schemes

Sign up/out the account to a specific reward scheme

Path variables

id
string GUID required

The account that will be signed up to the reward scheme

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Notes

Sign up to a “Self Sign Up” Reward Scheme requires only the Reward Scheme attribute

Request to join a closed loop Reward Scheme based on specific email domains requires the Reward Scheme and Email Address attributes

Sign up to a closed loop Reward Scheme should be verified via the “Verify Closed Loop Sign Up Request” API

Sign up to a closed loop Reward Scheme based on an external system requires the Reward Scheme and Token attributes

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
action
string required

The action that should be applied for the reward scheme

Enumeration:
SIGNUP

Request to sign-up to a scheme

SIGNOUT

Request to sign-off from a scheme

reward_scheme_id
string GUID required

The reward scheme that the account has signed up

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
email_address
string nullable

The email address of the customer requestng to sign uo to a reward scheme based on supported domains

Example:
johndoe@crm.com
sign_up_code
string nullable

The code that will verify that the customer is allowed to sign up to a closed loop reward scheme

Example:
ABCTKN123456798VGP2020
Examples

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The reward scheme identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
Example 2
Example 3

Sign up to a reward scheme of type self-sign up

POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "action": "SIGNUP",
    "reward_scheme_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}

Sign out from a reward scheme

POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "action": "SIGNOUT",
    "reward_scheme_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}

Sign up to a reward scheme of type closed loop based on email address

POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "action": "SIGNUP",
    "reward_scheme_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "email_address": "johndoe@crm.com"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Verify Closed Loop Sign Up Request
POST /reward_schemes/verify_sign_up

Verify an account’s request to join a closed loop reward scheme (of email domain specific)

Notes

Request to join a close loop Reward Scheme based on specific email domains should be made via the “Sign up to a Reward Scheme” API, providing the Reward Scheme and Email Address attributes

Request body

Object
sign_up_code
string nullable

The code that will verify that the customer is allowed to sign up to a close loop reward scheme based on email domains

Example:
SUC1234

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /reward_schemes/verify_sign_up HTTP/1.1 

Content-Type: application/json

{
    "sign_up_code": "ABCTKN123456798VGP2020"
}

HTTP/1.1 200 OK 
Add Merchants
POST /accounts/{id}/merchants

Add a set of new merchants for automatic spends for that account

Path variables

id
string GUID required

The account identifier that will add a new merchant

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
merchants
Array required

Defines a list of merchants that are authorised to perform automatic awards spending for that account

Object
organisation_id
string GUID required

The organisation identifier that should be authorised to perform automatic awards spending

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
is_next_visit
boolean nullable

Defines whether the merchant is setup for automatic spend on the next visit

Example:
false
Examples

Responses

200 OK

The request has succeeded

Body
Object
merchants
Array

A list of merchants that are authorised to perform automatic awards spending for that account

Object
id
string GUID

The organisation identifier that should be authorised to perform automatic awards spending

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "merchants": [
        {
            "organisation_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "is_next_visit": "false"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "merchants": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
        }
    ]
}
Remove Merchant
DELETE /accounts/{id}/merchants/{organisation_id}

Remove an exisintg merchant from an account’s automatic spend preferences

Path variables

id
string GUID required

The account identifier that will remove existing merchants

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
organisation_id
string GUID required

The organisation identifier that should be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
DELETE /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Get Merchants
GET /accounts/{id}/merchants

Retrieve the merchant organisations that an account provisioned for automatic spend requests

Path variables

id
string GUID required

The account identifier whose automatic spend merchant preferences should be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string

The record identifier

Example:
REC1E31269B76D7A65ACCE45B2E68DFD
is_next_visit
boolean

Defines whether the organisation is setup for automatic spend on the next visit

Example:
false
organisation
Object

Organisation details

id
string

The organisation identifier

Example:
QWE1E31269B76D7A65ACCE45B2E68QAQ
name
string

The organisation name

Example:
Bravo Coffee
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "REC1E31269B76D7A65ACCE45B2E68DFD",
            "is_next_visit": "false",
            "organisation": {
                "id": "QWE1E31269B76D7A65ACCE45B2E68QAQ",
                "name": "Bravo Coffee"
            }
        }
    ]
}
Contact Wallet Operations
POST /wallets/{id}/actions
GET /wallets/{id}/balances
Actions on Wallet
POST /wallets/{id}/actions

Change the life cycle state of the Wallet

Path variables

id
string GUID required

The wallet identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
action
string

Defines the life cycle state of the wallet. If selected, then all of the above will not be taken into consideration

Enumeration:
TERMINATED
EFFECTIVE

Responses

200 OK

The response succeeded

Body
Object
id
string GUID

The wallet identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /wallets/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "action": "CANCELLED"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
List Wallet Balances
GET /wallets/{id}/balances

Get the wallet’s balances split per spend condition

Path variables

id
string GUID required

The unique identification of the wallet whose balance spend conditions will be retrieved.

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

spend_condition_id
string GUID optional

The id of a specific spend condition (optional). If not provided then all spend conditions are retrieved

Example:
4AD9C84FA60F9FE407140E20F707726A
include_expiration
boolean optional

If set to true, then the expiration information will also be retrieved

Example:
true
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The response succeeded

Body
Object
content
Array
Object
amount
number

The amount that is allocated to the specified spend condition

Example:
100.5
id
string GUID

The unique ID of the spend condition group

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The name of the spend condition group

Example:
Happy Hour
organisations
Array

The organisations where the amount can be spent at

Object
id
string GUID

The ID of the organisation

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The name of the organisation

Example:
Cafe
locations
Array

The location of the organisation

Object
name
string
Example:
Head Office
address_line_1
string
Example:
Elia Papakyriakou 21
address_line_2
string
Example:
7 Tower Stars
state_province_county
string
Example:
Egkomi
town_city
string
Example:
Nicosia
postal_code
string
Example:
2415
country_code
string
Example:
CY
lat
string
Example:
35.157115
lon
string
Example:
33.313719
googleplaceid
string
Example:
ChIJrTLr-GyuEmsRBfy61i59si0
products
Array

The products that the amount can be spent for

Object
id_type
string

The type of the ID to be provided

Enumeration:
PRODUCT
FAMILY
TYPE
BRAND
CATEGORY
id
string GUID

The ID of the product (based on the type provided)

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The name of the product

Example:
Coffee
description
string

The descrtipion of the product

Example:
Brazilian Coffee
timings
Object

The time when the amount can be spent

periods
Array
Object
month
integer

Defines the month as integer (1-12)

Example:
1
day
integer

Defines the day in a week as integer (1-7). Week starts with Monday (1)

Example:
1
start_time
string

Start time within a day

Example:
19:00
end_time
string

End time within a day

Example:
21:00
expiration
Object

Defines the amounts expiring in periods. Available only if the parameter include_expiration is set to true

zero_to_thirty
number

The amount that will expire in up to 30 days

Example:
50.5
thirty_to_sixty
number

The amount that will expire from 30 to 60 days

Example:
50.5
sixty_to_ninety
number

The amount that will expire from 60 to 90 days

Example:
50.5
ninety_plus
number

The amount that will expire in more than 90 days

Example:
50.5
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /wallets/CAD1E31269B76D7A65ACCE45B2E68DFD/balances HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "amount": 100.5,
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "name": "Happy Hour",
            "organisations": [
                {
                    "id": "4AD9C84FA60F9FE407140E20F707726A",
                    "name": "Cafe",
                    "locations": [
                        {
                            "name": "Head Office",
                            "address_line_1": "Elia Papakyriakou 21",
                            "address_line_2": "7 Tower Stars",
                            "state_province_county": "Egkomi",
                            "town_city": "Nicosia",
                            "postal_code": "2415",
                            "country_code": "CY",
                            "lat": "35.157115",
                            "lon": "33.313719",
                            "googleplaceid": "ChIJrTLr-GyuEmsRBfy61i59si0"
                        }
                    ]
                }
            ],
            "products": [
                {
                    "id_type": "FAMILY",
                    "id": "4AD9C84FA60F9FE407140E20F707726A",
                    "name": "Coffee",
                    "description": "Brazilian Coffee"
                }
            ],
            "timings": {
                "periods": [
                    {
                        "month": 1,
                        "day": 1,
                        "start_time": "19:00",
                        "end_time": "21:00"
                    }
                ]
            },
            "expiration": {
                "zero_to_thirty": 50.5,
                "thirty_to_sixty": 50.5,
                "sixty_to_ninety": 50.5,
                "ninety_plus": 50.5
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 100
    }
}
Estimates
GET /estimates/routing_rules
POST /estimates/orders
POST /estimates/invoicing
POST /estimates/order_fulfillment
Routing Rules
GET /estimates/routing_rules

Returns the applicable routing rule that matches the parameters provided

Request parameters

payment_method_type
string required

The type of the payment method

Enumeration:
CARD
PAYPAL
currency
string optional

The currency related to routing rule

Example:
EUR
country
string optional

The country related to the routing rule

Example:
CY

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The GUID of the routing rule

Example:
F8F8E9DA009A4B70BCEEB113B183456D
connector
string

The routing rule’s payment gateway

Enumeration:
STRIPE
JCC
BRAINTREE
PAYPAL
payment_method_type
string

The type of the payment method

Enumeration:
CARD
PAYPAL
currency
string

The currency code applicable for this rule

countries
Array

The country code(s) applicable for this rule

string
Example:
GR
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /estimates/routing_rules HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "F8F8E9DA009A4B70BCEEB113B183456D",
    "connector": "STRIPE",
    "payment_method_type": "PAYPAL",
    "currency": "",
    "countries": [
        "GR"
    ]
}
Orders
POST /estimates/orders

Preview order information before making an order including fulfillment and invoice estimations

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
account_id
string GUID required
Example:
1bd3e4d3-5981-209b-787d-352dcd5389a3
supply_method
string required

The supply method for the order

Example:
DELIVERY
fulfilled_by
string required
requested_delivery_at
Object
time
integer
Example:
30
time_unit
string
Example:
MINUTES
date
integer
Example:
12312323123
address_id
string GUID

Required for Delivery orders

Example:
84bfd840-b520-5bde-8f0a-b36937a2fce7
notes
string
line_items
Array
Object
id
string GUID
Example:
7f45ad8a-b164-2a67-eb93-8651c0f1b101
quantity
integer
Example:
1
price
number
Example:
2.99
tax_model
string
Example:
TAX_INCLUSIVE
notes
string
components
Array
Object
id
string GUID
Example:
6e111025-002b-48d7-a675-6d9e48070b8f
quantity
integer
Example:
1
price
number
Example:
0.5
tax_model
string
Example:
TAX_INCLUSIVE

Responses

200 OK

The request has succeeded

Body
Object
id
string

The uniue identifier of the order’s estimation. To be used to make a new order

order_estimate
Object
fulfilled_by
Object
id
string GUID

The organisation identifier that will fulfill the order

Example:
3FD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation name that will fulfill the order

Example:
Bro Burgers
estimated_delivery
Object
time_to_deliver
integer
uot
string
Example:
minutes
delivered_at
integer
Example:
12345565
invoice_estimate
Object
issued_date
integer
Example:
123456789
due_date
integer
Example:
123456789
currency
string
Example:
EUR
total_net_amount
integer
Example:
9
total_discount_amount
integer
Example:
1
total_tax_amount
number
Example:
0.99
total_amount
number
Example:
9.99
taxes_breakdown
Array
Object
tax_amount
number
Example:
0.99
tax_rate
Object
id
string GUID
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
19
line_items
Array
Object
id
string GUID
Example:
7CD9C84FA60F9FE407140E20F707726A
sku
string
name
string
tax_model
string
Example:
TAX_INCLUSIVE
rate_model
string
Example:
TIERED
quantity
integer
Example:
1
unit_price
number
Example:
9.99
net_amount
number
Example:
9.99
discount_amount
number
Example:
0.1
tax_amount
number
Example:
0.99
sub_total
number
Example:
9.99
applied_promotions
Array
Object
discount_value
number
Example:
0.1
discount_type
string
Example:
AMOUNT
discount_amount
number
Example:
0.1
promotion
Object
id
string GUID
Example:
0b551184-aa37-43af-646f-a40d9da017a8
name
string
applied_taxes
Array
Object
tax_amount
number
Example:
0.99
tax_exempt_reason
string
Example:
CONTACT
tax_rate
Object
id
string GUID
Example:
0b551184-aa37-43af-646f-a40d9da017a8
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
19
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /estimates/orders HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "account_id": "",
    "supply_method": "DELIVERY",
    "fulfilled_by": "",
    "requested_delivery_at": {
        "time": 30,
        "time_unit": "MINUTES",
        "date": 12312323123
    },
    "address_id": "",
    "notes": "",
    "line_items": [
        {
            "id": "",
            "quantity": 1,
            "price": 2.99,
            "tax_model": "TAX_INCLUSIVE",
            "notes": "",
            "components": [
                {
                    "id": "",
                    "quantity": 1,
                    "price": 0.5,
                    "tax_model": "TAX_INCLUSIVE"
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "",
    "order_estimate": {
        "fulfilled_by": {
            "id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Bro Burgers"
        },
        "estimated_delivery": {
            "time_to_deliver": 1,
            "uot": "minutes",
            "delivered_at": 12345565
        }
    },
    "invoice_estimate": {
        "issued_date": 123456789,
        "due_date": 123456789,
        "currency": "EUR",
        "total_net_amount": 9,
        "total_discount_amount": 1,
        "total_tax_amount": 0.99,
        "total_amount": 9.99,
        "taxes_breakdown": [
            {
                "tax_amount": 0.99,
                "tax_rate": {
                    "id": "",
                    "name": "",
                    "tax_code": "VAT",
                    "percentage": 19
                }
            }
        ],
        "line_items": [
            {
                "id": "7CD9C84FA60F9FE407140E20F707726A",
                "sku": "",
                "name": "",
                "tax_model": "TAX_INCLUSIVE",
                "rate_model": "TIERED",
                "quantity": 1,
                "unit_price": 9.99,
                "net_amount": 9.99,
                "discount_amount": 0.1,
                "tax_amount": 0.99,
                "sub_total": 9.99,
                "applied_promotions": [
                    {
                        "discount_value": 0.1,
                        "discount_type": "AMOUNT",
                        "discount_amount": 0.1,
                        "promotion": {
                            "id": "",
                            "name": ""
                        }
                    }
                ],
                "applied_taxes": [
                    {
                        "tax_amount": 0.99,
                        "tax_exempt_reason": "CONTACT",
                        "tax_rate": {
                            "id": "",
                            "name": "",
                            "tax_code": "VAT",
                            "percentage": 19
                        }
                    }
                ]
            }
        ]
    }
}
Invoicing
POST /estimates/invoicing

Returns an estimation of how much a customer will pay when purchasing a product. The estimation includes not just the product’s final price, but also various detailed amounts on how the estimated cost is calculated

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
account_id
string
line_items
Array
Object
product_id
string
bundle_product_id
string
quantity
integer
Example:
1
price
number
Example:
9.99
discount_value
integer
Example:
1
discount_option
string
Example:
PERCENTAGE
tax_model
string
Example:
TAX_EXCLUSIVE

Responses

200 OK
Body
Object
id
string
issued_date
integer
Example:
123456789
due_date
integer
Example:
123456789
currency
string
Example:
EUR
total_net_amount
integer
Example:
9
total_discount_amount
integer
Example:
1
total_tax_amount
number
Example:
0.99
total_amount
number
Example:
9.99
taxes_breakdown
Array
Object
tax_amount
number
Example:
0.99
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
line_items
Array
Object
id
string
Example:
7CD9C84FA60F9FE407140E20F707726A
sku
string
name
string
tax_model
string
Example:
TAX_INCLUSIVE
rate_model
string
Example:
TIERED
quantity
integer
Example:
1
unit_price
number
Example:
9.99
net_amount
number
Example:
9.99
discount_amount
number
Example:
0.1
tax_amount
number
Example:
0.99
sub_total
number
Example:
9.99
applied_promotions
Array
Object
discount_value
number
Example:
0.1
discount_type
string
Example:
AMOUNT
discount_amount
number
Example:
0.1
promotion
Object
id
string
name
string
applied_taxes
Array
Object
tax_amount
number
Example:
0.99
tax_exempt_reason
string
Example:
CONTACT
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
Example 1
POST /estimates/invoicing HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "account_id": "",
    "line_items": [
        {
            "product_id": "",
            "bundle_product_id": "",
            "quantity": 1,
            "price": 9.99,
            "discount_value": 1,
            "discount_option": "PERCENTAGE",
            "tax_model": "TAX_EXCLUSIVE"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "",
    "issued_date": 123456789,
    "due_date": 123456789,
    "currency": "EUR",
    "total_net_amount": 9,
    "total_discount_amount": 1,
    "total_tax_amount": 0.99,
    "total_amount": 9.99,
    "taxes_breakdown": [
        {
            "tax_amount": 0.99,
            "tax_rate": {
                "id": "",
                "name": "",
                "tax_code": "VAT",
                "percentage": 1
            }
        }
    ],
    "line_items": [
        {
            "id": "7CD9C84FA60F9FE407140E20F707726A",
            "sku": "",
            "name": "",
            "tax_model": "TAX_INCLUSIVE",
            "rate_model": "TIERED",
            "quantity": 1,
            "unit_price": 9.99,
            "net_amount": 9.99,
            "discount_amount": 0.1,
            "tax_amount": 0.99,
            "sub_total": 9.99,
            "applied_promotions": [
                {
                    "discount_value": 0.1,
                    "discount_type": "AMOUNT",
                    "discount_amount": 0.1,
                    "promotion": {
                        "id": "",
                        "name": ""
                    }
                }
            ],
            "applied_taxes": [
                {
                    "tax_amount": 0.99,
                    "tax_exempt_reason": "CONTACT",
                    "tax_rate": {
                        "id": "",
                        "name": "",
                        "tax_code": "VAT",
                        "percentage": 1
                    }
                }
            ]
        }
    ]
}
Order Fulfillment
POST /estimates/order_fulfillment

Preview order fulfillment information

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
supply_method
string required

Preview order based on the supply method

Enumeration:
DELIVERY
PICK_UP
is_open
boolean nullable

Preview order only for open venues

Example:
true
postal_code
string nullable

Preview order based on the postal code

Example:
2415
lat_lot
string nullable

Preview order based on the geo-location (lat/long)

Example:
35.157204,33.314151
address_id
string GUID nullable

Preview order based on the customer address

Example:
28441e3e-767a-b6cc-9a59-6d7705de6428
requested_organisation_id
string GUID nullable

Preview order based on a specific organisation as requested by the customer

Example:
4456e728-019c-86e4-3e4f-bb7920e2ef75
requested_delivery_at
Object nullable

Preview order based on the date and time at which the customer requests the ordered items to be delivered/picked-uo (Applicable only for ordering ahead/scheduling an order)

time
integer required

The order ahead time

Example:
30
time_unit
string required

The order ahead time unit

Example:
MINUTES
date
integer epoch required

The order ahead date

Example:
12312323123

Responses

200 OK

The request has succeeded

Body
Array
Object
fulfilled_by
Object

Details about the organisation (business/merchant/venues) that will fulfill the order

id
string GUID

The organisation identifier

Example:
3FD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation name

Example:
Best Burger Egkomi
phone
string

The organisation phone number

Example:
+6934222321
address
Object

The organisation address

address_line_1
string

The address line 1

Example:
Ilia Papakyriakou 21
address_line_2
string

The address line 2

Example:
7 Stars Tower
state_province_county
string

The address state/province/county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
lat
string

The latitude of the location

Example:
35.157115
lon
string

The longitude of the location

Example:
33.313719
googleplaceid
string

The Google textual identifier that uniquely identifies a location

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
parent_organisation
Object

Details about the parent organisation (business/merchant) of the fulfilled by. Not applicable if the fulfilled by organisation is of type business or merchant

id
string GUID

The organisation identifier

Example:
b1607c37-e750-2324-ac49-6591a86f54b8
name
string

The organisation name

Example:
Best Burger
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST https://sandbox.crm.com/self-service/v1/estimates/order_fulfillment HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "supply_method": "DELIVERY",
    "address_id": "28441e3e-767a-b6cc-9a59-6d7705de6428",
    "is_open": true,
    "requested_organisation_id": "4456e728-019c-86e4-3e4f-bb7920e2ef75"
}

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "fulfilled_by": {
            "id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Best Burger Egkomi",
            "phone": "+6934222321",
            "address": {
                "address_line_1": "Ilia Papakyriakou 21",
                "address_line_2": "7 Stars Tower",
                "state_province_county": "Egkomi",
                "town_city": "Nicosia",
                "postal_code": "2415"
            },
            "parent_organisation": {
                "id": "b1607c37-e750-2324-ac49-6591a86f54b8",
                "name": "Best Burger",
                "creatives": [
                    {
                        "id": "CA123456789AQWSXZAQWS1236547896541",
                        "type": "",
                        "width": 2159,
                        "height": 3075,
                        "format": "jpg",
                        "url": "https://assets.crm.com/image/offer.jpg",
                        "public_id": "crm-com/image",
                        "media": [
                            {
                                "width": 200,
                                "height": 300,
                                "url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
                            }
                        ]
                    }
                ]
            }
        }
    }
]
Media
POST /media/upload/signature
Upload Signature
POST /media/upload/signature

Request body

Object
contact_id
string

Contact To associate the avatar to

Example:
e66896ba-db0a-41e2-8093-9aca2ae02f29
usage_type
string
Example:
AVATAR
folder
string
Example:
/avatars
tracking_key
string

Key to track Upload

Example:
e668
Orders

Group containing Orders Web APIs

POST /orders
PUT /orders/{id}
GET /contacts/{id}/orders
GET /orders/{id}
PUT /orders/{id}/actions
POST /orders/{id}/items
PUT /orders/{id}/items/{item_id}
DELETE /orders/{id}/items/{item_id}
Make an Order
POST /orders

Creates a new Order for a contact based on an order’s estimation

Notes

The following APIs should be called in order to make an order

  1. Order Fulfillment
  2. Orders
  3. Make an Order

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
estimation_id
string required

The estimation_id as this is returned back by the estimates/order Web API

payments
Array required

At least one milestone must be specified.

Object
payment_method_type
string
Example:
CASH
paid_on
string
Example:
ON_ORDER
payment_method_id
string
amount
number
payment_token
string

Responses

201 Created
Body
Object
id
string

The identifier of the new Order

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
number
string

The Order’s number

Example:
O000001
fulfilled_by
Object

The organisation that will fulfill the Order

id
string GUID

The organisation’s identifer

Example:
3FD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the organisation

Example:
Bro Burgers
phone
string

The organisation’s phone number

Example:
+6934222321
address
Object

Details about the address

address_line_1
string

The address line 1

Example:
17 Baker Str
address_line_2
string

The address line 2

state_province_county
string

The address state/province/county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
12462
country_code
string

The address country code

Example:
GR
lat
number

The address geolocation latitude

Example:
12.345
lon
number

The address geolocation longtitude

Example:
11.452
googlePlaceId
string

The address unique Google identifier

Example:
123ewd23rwe23w
estimated_delivery_time
Object

An estimation of the delivery time

time_to_deliver
integer
Example:
30
uot
string
Example:
MINUTES
delivery_at
integer

The actual delivery time

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /orders HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "estimation_id": "",
    "payments": [
        {
            "payment_method_type": "CASH",
            "paid_on": "ON_ORDER",
            "payment_method_id": "",
            "amount": 2,
            "payment_token": ""
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "number": "O000001",
    "fulfilled_by": {
        "id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "Bro Burgers",
        "phone": "+6934222321",
        "address": {
            "address_line_1": "17 Baker Str",
            "address_line_2": "",
            "state_province_county": "Egkomi",
            "town_city": "Nicosia",
            "postal_code": "12462",
            "country_code": "GR",
            "lat": 12.345,
            "lon": 11.452,
            "googlePlaceId": "123ewd23rwe23w"
        }
    },
    "estimated_delivery_time": {
        "time_to_deliver": 30,
        "uot": "MINUTES",
        "delivery_at": 1
    }
}
Update Order
PUT /orders/{id}

Updates an existing Order

Path variables

id
string required

The order’s GUID

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
notes
string
address_id
string
fulfilled_by
string
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
requested_delivery_at
Object
time
integer
Example:
1
time_unit
string
Example:
HOURS
date
integer
Example:
1
payments
Array
Object
payment_method_type
string
Example:
CASH
paid_on
string
Example:
ON_ORDER
payment_method_id
string
amount
number

Responses

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

200 OK
Body
Object
id
string

The identifier of the updated Order

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
Example 1
PUT /orders/{id} HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "notes": "",
    "address_id": "",
    "fulfilled_by": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "requested_delivery_at": {
        "time": 1,
        "time_unit": "HOURS",
        "date": 1
    }, 
    "payments": [
        {
            "payment_method_type": "CASH",
            "paid_on": "ON_ORDER",
            "payment_method_id": "",
            "amount": 1
        }
    ]
}
List Contact Orders
GET /contacts/{id}/orders

Retrieves a list of a contact’s Orders

Path variables

id
string GUID required

The contact identifier whose orders will be retrieved

Example:
067083a5-607c-959e-e62a-3ba8d359bdd6

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
Body
Object
id
string GUID

The order identifier

Example:
3DD9C84FA60F9FE407140E20F707726A
number
string

The order number

Example:
O000001
supply_method
string

Defines if the ordered items will be delivered at the contact or if the cotnact will pick them up

Enumeration:
DELIVERY
PICK_UP
life_cycle_state
string

The Order’s life cycle state

Enumeration:
NEW
IN_PROGRESS
ON_HOLD
COMPLETED
CANCELLED
Example:
IN_PROGRESS
is_favorite
boolean

Indicates the Order that the contact marked as his/her favorite one. A single Order can be marked as a favorite.

Example:
true
total_cost
number

The Order’s total amount

Example:
14.99
currency
string

The currency in which the Order will be/was paid

Example:
EUR
submitted_date
integer epoch
Example:
11599124760
fulfilled_by
Object
id
string

guid of organisation

name
string

Name of Organisation that fullfilled Order

order_items
Array

List of order items

Object
quantity
integer

The item quantity

Example:
1
product
Object

Details about the ordered product

id
string GUID

The product identifier

Example:
00dee79b-8a97-7d86-4ecd-5c14f75ec071
sku
string

The product sku

Example:
SKU01
name
string

The product name

Example:
Freddo Espresso
Example 1
GET /contacts/{id}/orders HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "3DD9C84FA60F9FE407140E20F707726A",
    "number": "O000001",
    "supply_method": "DELIVERY",
    "life_cycle_state": "IN_PROGRESS",
    "is_favorite": "true",
    "total_cost": 14.99,
    "currency": "EUR",
    "submitted_date": 1,
    "order_items": [
        {
            "quantity": 1,
            "product": {
                "id": "",
                "sku": "",
                "name": ""
            }
        }
    ]
}
Get Order
GET /orders/{id}

Retrieves detailed information for a specific order

Path variables

id
string GUID required

The order identifier

Example:
3DD9C84FA60F9FE407140E20F707726A

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
Body
Object
id
string GUID
Example:
3DD9C84FA60F9FE407140E20F707726A
number
string
Example:
O000001
supply_method
string
Example:
PICK_UP
life_cycle_state
string
Example:
IN_PROGRESS
is_favorite
boolean
Example:
true
notes
string
total_cost
number
Example:
14.99
currency
string
Example:
EUR
fulfilled_by
Object
id
string GUID
Example:
5DD9C84FA60F9FE407140E20F707726A
name
string
Example:
Good Burgers
address
Object

Details about the address

address_line_1
string

The address line 1

Example:
17 Baker Str
address_line_2
string

The address line 2

state_province_county
string

The address state/province/county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
12462
country_code
string

The address country code

Example:
GR
lat
number

The address geolocation latitude

Example:
12.345
lon
number

The address geolocation longtitude

Example:
11.452
googlePlaceId
string

The address unique Google identifier

Example:
123ewd23rwe23w
category
Object
id
string
Example:
7BD9C84FA60F9FE407140E20F707726A
name
string
Example:
Normal
key_dates
Object
submitted_on
integer
Example:
546733443345
estimated_completion_date
integer
Example:
122233443345
completed_on
integer
Example:
342342342344
cancelled_on
integer
Example:
34234342342
expiration_date
integer
Example:
1
requested_date
integer
Example:
1
started_on
integer
cancellation_reason
Object
id
string
name
string
Example:
Items out of stock
order_items
Array
Object
id
string
quantity
integer
Example:
2
notes
string
price
number
Example:
1.4
total_amount
number
Example:
2.8
product
Object
id
string
Example:
4AD9C84FA60F9FE407140E20F707726A
sku
string
Example:
abc-12345
name
string
Example:
Installation kit
description
string
components
Array
Object
id
string
Example:
6CD9C84FA60F9FE407140E20F707726A
sku
string
Example:
0012933-100
name
string
Example:
Decoder
quantity
integer
Example:
2
price
number
Example:
0.99
sub_total
number
Example:
1.98
payments
Array
Object
payment_method_type
string
Example:
CARD
paid_on
string
Example:
ON_COMPLETE
posted_on
string
pyment_method_details
Object
id
string
last4
string
funding_type
string
brand
string
amount
number
Example 1
GET /orders/{id} HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "3DD9C84FA60F9FE407140E20F707726A",
    "number": "O000001", 
    "supply_method": "PICK_UP",
    "life_cycle_state": "IN_PROGRESS",
    "is_favorite": "true",
    "notes": "",
    "total_cost": 14.99,
    "currency": "EUR",
    "fulfilled_by": {
        "id": "5DD9C84FA60F9FE407140E20F707726A",
        "name": "Good Burgers"
    },
    "address": {
        "address_line_1": "17 Baker Str",
        "address_line_2": "",
        "state_province_county": "",
        "town_city": "",
        "postal_code": "12462",
        "country_code": "GR"
    },
    "category": {
        "id": "7BD9C84FA60F9FE407140E20F707726A",
        "name": "Normal"
    },
    "key_dates": {
        "submitted_on": 546733443345,
        "estimated_completion_date": 122233443345,
        "completed_on": 342342342344,
        "cancelled_on": 34234342342,
        "expiration_date": 1,
        "requested_date": 1,
        "started_on": 1
    },
    "cancellation_reason": {
        "id": "",
        "name": "Items out of stock"
    },
    "order_items": [
        {
            "id": "",
            "quantity": 2,
            "notes": "",
            "price": 1.4,
            "total_amount": 2.8,
            "product": {
                "id": "4AD9C84FA60F9FE407140E20F707726A",
                "sku": "abc-12345",
                "name": "Installation kit",
                "description": ""
            },
            "components": [
                {
                    "id": "6CD9C84FA60F9FE407140E20F707726A",
                    "sku": "0012933-100",
                    "name": "Decoder",
                    "quantity": 2,
                    "price": 0.99,
                    "sub_total": 1.98
                }
            ]
        }
    ],
    "payments": [
        {
            "payment_method_type": "CARD",
            "paid_on": "ON_COMPLETE",
            "posted_on": "",
            "pyment_method_details": {
                "id": "",
                "last4": "",
                "funding_type": "",
                "brand": ""
            },
            "amount": 1
        }
    ]
}
Perform Order Actions
PUT /orders/{id}/actions

Updates an existing Order

Path variables

id
string required

The order’s GUID

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
action
string

Defines the new life cycle state of the Order. Used to start the progress of an order, complete it or cancel it

Enumeration:
PAUSE
RESUME
REPEAT
CANCEL
MARK_FAVORITE
SCHEDULE
cancellation_reason_id
string

The cancellation reason of the Order. Applicable only when cancelling the Order

Responses

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

200 OK
Body
Object
id
string

The identifier of the updated Order

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
Example 1
PUT /orders/{id}/actions HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "action": "PAUSE",
    "cancellation_reason_id": "",
    "scheduling_settings": {
        "starts_on": 1,
        "ends_on": 1,
        "submit_at": "0900",
        "on_specific_days": [
            "FRIDAY", "SATURDAY", "SUNDAY"
        ]
    }
}
Add Order Item
POST /orders/{id}/items

Amend an existing, non-completed Order with additional items

Path variables

id
string GUID required

The order identifier that items will be added

Example:
c7a4affb-bd9e-a8de-42f1-fae7ca436fe1

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
product_id
string
quantity
integer
Example:
2
notes
string
components
Array
Object
product_id
string
Example:
5AD1E31269B76D7A65ACCE45B2E68DFD
quantity
integer
Example:
2

Responses

200 OK
Body
Object
id
string GUID

The order identifier that was updated

Example:
5DD9C84FA60F9FE407140E20F707726A
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST /orders/{id}/items HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "product_id": "",
    "quantity": 2,
    "notes": "",
    "components": [
        {
            "product_id": "5AD1E31269B76D7A65ACCE45B2E68DFD",
            "quantity": 2
        }
    ]
}
Update Order Item
PUT /orders/{id}/items/{item_id}

Updates a non-completed Order’s items in terms of quantity, characteristics etc

Path variables

id
string GUID required

The order itentifier that item will be updated

Example:
457dbb31-aecd-a7ca-998c-a61a87327315
item_id
string GUID required

The item identifier that will be updated

Example:
99c6896e-c7cc-a2c9-5fe9-cad34f11af94

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
quantity
integer

The quantity of the ordered item

Example:
2
notes
string

The ordered item notes

Example:
shaken, not stirred
components
Array

The order item components

Object
product_id
string GUID

The product identifier of the component

Example:
5AD1E31269B76D7A65ACCE45B2E68DFD
quantity
integer

The quantity of the product component

Example:
2

Responses

200 200

Successfull request

Body
Object
id
string GUID

The order identifier that was updated

Example:
c7a4affb-bd9e-a8de-42f1-fae7ca436fe1
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
PUT https://sandbox.crm.com/self-service/v1/orders/457dbb31-aecd-a7ca-998c-a61a87327315/items/99c6896e-c7cc-a2c9-5fe9-cad34f11af94 HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "quantity": 2,
    "notes": "shaken, not stirred",
    "components": [
        {
            "product_id": "5AD1E31269B76D7A65ACCE45B2E68DFD",
            "quantity": 2
        }
    ]
}

HTTP/1.1 200 OK 
Remove Order Item
DELETE /orders/{id}/items/{item_id}

Removes items from a non-completed Order

Path variables

id
string GUID required

The order identifier that items will be removed

Example:
7637cbdc-54d3-0cd0-138d-dee31d00e743
item_id
string GUID required

The item identifier that will be removed

Example:
cc6f4195-0784-02ee-c39e-1be531275f41

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
DELETE https://sandbox.crm.com/self-service/v1/orders/7637cbdc-54d3-0cd0-138d-dee31d00e743/items/cc6f4195-0784-02ee-c39e-1be531275f41 HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Organisations
GET /organisations/{id}/network
GET /organisations/{id}
GET /locations
GET /merchants
POST /organisations/{id}/switch
Search Organisations
GET /organisations/{id}/network

Retrieve a list of organisations that consist the business network

Path variables

id
string GUID required

The organisation identifier whose bueiness network will be retrieved

Example:
56854656-b466-463f-8e10-b6bf558b4666

Request parameters

name
string optional

The organisation name (should behave as like)

Example:
Bravo Coffee
relationship
string optional

Filter based on the organisation’s relationship

Enumeration:
BUSINESS
SUBSIDIARY
MERCHANT
VENUE
industries
array of string GUID optional

Industry filter for organisation

Collection format: csv
Unique items: YES
industry_sectors
array of string GUID optional

Industry sector filter for organisation

Collection format: csv
Unique items: YES
business_activities
array of string GUID optional

Business activity filter for organisation

Collection format: csv
town_cities
array of string optional

The city that a merchant is located

Collection format: csv
Unique items: YES
organisation_tags
array of string GUID optional

Tag filter for organisation

Collection format: csv
service_registry
boolean optional

Filters organisations that use the service owner contact registry

Example:
true
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
sort
string optional

Defines on which attribute the results should be sorted

Enumeration:
CREATED_DATE
UPDATED_DATE
NAME
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information about the retrieved merchants (business units)

Object
id
string GUID

The organisation identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation name

Example:
Alfa Bakery
description
string

The organisation description

Example:
Lorem Ipsum
industry_name
string

The organisation industry

Example:
Restaurant
industry_sectors
Array

The organisation industry sectors

Object
name
string

The industry sector name

Example:
Nightlife
business_activities
Array

The organisation business activities

Object
name
string

The business activity name

Example:
Bar & Grill
organisation_tags
Array

The organisation tags

Object
name
string

The tag name

Example:
Restaurant
locations
Array

Information about the specified addresses

Object
name
string

The location name

Example:
Main Store
address_line_1
string

The main address information

Example:
Elia Papakyriakou
address_line_2
string

Additional address information

Example:
Tower Stars
state_province_county
string

The address state/province.county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2000
country_code
string

The address country

Example:
CY
care_of
string

The address care of

Example:
Lorem Ipsum
lat
string

The latitude of the location

Example:
35.157115
lon
string

The longitude of the location

Example:
33.313719
googleplaceid
string

The Google textual identifier that uniquely identifies a location

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /organisations/56854656-b466-463f-8e10-b6bf558b4666/network HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Alfa Bakery",
            "description": "Lorem Ipsum",
            "industry_name": "Restaurant",
            "industry_sectors": [
                {
                    "name": "Nightlife"
                }
            ],
            "business_activities": [
                {
                    "name": "Bar & Grill"
                }
            ],
            "locations": [
                {
                    "name": "Main Store",
                    "address_line_1": "Elia Papakyriakou",
                    "address_line_2": "Tower Stars",
                    "state_province_county": "Egkomi",
                    "town_city": "Nicosia",
                    "postal_code": "2000",
                    "country_code": "CY",
                    "care_of": "Lorem Ipsum",
                    "lat": "35.157115",
                    "lon": "33.313719",
                    "googleplaceid": "ChIJrTLr-GyuEmsRBfy61i59si0"
                }
            ],
            "creatives": [
                {
                    "id": "CA123456789AQWSXZAQWS1236547896541",
                    "type": "LOGO",
                    "width": 2159,
                    "height": 3075,
                    "format": "jpg",
                    "url": "https://assets.crm.com/image/offer.jpg",
                    "public_id": "crm-com/image",
                    "media": [
                        {
                            "width": 200,
                            "height": 300,
                            "url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
                        }
                    ]
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Get Organisation
GET /organisations/{id}

Retrieve all details for a specific organisation

Path variables

id
string GUID required

The organisation identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Object

Information about the retrieved organisations

id
string GUID

The organisation identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation name

Example:
Alfa Bakery
description
string

The organisation description

Example:
Lorem Ipsum
industry_name
string

The organisation industry

Example:
Restaurant
industry_sectors
Array

The organisation industry sectors

Object
name
string

The industry sector name

Example:
Bar
business_activities
Array

The organisation business activities

Object
name
string

The business activity name

Example:
Bar & Grill
organisation_tags
Array

The organisation tags

Object
name
string

The tag name

Example:
Restaurant
locations
Array

Information about the specified addresses

Object
name
string

The location name

Example:
Main Store
address_line_1
string

The main address information

Example:
Elia Papakyriakou
address_line_2
string

Additional address information

Example:
Tower Stars
state_province_county
string

The address state/province.county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2000
country_code
string

The address country

Example:
CY
care_of
string

The address care of

Example:
Lorem Ipsum
lat
string

The latitude of the location

Example:
35.157115
lon
string

The longitude of the location

Example:
33.313719
googleplaceid
string

The Google textual identifier that uniquely identifies a location

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
contact_info
Array

Details about the organisation information

Object
id
string GUID

The contact detail identifier

Example:
CON123456234567345674567895678IK
name
string

The contact detail name

Example:
Main Office
type
string

The contact detail type

Enumeration:
EMAIL
PHONE
value
string

The contact detail value

Example:
johndoe@deliciousfood.com
country_code
string

The country code related to the contact detail of type phone

Example:
CYP
operation_details
Object

Defines the operation details of the organisation

opening_hours
Array

Details about the organisation’s working hours

Object
day_of_week
string

The day of the week that the organisation is open

Example:
MONDAY
opens
string

The time that the organisation opens (HH:MM)

Example:
09:00
closes
string

The time that the organisation closes (HH:MM)

Example:
15:00
operation
string

The opening hours for each organisation’s operation type

Enumeration:
DELIVERY
PICK_UP
ANY
short_term_operations
Array

Details about the organisation’s availability to offer its services

Object
operation
string

The organisation’s operation type

Enumeration:
DELIVERY
PICK_UP
is_closed
boolean

Defines whether the organisation is temporary closed for offering its services

Example:
false
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /organisations/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "Alfa Bakery",
        "description": "Lorem Ipsum",
        "industry_name": "Restaurant",
        "industry_sectors": [
            {
                "name": "Bar"
            }
        ],
        "business_activities": [
            {
                "name": "Bar & Grill"
            }
        ],
        "locations": [
            {
                "name": "Main Store",
                "address_line_1": "Elia Papakyriakou",
                "address_line_2": "Tower Stars",
                "state_province_county": "Egkomi",
                "town_city": "Nicosia",
                "postal_code": "2000",
                "country_code": "CY",
                "care_of": "Lorem Ipsum",
                "lat": "35.157115",
                "lon": "33.313719",
                "googleplaceid": "ChIJrTLr-GyuEmsRBfy61i59si0"
            }
        ],
        "creatives": [
            {
                "id": "CA123456789AQWSXZAQWS1236547896541",
                "type": "",
                "width": 2159,
                "height": 3075,
                "format": "jpg",
                "url": "https://assets.crm.com/image/offer.jpg",
                "public_id": "crm-com/image",
                "media": [
                    {
                        "width": 200,
                        "height": 300,
                        "url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
                    }
                ]
            }
        ]
    }
}
Locations
GET /locations

Get a list of organisations (merchants, venues) ordered by nearest first

Request parameters

lat
string required
lon
string required
is_open
boolean optional
order_type
string optional
within
number optional

How far should the distance be at a maximum default to 5KM

industries
array of string GUID optional

Industry filter for organisation

Collection format: csv
Unique items: YES
industry_sectors
array of string GUID optional

Industry sector filter for organisation

Collection format: csv
Unique items: YES
business_activities
array of string GUID optional

Business activity filter for organisation

Collection format: csv
Unique items: YES
organisation_tags
array of string GUID optional

Tag filter for organisation

Collection format: csv
Unique items: YES
town_cities
array of string optional
Collection format: csv
Unique items: YES

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
Body
Object
content
Array
Object
id
string GUID

ID of Merchant or Venue with Store Information

name
string
description
string
location
Object
id
string GUID
address
string
lat
number
lon
number
distance
string

Distance from Supplied lat / lon

opening_hours
Array

Open Hours for the current day.

Object
order_type
string
Enumeration:
DELIVERY
PICK_UP
open_time
string

HH:MM format string

close_time
number

HH:MM format string

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Participating Merchants
GET /merchants

Search for organisations with active reward commercial terms that participate in one of the customer’s reward schemes

Request parameters

name
string optional

The organisation name (should behave as like)

order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20
sort
string optional

Defines on which attribute the results should be sorted

Examples:
NAMECREATED_DATEUPDATED_DATE
organisations
array of string optional

Defines which organisations will be retrieved

Collection format: csv

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
Body
Object
content
Array
Object
id
string GUID

The organisation identifier

Example:
ef4ba57e-131e-d1b8-709a-b2554baf79ef
name
string

The organisation name

Example:
CRMdotCOM
description
string

The organisation description

Example:
The best rewards company
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Switch Organisations
POST /organisations/{id}/switch

Switch contact to another organisation

Path variables

id
string GUID required

The organisation identifier that will be switched to

Example:
02ee09d0-c227-4479-a2e6-5e9958c7ea78

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

OK

Body
Object
access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
exp
string epoch

The token expiration date

Example:
1572530655
contact
Object

Details about the authorised contact

title
string

The contact’s title

Example:
Mr
first_name
string

The contact’s first name

Example:
John
last_name
string

The contact’s last name

Example:
Doe
avatar
string

The contact’s avatar

Example:
avatar
is_verified
boolean

Defines whether the used identity is verified

Example:
false
organisations
Array

Details about the organisations that the contact has joined

Object
external_id
string GUID

The organisation’s external identifier

Example:
QWERTY12345671234567324ETFTGBY78
org_type
string

The organisation type

Enumeration:
SERVICE_OWNER
ORGANISATION
org_relationship
string

The organisation relationship

Enumeration:
BUSINESS
SUBSIDIARY
MERCHANT
name
string

The organisation name

Example:
CRMdotCOM
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
POST https://sandbox.crm.com/self-service/v1/organisations/02ee09d0-c227-4479-a2e6-5e9958c7ea78/switch HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "ORGANISATION",
            "org_relationship": "MERCHANT",
            "name": "CRMdotCOM"
        }
    ]
}
Product Catalog
GET /products
GET /products/{id}
GET /products/{id}/variants
GET /products/{id}/components
Search Products
GET /products

Retrieves a list of products that can be purchased by customers through an order, filtered by their category, type etc. Modifier and Variant products are excluded.

Request parameters

name
string optional

Filter based on product name (search based on like, for a minimum of three characters search with CONTAINS and case insensitive)

owned_by
string optional

The organisation owning the product catalog (the subsidiary, merchant or venue from which the products will be purchased)

fulfilled_by
string optional

The organisation that wlil fulfill a customer’s request for product purchasing

type_id
string GUID optional

Filter based on product type

Example:
dccb219b-1304-95de-61f8-03b4b824a428
category_id
string GUID optional

Filter based on product category

Example:
dccb219b-1304-95de-61f8-03b4b824a428
brand_id
string GUID optional

Filter based on product brand

Example:
dccb219b-1304-95de-61f8-03b4b824a428
family_id
string GUID optional

Filter based on product family

Example:
dccb219b-1304-95de-61f8-03b4b824a428
supply_method
string optional

Filter based on product supply method

sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
Body
Object
content
Array
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
sku
string
name
string
description
string
classification
string
type_composition
string
number-of_running_promotions
integer
number_of_components
integer
number_of_variants
integer
number_of_variant_attributes
integer
number_of_prices
integer
availability
string
categories
Array
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
type
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
family
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
brand
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
pricing
Array
Object
price
string
currency
string
tax_model
string
rate_model
string
supply_method
string
taxes
Array
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
tax_code
string
Example:
VAT
percentage
integer
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/products HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "7CD9C84FA60F9FE407140E20F707726A",
            "sku": "ABC12345",
            "name": "Latte",
            "description": "Coffee Latte",
            "classification": "NON_TRACEABLE_PHYSICAL_GOOD",
            "type_composition": "COMPOSITE",
            "number_of_running_promotions": 3,
            "number_of_components": 1,
            "number_of_variants": 3,
            "number_of_variant_attributes": 1,
            "number_of_prices": 3,
            "availability": "ENABLED",
            "categories": [
                {
                    "id": "",
                    "name": "Drinks"
                }
            ],
            "type": {
                "id": "",
                "name": ""
            },
            "family": {
                "id": "",
                "name": ""
            },
            "brand": {
                "id": "",
                "name": ""
            },
            "pricing": [
                {
                    "price": "1.99",
                    "currency": "EUR",
                    "tax_model": "TAX_INCLUSIVE",
                    "rate_model": "FLAT",
                    "supply_method": "DELIVERY",
                    "taxes": [
                        {
                            "id": "",
                            "name": "Standard VAT",
                            "tax_code": "VAT",
                            "percentage": 19
                        }
                    ]
                }
            ],
            "creatives": [
                {
                    "id": "CA123456789AQWSXZAQWS1236547896541",
                    "usage_type": "",
                    "width": 2159,
                    "height": 3075,
                    "format": "jpg",
                    "url": "https://assets.crm.com/image/offer.jpg",
                    "public_id": "crm-com/image",
                    "media": [
                        {
                            "width": 200,
                            "height": 300,
                            "url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
                        }
                    ]
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Get Product
GET /products/{id}

Get the product, its base price, indication that there are running promotions or its components

Path variables

id
string GUID required

The product identifier that will be retrieved

Example:
8c939607-2262-544d-99ef-4634c6e8836d

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
Body
Object
id
string GUID
Example:
7CD9C84FA60F9FE407140E20F707726A
sku
string
Example:
ABC12345
name
string
Example:
Base TV
description
string
Example:
Basic TV & myFlix
classification
string
Example:
TERMED_SERVICE
type_composition
string
Example:
FLEXIBLE_BUNDLE
number_of_running_promotions
integer
Example:
2
number_of_prices
integer
Example:
3
number_of_variant_attributes
integer
Example:
1
number_of_variants
integer
Example:
3
availability
string
Example:
DISABLED
type
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
categories
Array

The product categories

Object
id
string GUID

The category identifier

Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string

The category name

family
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
brand
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
composition
Array
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
item_type
string
Enumeration:
PRODUCT
TYPE
FAMILY
CATEGORY
item_id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
sku
string
name
string
minimum_quantity
integer
Example:
1
maximum_quantity
integer
Example:
3
mandatory
boolean
Example:
true
classification
string
Example:
MODIFIER
price_inclusive
boolean
Example:
true
pricing
Array
Object
price
number
Example:
9.99
currency
string
Example:
EUR
rate_model
string
Example:
FLAT
tax_model
string
Example:
TAX_INCLUSIVE
supply_method
string
Example:
DELIVERY
taxes
Array
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
19
upsells
Array
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
sku
string
name
string
description
string
crosssells
Array
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
sku
string
name
string
description
string
variant_attributes
Array
Object
key
string
Example:
size
label
string
Example:
Size
value
string
Example:
Small
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/products/{id}/ HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "7CD9C84FA60F9FE407140E20F707726A",
    "sku": "ABC12345",
    "name": "Base TV",
    "description": "Basic TV & myFlix",
    "classification": "TERMED_SERVICE",
    "type_composition": "FLEXIBLE_BUNDLE",
    "number_of_running_promotions": 2,
    "number_of_prices": 3,
    "number_of_variant_attributes": 1,
    "number_of_variants": 3,
    "availability": "DISABLED",
    "type": {
        "id": "",
        "name": ""
    },
    "category": {
        "id": "",
        "name": ""
    },
    "family": {
        "id": "",
        "name": ""
    },
    "brand": {
        "id": "",
        "name": ""
    },
    "composition": [
        {
            "id": "",
            "item_type": "PRODUCT",
            "item_id": "",
            "sku": "",
            "name": "",
            "minimum_quantity": 1,
            "maximum_quantity": 3,
            "mandatory": true,
            "classification": "MODIFIER",
            "price_inclusive": true
        }
    ],
    "pricing": [
        {
            "price": 9.99,
            "currency": "EUR",
            "rate_model": "FLAT",
            "tax_model": "TAX_INCLUSIVE",
            "supply_method": "DELIVERY",
            "taxes": [
                {
                    "id": "",
                    "name": "",
                    "tax_code": "VAT",
                    "percentage": 19
                }
            ]
        }
    ],
    "upsells": [
        {
            "id": "",
            "sku": "",
            "name": "",
            "description": ""
        }
    ],
    "crosssells": [
        {
            "id": "",
            "sku": "",
            "name": "",
            "description": ""
        }
    ],
    "variant_attributes": [
        {
            "key": "size",
            "label": "Size",
            "value": "Small"
        }
    ],
    "creatives": [
        {
            "id": "CA123456789AQWSXZAQWS1236547896541",
            "type": "",
            "width": 2159,
            "height": 3075,
            "format": "jpg",
            "url": "https://assets.crm.com/image/offer.jpg",
            "public_id": "crm-com/image",
            "media": [
                {
                    "width": 200,
                    "height": 300,
                    "url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
                }
            ]
        }
    ]
}
Get Product Variants
GET /products/{id}/variants

Get the detailed information of a composite product’s variant products, their prices, composition etc.

Path variables

id
string GUID required

The product identifier whose variants will be retrieved

Example:
2f6a70b6-84d4-2859-d230-093cb7e95c62

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
Body
Array
Object
id
string GUID
Example:
7CD9C84FA60F9FE407140E20F707726A
sku
string
Example:
ABC12345
name
string
Example:
Small Latte
description
string
Example:
Small Latte
type_composition
string
Example:
FLEXIBLE_BUNDLE
pricing
Array
Object
price
number
Example:
9.99
currency
string
Example:
EUR
rate_model
string
Example:
FLAT
tax_model
string
Example:
TAX_INCLUSIVE
supply_method
string
Example:
DELIVERY
taxes
Array
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
19
variant_attributes
Array
Object
key
string
Example:
size
value
string
Example:
Small
label
string
Example:
Size
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/products/2f6a70b6-84d4-2859-d230-093cb7e95c62/variants HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "id": "7CD9C84FA60F9FE407140E20F707726A",
        "sku": "ABC12345",
        "name": "Small Latte",
        "description": "Small Latte",
        "type_composition": "FLEXIBLE_BUNDLE",
        "pricing": [
            {
                "price": 9.99,
                "currency": "EUR",
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "supply_method": "DELIVERY",
                "taxes": [
                    {
                        "id": "",
                        "name": "",
                        "tax_code": "VAT",
                        "percentage": 19
                    }
                ]
            }
        ],
        "variant_attributes": [
            {
                "key": "size",
                "value": "Small",
                "label": "Size"
            }
        ],
        "creatives": [
            {
                "id": "CA123456789AQWSXZAQWS1236547896541",
                "usage_type": "LOGO",
                "width": 2159,
                "height": 3075,
                "format": "jpg",
                "url": "https://assets.crm.com/image/offer.jpg",
                "public_id": "crm-com/image",
                "media": [
                    {
                        "width": 200,
                        "height": 300,
                        "url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
                    }
                ]
            }
        ]
    }
]
Get Product Components
GET /products/{id}/components

Returns a list of products that could be added as components of a flexible bundle

Path variables

id
string GUID required

The product identifier whose components will be retrieved

Example:
2f6a70b6-84d4-2859-d230-093cb7e95c62

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
Body
Array
Object
item_type
string
Enumeration:
PRODUCT
CATEGORY
TYPE
FAMILY
item_id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
mandatory
boolean
Example:
true
classification
string
Example:
MODIFIER
price_inclusive
boolean
Example:
true
minimum_quantity
integer
Example:
1
maximum_quantity
integer
Example:
3
products
Array
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
sku
string
name
string
description
string
pricing
Array
Object
price
number
Example:
9.99
currency
string
Example:
EUR
rate_model
string
Example:
FLAT
tax_model
string
Example:
TAX_INCLUSIVE
supply_method
string
Example:
DELIVERY
taxes
Array
Object
id
string GUID
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/products/2f6a70b6-84d4-2859-d230-093cb7e95c62/components HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "item_type": "PRODUCT",
        "item_id": "8c939607-2262-544d-99ef-4634c6e8836d",
        "name": "",
        "mandatory": true,
        "classification": "MODIFIER",
        "price_inclusive": true,
        "minimum_quantity": 1,
        "maximum_quantity": 3,
        "products": [
            {
                "id": "8c939607-2262-544d-99ef-4634c6e8836d",
                "sku": "",
                "name": "",
                "description": "",
                "pricing": [
                    {
                        "price": 9.99,
                        "currency": "EUR",
                        "rate_model": "FLAT",
                        "tax_model": "TAX_INCLUSIVE",
                        "supply_method": "DELIVERY",
                        "taxes": [
                            {
                                "id": "8c939607-2262-544d-99ef-4634c6e8836d",
                                "name": "",
                                "tax_code": "VAT",
                                "percentage": 1
                            }
                        ]
                    }
                ],
                "creatives": [
                    {
                        "id": "CA123456789AQWSXZAQWS1236547896541",
                        "usage_type": "ATTACHMENT",
                        "width": 2159,
                        "height": 3075,
                        "format": "jpg",
                        "url": "https://assets.crm.com/image/offer.jpg",
                        "public_id": "crm-com/image",
                        "media": [
                            {
                                "width": 200,
                                "height": 300,
                                "url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
                            }
                        ]
                    }
                ]
            }
        ]
    }
]
Rewards

Rewards API

GET /reward_schemes
GET /reward_offers
Search Reward Schemes
GET /reward_schemes

Retrieve all active reward schemes

Request parameters

name
string optional

The reward scheme name

Example:
CRMdotCOM Reward Scheme
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information about the reward schemes that are available

Object
id
string GUID

The reward scheme identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The reward scheme name

Example:
Loyalty Scheme
description
string

The reward scheme description

Example:
Lorem Ipsum
terms_and_conditions
string

The terms and conditions for the retrieved reward scheme

Example:
Only CRMdotCOM domain customer can sign up
sign_up_option
string

Defines how customer can sign up to the reward scheme

Enumeration:
AUTO_SIGN_UP
SELF_SIGN_UP
CLOSE_LOOP_SIGN_UP
is_joined
boolean

Defines whether the reward scheme is already joined by the customer

Example:
false
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/reward_schemes HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Loyalty Scheme",
            "description": "Lorem Ipsum",
            "terms_and_conditions": "Only CRMdotCOM domain customer can sign up",
            "sign_up_option": "SELF_SIGN_UP",
            "is_joined": "false"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Search Reward Offers
GET /reward_offers

Retrieve all active reward offers that are applicable for a specific customer

Request parameters

industry
array of string GUID optional

Information about the industries that should be used as a filter

Collection format: csv
Unique items: YES
industry_sector
array of string GUID optional

Information about the industry sectors that should be used as a filter

Collection format: csv
Unique items: YES
town_city
array of string optional

Information about the merchant/outlet location that should be used as a filter

Collection format: csv
Unique items: YES
organisations
array of string GUID optional

Filter based on the organisation that the offers are created for

Collection format: csv
Unique items: YES
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information about the retrieved reward offers

Object
id
string GUID

The reward offer identifier

Example:
6A24D2B5E44F44B28451FE021FCAD51E
name
string

The reward offer name

Example:
10% off on any purchase
reward_scheme
Object

Infromation about the reward scheme of this offer

id
string GUID

The reward scheme identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The reward scheme name

Example:
Loyalty Scheme
short_description
string

The reward offer short description

Example:
Short Description
long_description
string

The reward offer long description

Example:
Long Description
terms_and_conditions
string

The terms and conditions for the retrieved reward offer

Example:
Terms & Conditions
owned_by
Object

Information about the organisation that owns the reward offer

id
string GUID

The organisation identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68987
name
string

The organisation name

Example:
Pizza Yummy
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
is_featured
boolean

Defines whether the reward offer is featured or not

Example:
false
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /reward_offers HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "6A24D2B5E44F44B28451FE021FCAD51E",
            "name": "10% off on any purchase",
            "reward_scheme": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "Loyalty Scheme"
            },
            "short_description": "Short Description",
            "long_description": "Long Description",
            "terms_and_conditions": "Terms & Conditions",
            "owned_by": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68987",
                "name": "Pizza Yummy"
            },
            "display_order": 1,
            "is_featured": "false",
            "creatives": [
                {
                    "id": "CA123456789AQWSXZAQWS1236547896541",
                    "type": "",
                    "width": 2159,
                    "height": 3075,
                    "format": "jpg",
                    "url": "https://assets.crm.com/image/offer.jpg",
                    "public_id": "crm-com/image",
                    "media": [
                        {
                            "width": 200,
                            "height": 300,
                            "url": "https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg"
                        }
                    ]
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Settings - Configuration

Lists a number of APIs that can be used for retrieving configuration settings, required by the mobile/web client

GET /addresses
GET /applications
GET /business_activities
GET /industries
GET /industry_sectors
GET /organisation_tags
GET /product_categories
Address Lookup
GET /addresses

Returns a list of addresses based on the external address registry systems that CRM.COM integrates with

Request parameters

integration
string required

The address registry that lookup will be performed

Enumeration:
GOOGLE
address
string required

The address that lookup will be performed against

Example:
Elia Papakyriakou 21, Egkomi, 2415, Nicosia, Cyprus

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information about the retrieved address lookups

Object
address
string

The full address as returned by the address registry

Example:
Elia Papakyriakou, Egkomi, 2415, Nicosia, Cyprus
lat
number

The latitude of the address

Example:
12.234
lon
number

The longitude of the address

Example:
23.453
googlePlaceId
string

The Google textual identifier that uniquely identifies a location

Example:
123d23w23fw322
address_line_1
string

The address information

Example:
Elia Papakyriakou 21
address_line_2
string

Additional information about the address

Example:
7 Tower Stars
state_province_county
string

The state/province/county of the address

Example:
Egkomi
town_city
string

The town/city of the address

Example:
Nicosia
postal_code
string

The postal code of the address

Example:
2415
country_code
string

The country code of the address

Example:
CY
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /address_lookup?integrator=GOOGLE&address=Elia Papakyriakou, Egkomi, 2415, Nicosia, Cyprus HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "address": "Elia Papakyriakou 21, Egkomi, 2415, Nicosia, Cyprus",
            "lat": 12.234,
            "lon": 23.453,
            "googlePlaceId": "123d23w23fw322"
        },
        {
            "address": "Elia Papakyriakou 22, Egkomi, 2415, Nicosia, Cyprus",
            "lat": 12.234,
            "lon": 23.453,
            "googlePlaceId": "123d23w23fw322"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 100
    }
}
Get Application
GET /applications

Retrieve details for a specific application

Request parameters

platform_app_id
string required

The platform application identifier

Example:
f9e4b742-bfe1-09dc-f623-de71aaed61ff
version
string optional

The application version number

Example:
1.1

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Responses

200 200

Successfull Completed

Body
Object
id
string GUID

The application identifier

Example:
0b9ab3de-af32-47f9-faca-ff5c94063819
name
string

The application name

Example:
Brew Coffee App
description
string

The application description

Example:
Best coffee app
app_type
string

The application type

Enumeration:
NATIVE
WEB
appearance
Object

Details about the app appearance

background_color
string

The background color that the app will use as the main color (hex code)

Example:
#eb4034
card_color
string

The color that the app will use on all card like components (hex code)

Example:
#eb4034
text_font
string

The text font style that the app will use

Example:
Open Sans
about_details
Object

Defines the app details (about, terms and conditions, privacy policy)

about
Object

Details about us (URL or contact should be specified)

url
string

The about URL

Example:
https?/crm.com
content
string

The about rich content

Example:
About Us
terms_conditions
Object

Details about the terms and conditions (URL or contact should be specified)

url
string

The terms and conditions URL

Example:
https?/crm.com
content
string

The terms and conditions rich content

Example:
Terms & Conditions
privacy_policy
Object

Details about the privacy policy (URL or contact should be specified)

url
string

The privacy policy URL

Example:
https?/crm.com
content
string

The privacy policy rich content

Example:
Privacy Policy
faqs
Object

Details about the FAQs (URL or contact should be specified)

url
string

The FAQs URL

Example:
https?/crm.com
content
string

The FAQs rich content

Example:
FAQs
contact_us
Object

Details about contact us

email_address
string

The contact us email address

Example:
info@crm.com
phone_country_code
string

The contact us phone number country code

Example:
CYP
phone_number
string

The contact us phone number

Example:
22265566
website
string

The contact us website

Example:
https?/crm.com
features
Object

Details about the features that will be supported by the app

billing
boolean

Defines whether billing feature is supported

Example:
true
rewards
boolean

Defines whether rewards feature is supported

Example:
true
ordering
boolean

Defines whether ordering feature is supported

Example:
true
business_network
boolean

Defines whether business network feature is supported

Example:
false
ordering_details
Object

Defines the supported ordering items (only if ordering feature is supported)

ordering_pickup
boolean

Defines whether pick up is supported as supply method

Example:
true
ordering_delivery
boolean

Defines whether delivery is supported as supply method

Example:
true
rewards_details
Object

Defines the supported rewards items (only if rewards feature is supported)

automatic_spends
boolean

Defines whether automatic spend preferences will be supported

Example:
true
return_cashback
boolean

Defines whether the ability to select payment method for cashback returns will be supported

Example:
true
customer_selfservice_purchases
boolean

Defines whether customer self service purchase identification and OTP request to spend will be supported

Example:
true
reward_tiering
boolean

Defines whether reward tiering will be supported

Example:
false
business_network_details
Object

Defines the supported business network items (only if business network feature is supported)

multitenancy
boolean

Defines whether multitenancy will be supported

Example:
true
auth_support
Object

Details on how customers can auth by the app

email_password
boolean

Supported authentication based on email and password

Example:
true
email_verification
boolean

Email Verification required (if auth method = email & password)

Example:
false
sms_otp
boolean

Supported authentication based on one time password

Example:
true
facebook
boolean

Supported authentication based on Facebook

Example:
true
google
boolean

Supported authentication based on Google

Example:
true
contact
Object

Details on supported contact attributes

profile_details
Array

Lists all supported contact attributes

Object
type
string

The contact attribute

Enumeration:
BIRTHDATE
NAMEDAY
GENDER
is_supported
boolean

Defines if the profile attribute is supported or not

Example:
true
creatives
Array

Creatives images for marketing includes the primary image and scaled versions to create a srcset

Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
LOGO
BACKGROUND
MARKETING
ATTACHMENT
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

Example:
https://assets.crm.com/image/offer.jpg
public_id
string

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/offer.jpg
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/applications?app_id=f9e4b742-bfe1-09dc-f623-de71aaed61ff&version=1.1 HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "0b9ab3de-af32-47f9-faca-ff5c94063819",
    "name": "Brew Coffee App",
    "description": "Best coffee app",
    "app_type": "WEB",
    "appearance": {
        "background_color": "#eb4034",
        "card_color": "#eb4034",
        "text_font": "Open Sans"
    },
    "about_details": {
        "about": {
            "content": "About Us"
        },
        "terms_conditions": {
            "content": "Terms & Conditions"
        },
        "privacy_policy": {
            "url": "https?/crm.com"
        },
        "contact_us": {
            "email_address": "info@crm.com",
            "phone_country_code": "357",
            "phone_number": "22265566",
            "website": "https?/crm.com"
        }
    },
    "features": {
        "billing": false,
        "rewards": true,
        "ordering": true,
        "ordering_details": {
            "ordering_pickup": true,
            "ordering_delivery": true
        },
        "rewards_details": {
            "automatic_spends": true,
            "return_cashback": true,
            "customer_selfservice_purchases": true
        }
    },
    "auth_support": {
        "email_password": true,
        "email_verification": false,
        "sms_otp": true,
        "facebook": true,
        "google": true
    },
    "contact": {
        "profile_details": [
            {
                "type": "BIRTHDATE",
                "is_supported": true
            }
        ]
    }
}
List Business Activities
GET /business_activities

Returns a list of business activities

Request parameters

name
string optional

The name of the business activity

Example:
Bar & Grill
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information about the retrieved business activities

Object
id
string GUID

The business activity identifier

Example:
E4AC253114B84DF2B347996DC277DDDF
name
string

The business activity name

Example:
Bar & Grill
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /business_activities HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "E4AC253114B84DF2B347996DC277DDDF",
            "name": "Bar & Grill"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 100
    }
}
List Industries
GET /industries

Returns a list of industries

Request parameters

name
string optional

The name of the industry

Example:
Education
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information about the retrieved industries

Object
id
string GUID

The industry identifier

Example:
E4AC253114B84DF2B347996DC277DDDF
name
string

The industry name

Example:
Advertising
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /industries HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "E4AC253114B84DF2B347996DC277DDDF",
            "name": "Advertising"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 100
    }
}
List Industry Sectors
GET /industry_sectors

Returns a list of industry sectors

Request parameters

name
string optional

The name of the industry sector

Example:
RESTAURANTS
industry_name
string optional

The name of the industry that multiple sectors belong to

Example:
EDUCATION
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information about the retrieved industry sectors

Object
id
string GUID

The industry sector identifier

Example:
E4AC253114B84DF2B347996DC277DDDF
name
string

The industry sector name

Example:
Consultancy
related_industries
Array
Object
id
string
name
string
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /industry_sectors HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "E4AC253114B84DF2B347996DC277DDDF",
            "name": "Consultancy",
            "related_industries": [
                {
                    "id": "",
                    "name": ""
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 100
    }
}
List Organisation Tags
GET /organisation_tags

Returns a list of organisation tags

Request parameters

name
string optional

The name of the organisation tag

Example:
Bar & Grill
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Information about the retrieved organisation tags

Object
id
string GUID

The organisation tag identifier

Example:
E4AC253114B84DF2B347996DC277DDDF
name
string

The organisation tag name

Example:
Restaurant
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET /organisation_tags HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "E4AC253114B84DF2B347996DC277DDDF",
            "name": "Restaurant"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 100
    }
}
List Product Categories
GET /product_categories

Returns a list of product categories

Request parameters

parent_id
string GUID optional

Retrieve only all child nodes that have as parent this product category

Example:
2ace26a4-2ddf-0774-f7ff-4bb46234c9d1
return_all
boolean optional

Defines whether all product categories (parent and child) should be retrieved or not

Example:
true
available_in_order_menus
boolean optional

Filter product categories on whether to include in the order menu or not

Example:
false
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

Authorization
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The product category identifier

Example:
9365d945-2c62-be0e-a8dc-45736fdfa5b5
name
string

The product category name

Example:
Cold Drinks
description
string

The product category description

Example:
Cold Beverages and Refreshers
child_nodes
integer

The number of the product category’s child nodes

Example:
12
parent
Object

Details about the parent product category (applicable if this category is a child node)

id
string GUID

The parent product category identifier

Example:
9365d945-2c62-be0e-a8dc-45736fdfa5b5
name
string

The parent product category name

Example:
Drinks
available_in_order_menus
boolean

Defines whether the product category should be available in order menu

Example:
true
400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

The API key or Token does not have permissions to perform the request

404 Not Found

The requested resource does not exist

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request

502 Bad Gateway

The server received an invalid response from the upstream server it accessed in attempting to fulfill the request

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance

504 Gateway Timeout

The server did not receive a timely response from the upstream server

Example 1
GET https://sandbox.crm.com/self-service/v1/product_categories HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "fe0bbf83-f7df-d922-dca4-d4e1f20087ea",
    "name": "Cold Drinks",
    "description": "Cold Beverages",
    "child_nodes": 2,
    "parent": {
        "id": "fe0bbf83-f7df-d922-dca4-d4e1f20087ea",
        "name": "Drinks"
    },
    "available_in_order_menus": "false"
}