BackOffice Admin

https://sandbox.crm.com/backoffice/v1
Introduction

Welcome to the CRM.COM Application Programming Interface (API) documentation

The CRM.COM API is designed around REST, allowing you to access and extend the software’s current functionality in a simple, programmatic way using intuitive URL endpoints, conventional HTTP requests, response codes, authentication and verbs.

Back-Office API is designed with a main focus on users and external systems that desire to access and extend the functionality found in CRM.COM.

For the Mobile/Web based Applications API please refer to the Self-Service API documentation that provides more details how to allow customer to manage their subscriptions and/or reward accounts.

Change Log

Release Date 14th Sept 2020

This is the first release of the CRM V5 platform API’s

Authentication

CRM.COM BackOffice API uses either API keys to authenticate requests or an authentication JWT token obtained from a user successful logging in

API keys can be accessed and managed in the CRM.COM Dashboard. Such API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code and so forth

All API requests must be made over HTTPS. API requests made over plain HTTP or without authentication will fail. API keys authentication is made using -H “api_key : crm_test_;dwfwgiuhjr412edws”, while User Bearer Auth is achieved using -H “Authorization: Bearer JWT_TOKEN”

Unique Resource Identifiers

CRM.COM is built on a domain based micro-service architecture. Our primary resources such as Contact, Account, Wallet, Products, Subscriptions are all created with a unique identifier that uses a performant time based GUID. These are generated when a new resource such as a contact is created. However in some cases external integration may wish to use a unique identfier that is stored in an external system, such as a Bank CIF or Credit Card fingerprint.

Some systems allow from their create APIs to supply a unique identifier as part of the request body. CRM.COM has decided to provide an alternative approach and make an alternative unique identifier available on resources (e.g. on Contacts we provide the contact.code). If such attribute is specified during the create operation it wil be available on subsequent operations as a resource’s identifier, alongside with the GUID that is returned in the response body. Updating such resource can be achieved either using PUT /contact/GUID or PUT /contact/CODE.

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 200

The request has succeeded

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Operations
Accounts
POST /contacts/{id}/accounts
GET /contacts/{id}/accounts
PUT /accounts/{id}
POST /accounts/{id}/life_cycle_state
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 that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
classification_id
string GUID nullable

The account’s classification ID

Example:
4AD9C84FA60F9FE407140E20F707726A
currency_code
string nullable

The account’s currency

Example:
USD
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:
true
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

Responses

200 200

OK

Body
Object
id
string GUID

The account identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1 

Content-Type: application/json

{
    "classification_id": "4AD9C84FA60F9FE407140E20F707726A",
    "currency_code": "USD",
    "is_primary": true,
    "billing_address_id": "4AD9C84FA60F9FE407140E20F707726A"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
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
boolean 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

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10
order
string optional

Defines how the results will be ordered

Default:
DESC

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

Body
Object
content
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:
Default
number
string

The Account number

Example:
AC123456
life_cycle _state
string

The account’s life cycle state

Enumeration:
ACTIVE
SUSPENDED
TERMINATED
currency_code
string

The account’s currency

classification
Object

The account’s classification

id
string GUID

The classification identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The classification name

Example:
VIP
balance
number

The account’s calculated balance

Example:
200
credit_limit
number

The account’s credit limit

Example:
100
overdue_amount
number

The unpaid amount that is passed its due date

Example:
50
billing_address_id
string GUID

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

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
wallet
Object

The account’s wallet information (if available)

id
string GUID

The wallet identifier

Example:
6A24D2B5E44F44B28451FE021FCAD51E
code
string
Example:
1234567898767543
balance
number
Example:
200.2
currency_code
string
Example:
EUR
life_cycle_state
string

The wallet’s life cycle state

Enumeration:
EFFECTIVE
CANCELLED
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "accounts": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "is_primary": true,
            "name": "Default",
            "number": "AC123456",
            "life_cycle _state": "ACTIVE",
            "currency_code": "",
            "classification": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "VIP"
            },
            "balance": 200,
            "credit_limit": 100,
            "overdue_amount": 50,
            "billing_address_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "wallet": {
                "id": "6A24D2B5E44F44B28451FE021FCAD51E",
                "code": "1234567898767543",
                "balance": 200.2,
                "currency_code": "EUR",
                "life_cycle_state": "CANCELLED"
            }
        }
    ]
}
Update Account
PUT /accounts/{id}

Update the account of a contact

Path variables

id
string GUID required

The account identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

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 200

OK

Body
Object
id
string GUID

The account identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

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's Life Cycle State
POST /accounts/{id}/life_cycle_state

Change the life cycle state of the Account

Path variables

id
string GUID required

The account identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
life_cycle_state
string required

The life cycle state that the account will changed into

Enumeration:
TERMINATED
SUSPENDED
ACTIVE
transfer_to_account_id
string GUID nullable

The account to which any account/wallet balance will get transfered, in case of Termination

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the account

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

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

Content-Type: application/json

{
    "life_cycle_state": "TERMINATED",
    "transfer_to_account_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Account Financials
GET /accounts/{id}/financials
POST /accounts/{id}/members
PUT /accounts/{id}/members/{member_id}
DELETE /accounts/{id}/members/{member_id}
GET /accounts/{id}/members
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:
4AD9C84FA60F9FE407140E20F707726A

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

Body
Object
name
string

The account’s name

Example:
John Smith AC00123456
number
string

The account’s number

Example:
AC00123456
is_primary
boolean

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
number

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:
98
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
number

The commerce balance of the wallet

Example:
98
open_balance
number

The open balance of the wallet

life_cycle_state
string

The wallet’s life cycle state

Enumeration:
EFFECTIVE
TERMINATED
minimum_balance
number

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

Example:
9
limit_rules
Array

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

Object
minimum_amount
number

The minimum amount allowed

Example:
100.5
maximum_amount
number

The maximum amount allowed

Example:
200
period
string

The period for which the limit is applied

Enumeration:
DAILY
MONTHLY
ANNUAL
transaction_type
string

The wallet transaction type for which the limit is applied

Enumeration:
CREDIT
DEBIT
TOPUP
TRANSFER
auto_topup
Object
threshold
number

Sets the threshold for the auto topup to be performed

Example:
10.5
amount
number

The amount to get topped up

Example:
10.5
payment_method
string

Indicates the method of collecting money

Enumeration:
CASH
BANK_TRANSFER
CARD
DIRECT_DEBIT
WALLET
PAYPAL
ACCOUNT
payment_method_id
string

The contact’s actual preferred payment method. Required and mandatory only for online payments (Card, Wallet, PayPal and Account). Defaults to the primary payment method, if any.

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
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/accounts/4AD9C84FA60F9FE407140E20F707726A/financials HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "John Smith AC00123456",
    "number": "AC00123456",
    "is_primary": "true",
    "life_cycle_state": "SUSPENDED",
    "currency_code": "EUR",
    "balance": 200,
    "overdue_amount": 100.5,
    "credit_limit": 98,
    "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": "EFFECTIVE",
            "minimum_balance": 9,
            "limit_rules": [
                {
                    "minimum_amount": 100.5,
                    "maximum_amount": 200,
                    "period": "ANNUAL",
                    "transaction_type": "TRANSFER"
                }
            ],
            "auto_topup": {
                "threshold": 10.5,
                "amount": 10.5,
                "payment_method": "PAYPAL",
                "payment_method_id": ""
            }
        }
    ],
    "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"
    }
}
Add Account Member
POST /accounts/{id}/members

Add new member on an account group.

Path variables

id
string GUID required

The account identifier that will add a member in its group

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
member_account_id
string

The account to join

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
funding_scope
string

The funding scope that the account joins the group

Enumeration:
FULLY
PARTIALLY
products
Array

The funded products of the member account

string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
product_types
Array
string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
product_families
Array
string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the account

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/members HTTP/1.1 

Content-Type: application/json

{
    "member_account_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "funding_scope": "PARTIALLY",
    "products": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "product_types": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "product_families": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Update Account Member
PUT /accounts/{id}/members/{member_id}

Update a member of this account group

Path variables

id
string GUID required

The account identifier that the member belongs to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
member_id
string GUID required

The member account identifier to be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
funding_scope
string

The funding scope that the account joins the group

Enumeration:
FULLY
PARTIALLY
products
Array

The funded products of the member account

string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
product_types
Array
string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
product_families
Array
string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the account

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/members/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Content-Type: application/json

{
    "funding_scope": "FULLY",
    "products": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "product_types": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "product_families": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Remove Account Member
DELETE /accounts/{id}/members/{member_id}

Remove a member account from an account group

Path variables

id
string GUID required

The account identifier that the member belongs to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
member_id
string GUID required

The member account identifier to be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the account

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
DELETE https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/members/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
List Account Members
GET /accounts/{id}/members

Lists the members of an account

Path variables

id
string GUID required

The account identifier for which the members will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
members
Array
Object
id
string GUID

The member account’s unique identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
number
string

The member account’s number

Example:
AC123456
funding_scope
string

The funding scope that the account joins the group

Enumeration:
FULLY
PARTIALLY
products
Array
Object
id
string GUID

The unique identifier of the funded product

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
sku
string

The SKU of the funded product

Example:
ABC123
product_types
Array
Object
id
string GUID

The unique identifier of the funded product type

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the funded product type

Example:
FOOD
product_families
Array
Object
id
string GUID

The unique identifier of the funded product family

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the funded product family

Example:
COFFEE

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the account

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/members HTTP/1.1 

Content-Type: application/json

{
    "members": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "number": "AC123456",
            "funding_scope": "PARTIALLY",
            "products": [
                {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "sku": "ABC123"
                }
            ],
            "product_types": [
                {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "name": "FOOD"
                }
            ],
            "product_families": [
                {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "name": "COFFEE"
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Account Wallets
POST /accounts/{id}/wallets
PUT /wallets/{id}
POST /wallets/{id}/actions
GET /wallets/{id}/balances
POST /journals
Add Wallet for Account
POST /accounts/{id}/wallets

Add a new wallet for an existing account

Path variables

id
string GUID required

The account identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
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
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

Responses

200 200

OK

Body
Object
id
string GUID

The wallet identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/wallets HTTP/1.1 

Content-Type: application/json

{
    "minimum_balance": 10,
    "limit_rules": [
        {
            "limit_amount": 100,
            "transaction_type": "DEBIT",
            "period": "DAILY"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Update Wallet
PUT /wallets/{id}

Update the wallet of an account

Path variables

id
string GUID required

The wallet identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
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
minimum_amount
number

The minimum amount allowed

Example:
100
maximum_amount
number

The maximum amount allowed

Example:
200
period
string

The period for which the limit is applied

Enumeration:
DAILY
MONTHLY
ANNUAL
transaction_type
string

The wallet transaction type for which the limit is applied

Enumeration:
CREDIT
DEBIT
TOPUP
TRANSFER
auto_topup
Object
threshold
number

Sets the threshold for the auto topup to be performed

Example:
10.5
amount
number

The amount to get topped up

Example:
10.5
payment_method
string

Indicates the method of collecting money

Enumeration:
CASH
BANK_TRANSFER
CARD
DIRECT_DEBIT
WALLET
PAYPAL
ACCOUNT
payment_method_id
string

The contact’s actual preferred payment method. Required and mandatory only for online payments (Card, Wallet, PayPal and Account). Defaults to the primary payment method, if any.

Responses

200 200

OK

Body
Object
id
string GUID

The wallet identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://stagingapi.crm.com/backoffice/v1/wallets/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Content-Type: application/json

{
    "minimum_balance": 10,
    "limit_rules": [
        {
            "minimum_amount": 100,
            "maximum_amount": 200,
            "period": "DAILY",
            "transaction_type": "TRANSFER"
        }
    ],
    "auto_topup": {
        "threshold": 10.5,
        "amount": 10.5,
        "payment_method": "ACCOUNT",
        "payment_method_id": ""
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
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 optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

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 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the wallet

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/wallets/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "EFFECTIVE"
}

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:
4AD9C84FA60F9FE407140E20F707726A

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 se to true, then the expiration information will also be retrieved

Example:
true
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

Body
Array
Object
amount
number

The amount that is allocated to the specified spend condition

Example:
100.5
id
string

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

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
Array

The time when the amount can be spent

Object
month
integer

The month as a condition (1-12)

Example:
1
day
integer

The day of the week as condition (1-7), 1 is Sunday

Example:
1
start_time
string

The start time of the day in 24 Hour format

Example:
19:00
end_time
string

The end time of the day in 24 Hour format

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
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/wallets/4AD9C84FA60F9FE407140E20F707726A/balances HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "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": [
            {
                "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
        }
    }
]
Create Wallet Journal
POST /journals

Create a wallet debit or credit journal entry

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
wallet_id
string GUID

The unique identifier for which the journal entry will be created

Example:
4AD9C84FA60F9FE407140E20F707726A
amount
number

The amount of the journal

Example:
10
type
string

The type of the journal

Enumeration:
CREDIT
DEBIT
description
string

The description of the journal

Example:
Credit adjustment by 10 EUR
spend_condition_id
string GUID

The unique identifier of the related spend condition

Example:
4AD9C84FA60F9FE407140E20F707726A
valid_from
integer epoch

The valid from date

Example:
1587988965
valid_to
integer epoch

The valid to date

Example:
1587988965
created_on
integer epoch

The date and time when the journal actually created

Example:
1588081851
allow_below_zero
boolean

Allows a wallet debit journal to take the wallet balance below zero. By default, the wallet balance cannot go below zero.

Example:
true

Responses

200 200

OK

Body
Object
id
string GUID

The wallet journal identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://devapi.crm.com/backoffice/v1/journals HTTP/1.1 

Content-Type: application/json

{
    "wallet_id": "4AD9C84FA60F9FE407140E20F707726A",
    "amount": 10,
    "type": "DEBIT",
    "description": "Credit adjustment by 10 EUR",
    "spend_condition_id": "4AD9C84FA60F9FE407140E20F707726A",
    "valid_from": 1587988965,
    "valid_to": 1587988965,
    "created_on": 1588081851
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Account Rewards
PUT /accounts/{id}/rewards
GET /accounts/{id}/rewards
POST /accounts/{id}/merchants
DELETE /accounts/{id}/merchants/{merchant_id}
POST /accounts/{id}/reward_schemes
DELETE /accounts/{id}/reward_schemes/{reward_scheme_id}
Update Account Rewards
PUT /accounts/{id}/rewards

Update the reward attributes of the primary account of a contact

Path variables

id
string GUID required

The account identifier whose reward attributes will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Notes

Only Primary Accounts of a Contact hold Reward information

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
signed_up_on
integer epoch nullable

The date that the customer first signed up

Example:
1583846865
signed_up_organisation_id
string GUID nullable

The organisation identifier that signed up the customer (first time)

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
spending_blocked_status
boolean nullable

Defines whether the spending is blocked for the specific account

Example:
true
automatic_spend_settings
Object nullable

Information about the automatic spend settings for the account

enable_automatic_spend
boolean required

Defines whether automatic spend is enabled for the account

Example:
false
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

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

Example:
1.76
preferred_payment_method_id
string GUID nullable

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:
CAD1E31269B76D7A65ACCE45B2E68DCD

Responses

200 200

OK

Body
Object
id
string GUID

The account identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/rewards HTTP/1.1 

Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A

{
    "signed_up_on": 1583846865,
    "signed_up_organisation_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "spending_blocked_status": "true",
    "automatic_spend_settings": {
        "enable_automatic_spend": "false",
        "automatic_spend_preference": "ALL_MERCHANT_PURCHASE",
        "minimum_wallet_balance": 1,
        "from_purchase_amount": 1.76
    },
    "preferred_payment_method_id": "CAD1E31269B76D7A65ACCE45B2E68DCD"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Get Account Rewards
GET /accounts/{id}/rewards

Retrieve the Rewards details if a single account

Path variables

id
string GUID required

The unique identification of the Account to be retrieved.

Example:
4AD9C84FA60F9FE407140E20F707726A

Notes

Only Primary Accounts of a Contact hold Reward information

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

Body
Object
id
string GUID

The account identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The account’s name

Example:
John Smith AC00123456
number
string

The account’s number

Example:
AC00123456
currency_code
string

The account’s currency (3 code currency)

Example:
EUR
signed_up_on
integer epoch

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

Example:
1583846865
sign_up_organisation
Object

Information about the organisation that sign up the account for the first time

id
string GUID

The organisation identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation name

Example:
CRMdotCOM
spending_blocked_status
boolean

Defines whether the account can spend or not

Example:
false
spending_blocked_date
integer epoch

The date that the spending status of the account was updated

Example:
1583846865
spending_blocked_user
Object

Information about the user that updated the spending status of the account

id
string GUID

The user identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
email_address
string

The user’s email address

Example:
johndoe@crm.com
first_name
string

The user’s first name

Example:
John
last_name
string

The user’s last name

Example:
Doe
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:
0.52
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:
1.78
merchants
Array

Information about the merchants that automatic spending is allowed

Object
id
string GUID

The merchant record identifier

Example:
REC1E31269B76D7A65ACCE45B2E68DFD
is_next_visit
boolean

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

Example:
false
organisation
Object

Information about organisation

id
string GUID

The organisation identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation name

Example:
Bravo Coffee
reward_tier
Object

Information about the account’s reward tier

id
string GUID

The reward tier identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The reward tier name

Example:
Gold
color
string

The designated hexadecimal code of the tier’s color

Example:
#d4af37
period_value_units
number

The account’s value units that accumulated during the last rolling period

Example:
222
lifetime_value_units
number

The account’s value units that accumulated overall

Example:
333
next_tier_progression
number

The progression percentage until the next reward tier is reached

Example:
45.98
tier_progression
Array

Details about The progression percentage for each reward tier

Object
percentage
number

The progression percentage until the reward tier

Example:
45.98
tier
Object

Details about the reward tier

id
string GUID

The reward tier identifier

Example:
41ed2390-4058-81a2-d41b-18acaea22c84
name
string

The reward tier name

Example:
Gold
value_units
integer

The tier (threshold) value units (inclusive)

Example:
2500
remaining_value_units
integer

The remaining value units to reach this tier

Example:
123
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
sign_up_option
string

Defines how customers can sign up to the reward scheme

Enumeration:
AUTO_SIGN_UP
SELF_SIGN_UP
CLOSE_LOOP_SIGN_UP
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
DIRECT_DEBIT
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
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/accounts/4AD9C84FA60F9FE407140E20F707726A/rewards HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "John Smith AC00123456",
    "number": "AC00123456",
    "currency_code": "EUR",
    "signed_up_on": 1583846865,
    "sign_up_organisation": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "CRMdotCOM"
    },
    "spending_blocked_status": "false",
    "spending_blocked_date": 1583846865,
    "spending_blocked_user": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "email_address": "johndoe@crm.com",
        "first_name": "John",
        "last_name": "Doe"
    },
    "automatic_spend_settings": {
        "automatic_spend_preference": "NEXT_MERCHANT_PURCHASE",
        "minimum_wallet_balance": 0.52,
        "from_purchase_amount": 1.78,
        "allowed_merchants": [
            {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "CRMdotCOM"
            }
        ]
    },
    "reward_tier": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "Gold",
        "color": "#d4af37",
        "period_value_units": 222,
        "lifetime_value_units": 333,
        "next_tier_progression": 45.98
    },
    "joined_reward_schemes": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "CRMdotCOM Scheme"
            "signed_up_on": 1583846865,
            "email_address": "johndoe@crm.com",
            "sign_up_option": "CLOSE_LOOP_SIGN_UP"
        }
    ]
}
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 whose reward attributes will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
merchants
Array required

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

Unique items: YES
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

Responses

200 200

OK

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

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants HTTP/1.1 

Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A

{
    "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/{merchant_id}

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

Path variables

id
string GUID required

The account identifier whose reward attributes will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
merchant_id
string GUID required

The merchant identifier that will be removed from the spend preferences

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
DELETE https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Sign up to a Reward Scheme
POST /accounts/{id}/reward_schemes

Sign up 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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
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 close loop reward scheme

Example:
ABCDEFG1234
sign_up_date
integer epoch nullable

The date that the account has signed up (if not specified, defaults to current date)

Example:
1589796854

Responses

200 200

OK

Body
Object
id
string GUID

The reward scheme identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DXD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes HTTP/1.1 

Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A

{
    "reward_scheme_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "email_address": "johndoe@crm.com",
    "sign_up_code": "ABCDEFG1234"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DXD"
}
Sign out from a Reward Scheme
DELETE /accounts/{id}/reward_schemes/{reward_scheme_id}

Sign out the account from a specific reward scheme

Path variables

id
string GUID required

The account that will be signed off from the reward scheme

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
reward_scheme_id
string GUID required

The reward scheme identifier that the account has signed off

Example:
CAD1E31269B76D7A65ACCE45B2E68DXD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
DELETE https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes/CAD1E31269B76D7A65ACCE45B2E68DXD HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Activities
POST /activities
PUT /activities/{id}
DELETE /activities/{id}
PUT /activities/{id}/life_cycle_state
GET /activities
GET /activities/{id}
Create Activity
POST /activities

Create a new activity

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
subject
string required

The activity subject

Example:
Call customer
description
string nullable

The activity description

Example:
We need to call the customer (after 4pm) in order to schedule a demo
organisation_id
string GUID required

The organisation identifier from which a user wil be responsible to complete this activity (organisation or user should be specified)

Example:
CEEE83D6E0804A30966F684B0269ROLE
user_id
string GUID nullable

The user identifier that is responsible to complete this activity (user should belong to the specified organisation)

Example:
CEEE83D6E0804A30966F684B0269USER
entity
Object

Related entity details

type
string

The type of the related entity

Enumeration:
ORDER
LEAD
SERVICE_REQUEST
id
string GUID

The related entity identifier

Example:
CEEE83D6E0804A30966F684B0269AD91

Responses

200 200

Successful Request

Body
Object
id
string GUID

The activity identifier that was created

Example:
QWERTY1234543212345678UJIKY76HJR
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://devapi.crm.com/backoffice/v1/activities HTTP/1.1 

Content-Type: application/json

{
    "subject": "Call customer",
    "description": "We need to call the customer (after 4pm) in order to schedule a demo",
    "organisation_id": "CEEE83D6E0804A30966F684B0269ROLE"
    "entity": {
        "type": "LEAD",
        "id": "CEEE83D6E0804A30966F684B0269AD91"
    }
}
Update Activity
PUT /activities/{id}

Update an existing activity

Path variables

id
string GUID required

The activity identifier that will be updated

Example:
QWERTY1234543212345678UJIKY76HJR

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
subject
string nullable

The activity subject

Example:
Approve Offers
description
string nullable

The activity description

Example:
Require 4 approvals for an offer
organisation_id
string GUID nullable

The organisation identifier from which a user wil be responsible to complete this activity (organisation or user should be specified)

Example:
CEEE83D6E0804A30966F684B0269ROLE
user_id
string GUID nullable

The user identifier that is responsible to complete this activity (user should belong to the specified organisation)

Example:
CEEE83D6E0804A30966F684B0269USER

Responses

200 200

Successful Request

Body
Object
id
string GUID

The activity identifier that was updated

Example:
QWERTY1234543212345678UJIKY76HJR
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://devapi.crm.com/backoffice/v1/activities/QWERTY1234543212345678UJIKY76HJR HTTP/1.1 

Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A

{
    "subject": "Approve Offers",
    "description": "Require 4 approvals for an offer",
    "organisation_id": "CEEE83D6E0804A30966F684B0269ROLE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "QWERTY1234543212345678UJIKY76HJR"
}
Delete Activity
DELETE /activities/{id}

Delete an existing activity

Path variables

id
string GUID required

The activity identifier that will be deleted

Example:
QWERTY1234543212345678UJIKY76HJR

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
DELETE https://devapi.crm.com/backoffice/v1/automations/QWERTY1234543212345678UJIKY76HJR HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Change Activity Status
PUT /activities/{id}/life_cycle_state

Update an existing activity’s life cycle state

Path variables

id
string GUID required

The activity identifier whose life cycle state will be updated

Example:
QWERTY1234543212345678UJIKY76HJR

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
life_cycle_state
string required

Defines the new life cycle state of the activity

Enumeration:
PENDING
COMPLETED

Responses

200 200

Successful Request

Body
Object
id
string GUID

The activity identifier that was updated

Example:
QWERTY1234543212345678UJIKY76HJR
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://devapi.crm.com/backoffice/v1/activities/QWERTY1234543212345678UJIKY76HJR/life_cycle_state HTTP/1.1 

Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A

{
    "life_cycle_state": "COMPLETED"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "QWERTY1234543212345678UJIKY76HJR"
}
Search Activities
GET /activities

Search for activities

Request parameters

life_cycle_state
string optional

Filter based on activity state

Enumeration:
PENDING
COMPLETED
order_id
string GUID optional

Filter based on the related Order

Example:
c0a0c2bf-55fa-4a22-b151-a8660c3877b1
lead_id
string GUID optional

Filter based on the related Lead

Example:
c0a0c2bf-55fa-4a22-b151-a8660c3877b1
service_request_id
string GUID optional

Filter based on the related Service Request

Example:
c0a0c2bf-55fa-4a22-b151-a8660c3877b1
organisation_id
string GUID optional

Filter based on the ORganisation of which users are responsible to complete it

Example:
c0a0c2bf-55fa-4a22-b151-a8660c3877b1
user_id
string GUID optional

Filter based on the User who is responsible to complete it

Example:
c0a0c2bf-55fa-4a22-b151-a8660c3877b1
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The activity identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
subject
string

The activity subject

Example:
Call customer
description
string

The activity description

Example:
We need to call the customer to arrange a demo
life_cycle_state
string

The activity life cycle state

Enumeration:
PENDING
COMPLETED
organisation
Object

The organisation from which users are responsible to complete the activity

id
string GUID

The organisation identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The organisation name

Example:
Marketing
user
Object

The user that is responsible to complete the activity

id
string GUID

The user identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The user name

Example:
John Doe
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/activities HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CEEE83D6E0804A30966F684B0269AD91",
            "subject": "Call customer",
            "description": "We need to call the customer to arrange a demo",
            "life_cycle_state": "COMPLETED",
            "organisation": {
                "id": "CEEE83D6ER804A30966F684B0269AD91",
                "name": "MArketing"
            }
            "user": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "John Doe"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Activity
GET /activities/{id}

Get details for a specific activity

Path variables

id
string GUID required

The activity identifier that will be retrieved

Example:
CEEE83D6E0804A30966F684B0269AD91

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The activity identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
subject
string

The activity subject

Example:
Call customer
description
string

The activity description

Example:
Arrange a call with the customer after 4pm to schedule a demo for next week
life_cycle_state
string

The activity state

Enumeration:
PENDING
COMPLETED
organisation
Object

The organisation from which users are responsible to complete the activity

id
string GUID

The organisation identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The organisation name

Example:
Marketing
user
Object

The user that is responsible to complete the activity

id
string GUID

The user identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The user name

Example:
John Doe
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/activities/CEEE83D6E0804A30966F684B0269AD91 HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CEEE83D6E0804A30966F684B0269AD91",
    "subject": "Call customer",
    "description": "Arrange a call with the customer after 4pm to schedule a demo for next week",
    "life_cycle_state": "PENDING",
    "organisation": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "Marketing"
    }
}
Analytics
POST /reports/{id}
POST /reports/{id}/preview
GET /organisations/{id}/analytics
GET /contacts/{id}/analytics
Run Report
POST /reports/{id}

Runs a report and sends its results via email to the user who runs it

Path variables

id
string required

The unique name of the report

Request body

Object
format
string required

The report’s format

Enumeration:
PDF
CSV
Default:
CSV
Example:
CSV
filters_set
Array required

Set of filters based on which the report runs

Min items: 1
Unique items: YES
Object
label
string

The filter’s label

Example:
Registration date
key
string

The filter’s name

Example:
period_from
value
string

The filter’s value as this was specified by the user

Example:
THIS_MONTH
type
string

The data type of the filter

Enumeration:
TEXT
NUMBER
INTEGER
DATE
columns_set
Array required

Set of columns that will be included in the report

Min items: 1
Example:
Number, Name
Object
order
integer

The ordering of the columns from left to right

Example:
1
label
string

The column’s label as this will be displayed on the report

Example:
Code
key
string

The field’s name

Example:
product_code
type
string
Enumeration:
TEXT
NUMBER
INTEGER
DATE
group_by_set
Array

Set of fields to be used to group the report’s results

Object
order
integer

The grouping’s ordering

label
string

The group by field’s label as this will be displayed on the report

Example:
Type
key
string

The field’s name

Example:
product_type
type
string
Enumeration:
TEXT
NUMBER
INTEGER
DATE

Responses

200 200

The request has succeeded

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
Example 2
POST https://devapi.crm.com/backoffice/v1/reports/{id} HTTP/1.1 

Content-Type: application/json

{
    "format": "CSV",
    "filters_set": [
        {
            "label": "Registration date",
            "key": "period_from",
            "value": "THIS_MONTH",
            "type": "INTEGER"
        }
    ],
    "columns_set": [
        {
            "order": 1,
            "label": "Code",
            "key": "product_code",
            "type": "TEXT"
        }
    ],
    "group_by_set": [
        {
            "order": 1,
            "label": "Type",
            "key": "product_type",
            "type": "NUMBER"
        }
    ]
}

Contacts Summary Report example

POST https://devapi.crm.com/backoffice/v1/reports/contacts_summary HTTP/1.1 

Content-Type: application/json

{
    "format": "PDF",
    "filters_set": [ 
        {
        	"label": "Registered From",
            "key": "registered_from",
            "value": "1577879016",
            "type" : "date"
        },
        {
        	"label": "Registered To",
            "key": "registered_to",
            "value": "1589370216",
            "type" : "date"
        }
    ],
    "columns_set": [
        {
            "key": "code",
            "type" : "text",
            "label": "Code",
            "order": 1
        },
        {
			"key": "contact_name",
			"type" : "text",
			"label": "Name",
            "order": 2
		},
		{
			"key": "registered_on",
			"type" : "date",
			"label": "Registered On",
            "order": 3
		},
		{
			"key": "owned_by.name",
			"type" : "text",
			"label": "Owned By",
            "order": 5
		},
		{
			"key": "financials.primary_account.number",
			"type" : "text",
			"label": "Primary Account",
            "order": 6
		},
		{
			"key": "financials.primary_account.currency_code,financials.primary_account.balance",
			"type" : "text,amount",
			"label": "Account Balance",
            "order": 7
		},
		{
			"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
			"type" : "text,amount",
			"label": "Overdue Amount",
            "order": 8
		},
		{
			"key": "financials.wallet.code",
			"type" : "text",
			"label": "Wallet",
            "order": 9
		},
		{
			"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
			"label": "Wallet Balance",
			"type" : "text,amount",
            "order": 10
		}
    ],
    "group_by_set": [
		{
			"key": "category.name",
			"type" : "text",
			"label": "Category",
            "order": 1
		}
    ]
}
Preview Report
POST /reports/{id}/preview

Runs the report in preview mode, i.e. a subset of the report’s results are returned for preview purposes (max 10 records included in the response)

Path variables

id
string required

The unique name of the report

Request body

Object
filters_set
Array

Set of filters based on which the report runs

Object
key
string

The filter’s name

Example:
period_from
value
string

The filter’s value as this was specified by the user

Example:
This month
columns_set
Array

Set of columns that will be included in the report’s preview. Up to 10 columns are included by default

Example:
Number, Name
Object
key
string

The field’s name

Example:
product_code

Responses

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

200 OK
Body
Object
content
Array

List of columns to be displayed in the report’s preview. Maximum 10 records are included in the preview

Object
key
string
Example:
Name
value
string
Example:
Jane Smith
Example 1
Example 2
GET https://devapi.crm.com/backoffice/v1/reports/{id}/preview HTTP/1.1 

Content-Type: application/json

{
    "filters_set": [
        {
            "key": "period_from",
            "value": "This month"
        }
    ],
    "columns_set": [
        {
            "order": 1,
            "key": "product_code",
            "value": "Code"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "order": 1,
            "key": "Name",
            "value": "Jane Smith"
        }
    ]
}

Preview Contacts Summary example

GET https://devapi.crm.com/backoffice/v1/reports/contacts_summary/preview HTTP/1.1 

Content-Type: application/json

{
    "filters_set": [ 
        {
            "key": "registered_from",
            "value": "1577877342"
        },
        {
            "key": "registered_to",
            "value": "1589282142"
        }
    ],
    "columns_set": [
		{
			"key": "contact_name"
		},
		{
			"key": "registered_on"
		},
		{
			"key": "category.name"
		},
		{
			"key": "owned_by.name"
		},
		{
			"key": "financials.primary_account.number"
		},
		{
			"key": "financials.primary_account.currency_symbol,financials.primary_account.balance"
		},
		{
			"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount"
		},
		{
			"key": "financials.wallet.number"
		},
		{
			"key": "financials.wallet.wallet_currency_code,financials.wallet.balance"
		}
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "Marios Ioannou11"
                },
                {
                    "key": "registered_on",
                    "value": "1590493499"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": "A10009"
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": "38.0"
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": "TWD 0"
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": "TWD 0.0"
                }
            ]
        },
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "Marios Ioannou10"
                },
                {
                    "key": "registered_on",
                    "value": "1590492704"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": "A10008"
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": "0.0"
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": "USD 0"
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": "USD 0.0"
                }
            ]
        },
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "Marios Ioannou9"
                },
                {
                    "key": "registered_on",
                    "value": "1590475066"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": "A10007"
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": "3.4"
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": "EUR 0"
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": "EUR 0.0"
                }
            ]
        },
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "George Rewards"
                },
                {
                    "key": "registered_on",
                    "value": "1590468310"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": "A10006"
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": "15.0"
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": "USD 0"
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": "USD 0.0"
                }
            ]
        },
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "Mikaela Schiza"
                },
                {
                    "key": "registered_on",
                    "value": "1589794026"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": "A10003"
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": "-10.0"
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": "EUR 0"
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": "EUR 0.0"
                }
            ]
        },
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "Marios Ioannou8"
                },
                {
                    "key": "registered_on",
                    "value": "1589446686"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": "A10001"
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": "22.0"
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": "CAD 0"
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": "CAD 0.0"
                }
            ]
        },
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "Marios Ioannou7"
                },
                {
                    "key": "registered_on",
                    "value": "1589396523"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": "A10001"
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": "0.0"
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": "USD 0"
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": "USD 0.0"
                }
            ]
        },
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "Marios Ioannou5"
                },
                {
                    "key": "registered_on",
                    "value": "1589374073"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": ""
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": ""
                }
            ]
        },
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "Giorgos Georgiou"
                },
                {
                    "key": "registered_on",
                    "value": "1589370096"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": ""
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": ""
                }
            ]
        },
        {
            "fields": [
                {
                    "key": "contact_name",
                    "value": "Marios Ioannou4"
                },
                {
                    "key": "registered_on",
                    "value": "1589368957"
                },
                {
                    "key": "category.name",
                    "value": ""
                },
                {
                    "key": "owned_by.name",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.number",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
                    "value": ""
                },
                {
                    "key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
                    "value": ""
                },
                {
                    "key": "financials.wallet.number",
                    "value": ""
                },
                {
                    "key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
                    "value": ""
                }
            ]
        }
    ]
}
Get Organisation Analytics - AS
GET /organisations/{id}/analytics

Get analytics for an organisation

Path variables

id
string GUID required

The organisation identifier that is optionally a parent. If the organisation is a Parent an optional paramter can request children in the same response.

Example:
babc8d45-50be-4259-b1bf-c85dee46642f

Request parameters

metrics
array of string optional

Which metrics are required

Collection format: csv
Example:
[
    "visits","offers","transactions","products","awards","wallets"
]
start_date
string optional

Start of Sequence - used for sliding window

end_date
string optional

End of Sequuence used for sliding window

network
string optional

Children inclusion from the network

Example:
MERCHANTS, VENUES

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
content
Array
Object
organisationId
string
Example:
bf07da38-0d34-11ea-9518-42010a9a0003
organisationName
string
Example:
Banana Wharf Hamble
purchases
Array

Metric Type Requested

Object
timestamp
integer

Timestamp base on the requested unit, in EPOCH format with YEAR-MONTH-DAY-HOUR, or YEAR-MONTH-DAY, YEAR-MONTH inteded for granularity.

Example:
1588600800
number
number

The total for the given timestamp

Example 1
GET https://devapi.crm.com/backoffice/v1/organisations/babc8d45-50be-4259-b1bf-c85dee46642f/analytics HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{"content" : [
    {
        "organisationId": "bf07da38-0d34-11ea-9518-42010a9a0003",
        "organisationName": "Banana Wharf Hamble",
        "purchases": [
            {
                "timestamp": 1588600800,
                "number": 321.00
            },
            {
                "timestamp": 1588604400,
                "number": 64.00
            },
            {
                "timestamp": 1588665600,
                "number": 150.00
            },
            {
                "timestamp": 1588672800,
                "number": 36.00
            },
            {
                "timestamp": 1588744800,
                "number": 198.00
            },
            {
                "timestamp": 1588748400,
                "number": 256.00
            },
            {
                "timestamp": 1588752000,
                "number": 134.52
            },
            {
                "timestamp": 1588755600,
                "number": 165.78
            },
            {
                "timestamp": 1588827600,
                "number": 98.21
            }
        ]
    },
    {
        "organisationId": "cc44858b-0d34-11ea-9518-42010a9a0003",
        "organisationName": "Banana Wharf Poole",
        "purchases": [                
            {"timestamp": 1588600800,
                "number": 321.00
            },
            {
                "timestamp": 1588604400,
                "number": 64.00
            },
            {
                "timestamp": 1588665600,
                "number": 150.00
            },
            {
                "timestamp": 1588672800,
                "number": 36.00
            }
            ]
    }
]}
Get Contact Analytics
GET /contacts/{id}/analytics

Get analytics for a customer

Path variables

id
string GUID required

The uique identifier of the contact

Example:
babc8d45-50be-4259-b1bf-c85dee46642f

Request parameters

metrics
array of string optional

Which metrics are required

Collection format: csv
Example:
[
    "visits","awards","transactions"
]

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Array
Object
name
string

The metric’s name

Example:
visits
values
Object
hour
integer
Example:
1
today
integer
Example:
2
this_week
integer
Example:
2
this_month
integer
Example:
10
last_month
integer
Example:
15
this_quarter
integer
Example:
15
this_semester
integer
Example:
30
this_year
integer
Example:
45
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/contacts/babc8d45-50be-4259-b1bf-c85dee46642f/analytics HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "name": "visits",
        "values": {
            "hour": 1,
            "today": 2,
            "this_week": 2,
            "this_month": 10,
            "last_month": 15,
            "this_quarter": 15,
            "this_semester": 30,
            "this_year": 45
        }
    }
]
Event Management
POST /events
POST /contact_profiles
Get Events / Webhook
POST /events

Returns a list of Events logged in Mongo DW

Request parameters

contact_id
string optional
business_id
string optional
event
array of string optional
Collection format: csv
Min items: 1
Unique items: YES

Responses

201 Created
Body
Object
type
string
Example:
PURCHASE
business
Object
id
string
name
string
submitted_on
integer
Example:
4343432132
submitted_day
string
Example:
MONDAY
contact
Object
id
string
Example:
fffe6dc7-dd1a-441a-a747-60f5d0c6a844
financials
Object
account
Object
id
string
number
string
name
string
wallet
Object
id
string
code
string
merchant
Object
id
string
name
string
venue
Object
id
string
name
string
subsidiary
Object
id
string
name
string
location
Object
city
string
province
string
country
string
postal_code
string
address_line_1
string
address_line_2
string
transaction
Object
id
string
number
string
reference_number
string
notes
string
classification
string
Example:
PURCHASE
life_cycle_state
string
Example:
POSTED
total_amount
integer
Example:
1
net_amount
integer
Example:
1
tax_amount
integer
Example:
1
discount_amount
integer
Example:
1
quantity
integer
Example:
10
currency
string
Example:
EUR
due_date
integer
Example:
1221213243
expiration_date
integer
Example:
1312312312
issue_date
integer
Example:
12345
posted_date
integer
Example:
2313344
type
Object
id
string
name
string
initiating_transaction
Object
id
string
number
string
classification
string
Example:
REFERRAL
type
Object
id
string
name
string
award
Object
amount
number
Example:
0.5
currency
string
Example:
EUR
awarded_on
integer
Example:
1234556
expires_on
integer
Example:
123123123
reward_offer
Object
id
string
name
string
reward_scheme
Object
id
string
name
string
spend
Object
amount
integer
Example:
1
currency
string
Example:
EUR
spend_method
string
instant_spend
integer
Example:
1
auto_spend
number
Example:
0.5
on_request
number
Example:
0.5
rewards_sign_up
Object
sign_up_on
integer
Example:
1234566
sign_out_on
integer
Example:
123456
reward_scheme
Object
id
string
name
string
payment_information
Object
payment_method_type
string
Example:
CARD
brand
string
Example:
MASTERCARD
funding_type
string
Example:
DEBIT
communication
Object
id
string
life_cycle_state
string
channel
string
order
Object
id
string
number
string
life_cycle_state
string
Example:
NEW
supply_method
string
Example:
DELIVERY
is_favorite
boolean
Example:
true
notes
string
submitted_date
integer
Example:
12345678
estimated_fulfillment_date
integer
Example:
12345678
completed_date
integer
Example:
12345678
cancelled_date
integer
Example:
12345678
expiration_date
integer
Example:
12345678
requested_date
integer
Example:
12345678
total_cost
number
Example:
2.4
currency
string
Example:
EUR
cancellation_reason
Object
id
string
name
string
category
Object
id
string
name
string
products
Array
Object
id
string
Example:
99c90eb3-64e6-4048-b3a3-d433611cfa93
sku
string
Example:
ABC9678
name
string
Example:
Regular Latte
type
Object
id
string
name
string
family
Object
id
string
name
string
brand
Object
id
string
name
string
category
Object
id
string
name
string
quantity
integer
Example:
1
total_amount
integer
Example:
1
net_amount
integer
Example:
1
tax_amount
integer
Example:
1
discount_amount
integer
Example:
1
currrency
string
Example:
GBP
notes
string
bundle_product
Object
id
string
sku
string
name
string
Example 1
POST https://stagingapi.crm.com/backoffice/v1/events HTTP/1.1 

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "type": "PURCHASE",
    "business": {
        "id": "",
        "name": ""
    },
    "submitted_on": 4343432132,
    "submitted_day": "MONDAY",
    "contact": {
        "id": "fffe6dc7-dd1a-441a-a747-60f5d0c6a844"
    },
    "financials": {
        "account": {
            "id": "",
            "number": "",
            "name": ""
        },
        "wallet": {
            "id": "",
            "code": ""
        }
    },
    "merchant": {
        "id": "",
        "name": ""
    },
    "venue": {
        "id": "",
        "name": ""
    },
    "subsidiary": {
        "id": "",
        "name": ""
    },
    "location": {
        "city": "",
        "province": "",
        "country": "",
        "postal_code": "",
        "address_line_1":"",
        "address_line_2":""
    },
    "transaction": {
        "id": "",
        "number": "",
        "reference_number": "",
        "notes": "",
        "classification": "PURCHASE",
        "life_cycle_state": "POSTED",
        "total_amount": 1,
        "net_amount": 1,
        "tax_amount": 1,
        "discount_amount": 1,
        "quantity": 10,
        "currency": "EUR",
        "due_date": 1221213243,
        "expiration_date": 1312312312,
        "issue_date": 12345,
        "posted_date": 2313344,
        "type": {
            "id": "",
            "name": ""
        }
    },
    "initiating_transaction": {
        "id": "",
        "number": "",
        "classification": "REFERRAL",
        "type": {
            "id": "",
            "name": ""
        }
    },
    "award": {
        "amount": 0.5,
        "currency": "EUR",
        "awarded_on": 1234556,
        "expires_on": 123123123,
        "reward_offer": {
            "id": "",
            "name": ""
        },
        "reward_scheme": {
            "id": "",
            "name": ""
        }
    },
    "spend": {
        "amount": 1,
        "currency": "EUR",
        "spend_method": "",
        "instant_spend": 1,
        "auto_spend": 0.5,
        "on_request": 0.5
    },
    "rewards_sign_up": {
        "sign_up_on": 1234566,
        "sign_out_on": 123456,
        "reward_scheme": {
            "id": "",
            "name": ""
        }
    },
    "payment_information": {
        "payment_method_type": "CARD",
        "brand": "MASTERCARD",
        "funding_type": "DEBIT"
    },
    "communication": {
        "id": "",
        "life_cycle_state": "",
        "channel": ""
    },
    "order": {
        "id":"",
        "number":"",
        "life_cycle_state":"NEW",
        "supply_method":"DELIVERY",
        "is_favorite":true,
        "notes":"",
        "submitted_date":12345678,
        "estimated_fulfillment_date":12345678,
        "completed_date":12345678,
        "cancelled_date":12345678,
        "expiration_date":12345678,
        "requested_date":12345678,
        "total_cost":2.40,
        "currency":"EUR",
        "cancellation_reason":{
            "id":"",
            "name":""
        },
        "category":{
            "id":"",
            "name":""
        }
        
    },
    "products": [
        {
            "id": "99c90eb3-64e6-4048-b3a3-d433611cfa93",
            "sku": "ABC9678",
            "name": "Regular Latte",
            "type": {
                "id": "",
                "name": ""
            },
            "family": {
                "id": "",
                "name": ""
            },
            "brand": {
                "id": "",
                "name": ""
            },
            "category": {
                "id": "",
                "name": ""
            },
            "quantity": 1,
            "total_amount": 1,
            "net_amount": 1,
            "tax_amount": 1,
            "discount_amount": 1,
            "currrency": "GBP",
            "notes":"",
            "bundle_product": {
                "id": "",
                "sku": "",
                "name": ""
            }
        }
    ]
}
Get Contact Profiles
POST /contact_profiles

Responses

200 OK
Body
Object
contacts
Array
Object
id
string
code
string
Example:
4234392059483233
type
string
Example:
PERSON
name
string
surname
string
gender
string
Example:
FEMALE
preferred_language
string
Example:
GR
email
string
Example:
jmith@testing.com
phone
string
Example:
0035799435233
category
Object
id
string
name
string
industry
Object
id
string
name
string
industry_sectors
Array
Object
id
string
name
string
birthday
Object
day
integer
Example:
28
month
integer
Example:
3
year
integer
Example:
1981
nameday
Object
day
integer
Example:
23
month
integer
Example:
4
location
Object
city
string
Example:
Hamble
province
string
Example:
Hampshire
country
string
Example:
United Kingdom
postal_code
string
Example:
PO345HD
payment_method
Object
type
string
funding_type
string
brand
string
financials
Array
Object
account
Object
id
string
number
string
name
string
balance
number
Example:
1.99
overdue_amount
number
Example:
0.99
credit_limit
integer
Example:
100
currency
string
Example:
EUR
classification
Object
id
string
name
string
billing_location
Object
city
string
Example:
Hamble
province
string
Example:
Hampshire
country
string
Example:
United Kingdom
postal_code
string
Example:
PO345HD
life_cycle_state
string
rewards_tier
Object
id
string
name
string
preferred_spending_method
string
wallet
Object
id
string
code
string
balance
string
life_cycle_state
string
reward_schemes
Array
Object
id
string
name
string
signed_up_date
integer
Example:
123456788
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://devapi.crm.com/backoffice/v1/contact_profiles HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "contacts": [
        
        {
            "id": "",
            "code": "4234392059483233",
            "type": "PERSON",
            "name": "",
            "surname": "",
            "gender": "FEMALE",
            "preferred_language": "GR",
            "email": "jmith@testing.com",
            "phone": "0035799435233",
            "category": {
                "id": "",
                "name": ""
            },
            "industry": {
                "id": "",
                "name": ""
            },
            "industry_sectors": [
                {
                    "id": "",
                    "name": ""
                }
            ],
            "birthday": {
                "day": 28,
                "month": 3,
                "year": 1981
            },
            "nameday": {
                "day": 23,
                "month": 4
            },
            "location": {
                "city": "Hamble",
                "province": "Hampshire",
                "country": "United Kingdom",
                "postal_code": "PO345HD"
            },
            "payment_method": {
                "type": "",
                "funding_type": "",
                "brand": ""
            },
            "financials": [
                {
                    "account": {
                        "id": "",
                        "number": "",
                        "name": "",
                        "balance": 1.99,
                        "overdue_amount": 0.99,
                        "credit_limit": 100,
                        "currency": "EUR",
                        "classification": {
                            "id": "",
                            "name": ""
                        },
                        "billing_location": {
                            "city": "Hamble",
                            "province": "Hampshire",
                            "country": "United Kingdom",
                            "postal_code": "PO345HD"
                        },
                        "life_cycle_state": "",
                        "rewards_tier": {
                            "id": "",
                            "name": ""
                        },
                        "preferred_spending_method": ""
                    },
                    "wallet": {
                        "id": "",
                        "code": "",
                        "balance": "",
                        "life_cycle_state": ""
                    }
                }
            ],
            "reward_schemes":[
                {
                    "id":"",
                    "name":"",
                    "signed_up_date":123456788
                }
            ]
            
        }
    ]
}
Reports

List of Web APIs used to retrieve informaiton displayed in Reports

GET /contact_rewards_analysis
GET /contact_order_analysis
Get Contact Rewards Analysis
GET /contact_rewards_analysis

Retrieves details information for a contact that perticipates in a Reward Scheme in terms of purchases, awards and spends

Request parameters

sign_up_from
integer optional
sign_up_to
integer optional
purchases_from
integer optional
purchases_to
integer optional
tier_id
string optional

The contact’s reward tier

category_id
string optional

The contact’s category

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
content
Array
Object
id
string

The contact’s unique identifier

name
string

The contact’s full name or company name

Example:
John Smith
code
string
loyalty_code
string
Example:
123344555
sign_up_date
integer
Example:
123456789
tier
Object
id
string
name
string
category
Object
id
string
name
string
wallet
Object
id
string
code
string
balance
number
Example:
9.99
currency
string
Example:
EUR
purchases
Object
number
integer
Example:
10
amount
number
Example:
99.99
days_since_last_purchase
integer
Example:
35
currency
string
awards
Object
number
integer
Example:
10
amount
number
Example:
99.99
days_since_last_award
integer
Example:
35
currency
string
spends
Object
number
integer
Example:
10
amount
number
Example:
99.99
days_since_last_spend
integer
Example:
35
currency
string
pages
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/contact_rewards_analysis HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "",
            "name": "John Smith",
            "code": "",
            "loyalty_code": "123344555",
            "sign_up_date": 123456789,
            "tier": {
                "id": "",
                "name": ""
            },
            "category": {
                "id": "",
                "name": ""
            },
            "wallet": {
                "id": "",
                "code": "",
                "balance": 9.99,
                "currency": "EUR"
            },
            "purchases": {
                "number": 10,
                "amount": 99.99,
                "days_since_last_purchase": 35,
                "currency": ""
            },
            "awards": {
                "number": 10,
                "amount": 99.99,
                "days_since_last_award": 35,
                "currency": ""
            },
            "spends": {
                "number": 10,
                "amount": 99.99,
                "days_since_last_spend": 35,
                "currency": ""
            }
        }
    ],
    "pages": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Contact Orders Analysis
GET /contact_order_analysis

Retrieves details information for a contact and the items purchased through an Order

Request parameters

order_date_from
integer optional

The creation date of the order

order_date_to
integer optional
supply_method
string optional
Enumeration:
DELIVERY
PICK_UP
ANY
Default:
ANY
category_id
string optional

The contact’s category

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
content
Array
Object
id
string
name
string
Example:
John Smith
code
string
category
Object
id
string
name
string
number_of_orders
integer
Example:
4
total_order_amount
integer
Example:
10
average_order_value
number
Example:
2.5
curency
string
Example:
EUR
days_since_last_order
integer
Example:
3
preferred_supply_method
string
Example:
DELIVERY
preferred_payment_method
string
Example:
CARD
pages
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/contact_order_analysis HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "",
            "name": "John Smith",
            "code": "",
            "category": {
                "id": "",
                "name": ""
            },
            "number_of_orders": 4,
            "total_order_amount": 10,
            "average_order_value": 2.5,
            "curency": "EUR",
            "days_since_last_order": 3,
            "preferred_supply_method": "DELIVERY",
            "preferred_payment_method": "CARD"
        }
    ],
    "pages": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Automations
POST /automations
PUT /automations/{id}
DELETE /automations/{id}
GET /automations
GET /automations/{id}
POST /automations/{id}/actions
GET /automations/{id}/actions
Create Automation
POST /automations

Create a new automation

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
name
string required

The automation name

Example:
Approve Offers
description
string nullable

The automation description

Example:
Require 4 approvals for an offer
life_cycle_state
string nullable

Defines whether the automation is active or not

Enumeration:
ACTIVE
INACTIVE
Default:
INACTIVE
entity
string required

Defines the entity that its events will trigger this automation

Enumeration:
CONTACTS
REWARD_OFFERS
ORDERS
event
string required

Defines the event that will trigger this automation (filtered based on the selected entity)

Examples:
AWARD_CUSTOMERSPEND_AWARDREGISTER_CONTACT

Responses

200 200

Successful Request

Body
Object
id
string GUID

The automation identifier that was created

Example:
QWERTY1234543212345678UJIKY76HJR
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/automations HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Approve Offers",
    "description": "Require 4 approvals for an offer",
    "life_cycle_state": "INACTIVE",
    "entity": "CONTACTS",
    "event": "REGISTER_CONTACT"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "QWERTY1234543212345678UJIKY76HJR"
}
Update Automation
PUT /automations/{id}

Update an existing automation

Path variables

id
string GUID required

The automation identifier that will be updated

Example:
QWERTY1234543212345678UJIKY76HJR

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
name
string nullable

The automation name

Example:
Approve Offers
description
string nullable

The automation description

Example:
Require 4 approvals for an offer
life_cycle_state
string nullable

Defines whether the automation is active or not

Enumeration:
ACTIVE
INACTIVE

Responses

200 200

Successful Request

Body
Object
id
string GUID

The automation identifier that was updated

Example:
QWERTY1234543212345678UJIKY76HJR
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://devapi.crm.com/backoffice/v1/automations/QWERTY1234543212345678UJIKY76HJR HTTP/1.1 

Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A

{
    "name": "Approve Offers",
    "description": "Require 4 approvals for an offer",
    "state": "INACTIVE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "QWERTY1234543212345678UJIKY76HJR"
}
Delete Automation
DELETE /automations/{id}

Delete an existing automation

Path variables

id
string GUID required

The automation identifier that will be deleted

Example:
QWERTY1234543212345678UJIKY76HJR

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
DELETE https://devapi.crm.com/backoffice/v1/automations/QWERTY1234543212345678UJIKY76HJR HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Search Automations
GET /automations

Search for automations

Request parameters

search_value
string optional

Search automations based on Name

Example:
Notify customers on award
name
string optional

Filter based on automation name

Example:
Notify customers on award
life_cycle_state
string optional

Filter based on automation state

Enumeration:
ACTIVE
INACTIVE
entity
string optional

Filter based on the entity that its event will trigger the automation

event
string optional

Filter based on the event that will trigger the automation

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The automation identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The automation name

Example:
Notify customers on award
description
string

The automation description

Example:
Lorem Ipsum
life_cycle_state
string

The automation life cycle state

Enumeration:
ACTIVE
INACTIVE
entity
string

The entity that its events triggered the automation

Example:
Contacts
event
string

The event that triggered the automation

Examples:
Award CustomersRegister Customer
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/automations HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CEEE83D6E0804A30966F684B0269AD91",
            "name": "Notify customers on award",
            "description": "Lorem Ipsum",
            "life_cycle_state": "INACTIVE",
            "entity": "Contacts",
            "event": "Register Customer"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Automation
GET /automations/{id}

Get details for a specific automation

Path variables

id
string GUID required

The automation identifier that will be retrieved

Example:
CEEE83D6E0804A30966F684B0269AD91

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The automation identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The automation name

Example:
Notify awarded customers
description
string

The automation description

Example:
On customer award an outbound email communication will be triggered
life_cycle_state
string

The automation state

Enumeration:
ACTIVE
INACTIVE
entity
string

The entity that its events trigger the automation

Example:
Customers
event
string

The event that will trigger the automation

Example:
AWARD_CUSTOMER
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/automations/CEEE83D6E0804A30966F684B0269AD91 HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CEEE83D6E0804A30966F684B0269AD91",
    "name": "Notify awarded customers",
    "description": "On customer award an outbound email communication will be triggered",
    "life_cycle_state": "INACTIVE",
    "entity": "CONTACTS",
    "event": "AWARD_CUSTOMER"
}
Add Automation Actions
POST /automations/{id}/actions

Set the sequence of actions (including filters) for a specific automation

Path variables

id
string GUID required

The automation identifier whose sequence will be set

Example:
6A24D2B5E44F44B28451FE021FCAD51E

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
content
Array
Object
id
string GUID required nullable

The automation action identifier

Example:
ACTIONB5E44F44B28451FE021FCAD51E
adaptor
string required

The automation adaptor

Enumeration:
APPROVAL_REQUESTS

Approval Requests

AUTOMATIC_CONTENT_UPDATES

Automatic Content Updates

COMMUNICATIONS

Communications

ORDER_PROVISIONING

Order Provision

SERVICE_REQUEST_PROVISION

Service Request Provision

WEBHOOKS

Webhooks

MICROS_SIMPHONY_ORDER_PROV

MICROS Simphony Order Provision

NCR_ALOHA_ORDER_PROVISIONING

NCR Aloha Order Provision

adaptor_action
string required

The automation adaptor action (each action is applicable for specific adaptors)

Enumeration:
REQUEST_APPROVAL

Request Appoval (Approval Requests adaptor)

UPDATE_CONTENT

Update Content (Automatic Content Updates adaptor)

COMMUNICATE_CUSTOMER

Communicate Customer (Communications adaptor)

COMMUNICATE_USER

Communicate User (Communications adaptor)

ASSIGN_SPECIFIC_USER

Assign To A Specific User (Order Provision & Service Request Provision adaptor)

FF_BY_SPECIFIC_ORGANISATION

Fulfilled By Specific Organisation (Order Provision & Service Request Provision adaptor)

ASSIGN_SPECIFIC_DEPARTMENT

Assign To Specific Department (Order Provision adaptor)

FULFILLED_BY_NEAREST_LOCATION

Fulfilled By Nearest Location (Order Provision adaptor)

FF_BASED_ON_POST_CODE_COVERAGE

Fulfilled Based On Post Code Coverage (Order Provision adaptor)

POST_WEBHOOK

POST Webhook (webhooks adaptor)

PUT_WEBHOOK

Put Webhook (webhooks adaptor)

ASSIGN_USER_OF_SPECIFIC_DEP

Assign To User Of A Specific Department (Service Request Provision adaptor)

ASSIGN_USER_OF_SPEC_USER_ROLE

Assign To User Of A Specific User Role (Service Request Provision adaptor)

FF_BY_USER_OF_SPEC_USER_ROLE

Fulfilled By User Of A Specific User Role (Service Request Provision adaptor)

FULFILLED_BY_SPECIFIC_USER

Fulfilled By Specific User (Service Request Provision adaptor)

PROV_ORDER_TO_SIMPHONY_POS

Provision Order To Simphony POS (MICROS Simphony Order Provision adaptor)

PROV_ORDER_TO_ALOHA_POS

Provision Order To Aloha POS (NCR Aloha Order Provision adaptor)

order
integer required

Defines the sequence’s action

Example:
1
path
string

Defines the sequence path

Example:
1
adaptor_action_parameters
Array

Details about the adaptor’s actions parameters

Object
id
string GUID nullable

The parameter identifier

Example:
4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55
parameter_group
string required

The parameter group (used when more than one parameters should be specified for an adaptor’s action)

Example:
1
parameter_key
string required

The parameter key

Enumeration:
COMMUNICATION_PLAN
USERS_COMMUNICATE_USERS_ID
USERS_COMMUNICATE_USER_ROLE_ID
ASSIGN_ORDER_ORGANISATION_ID
ASSIGN_ORDER_USER_ID
FULFILL_ORDER_DISTANCE
FULFILL_ORDER_ORGANISATION_ID
FULFILL_ORDER_POSTAL_CODE
FULFILL_ORDER_POSTAL_CODE_RANGE
WEBHOOK
parameter_from_value
string required

The parameter from value

Example:
123
parameter_to_value
string nullable

The parameter to value

Example:
1234
parameter_type
string required

The parameter type

Enumeration:
DATE
INTEGER
NUMBER
STRING
action_filters
Array

Details about the filters to be applied (required when type is based on Filter)

Object
id
string GUID

The action filter identifier

Example:
d267446d-3793-319e-4525-93b6b32f417d
filters
Array required

Details about the applicable filtered attributes

Object
id
string GUID nullable

The filter identiifer

Example:
edd5ac0e-05e3-e543-d38e-c6df6eed8d46
attribute
string required

The attribute that its value will be compared based on the related operator

Enumeration:
SUPPLY_METHOD
PASS_TYPE
REWARD_OFFER_GOAL
REWARD_OFFER_TYPE
REWARD_OFFER_SPEND_METHOD("
REWARD_OFFER_AWARD_AMOUNT("
REWARD_OFFER_AWARD_PERCENTAGE
type
string required

The type of the key

Enumeration:
STRING
INTEGER
NUMBER
DATE
operator
string required

The filter operator to compare the attribute actual value with the filtered one

Enumeration:
EQUAL

Applicable for type of number/integer/date

IS

Applicable for type of string

EQUAL_GREATER

Applicable for type of number/integer/date

EQUAL_LESS

Applicable for type of number/integer/date

LESS

Applicable for type of number/integer/date

GREATER

Applicable for type of number/integer/date

value
string required nullable

The attribute value to apply the filter condition (either value or value_list should be specified)

Example:
123
value_list
Array of string required nullable

The supported list of values (either value or value_list should be specified)

Responses

200 200

OK

Body
Object
id
string GUID

The automation identifier

Example:
6A24D2B5E44F44B28451FE021FCAD51E
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/automations/6A24D2B5E44F44B28451FE021FCAD51E/actions HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "content": [
        {
            "id": "ACTIONB5E44F44B28451FE021FCAD51E",
            "adaptor": "APPROVAL_REQUESTS",
            "adaptor_action": "ASSIGN_SPECIFIC_DEPARTMENT",
            "order": 1,
            "path": "1",
            "adaptor_action_parameters": [
                {
                    "id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
                    "parameter_group": "1",
                    "parameter_key": "RICH_CONTENT",
                    "parameter_from_value": "123",
                    "parameter_to_value": "1234",
                    "parameter_type": "APPROVAL_ENTITY_TYPE"
                }
            ],
            "action_filters": [
                {
                    "filters": [
                        {
                            "id": "edd5ac0e-05e3-e543-d38e-c6df6eed8d46",
                            "attribute": "NAME",
                            "type": "NUMBER",
                            "operator": "EQUAL_LESS",
                            "value": "123",
                            "value_list": [
                                ""
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "6A24D2B5E44F44B28451FE021FCAD51E"
}
Get Automation Actions
GET /automations/{id}/actions

Retrieves the automation’ sequence of actions (including filters)

Path variables

id
string GUID required

The automation identifier whose actions will be retrieved

Example:
6A24D2B5E44F44B28451FE021FCAD51E

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

Body
Object
content
Array
Object
id
string

The automation action identifier

Example:
ACTIONB5E44F44B28451FE021FCAD51E
order
integer

Defines the sequence’s action

Example:
1
adaptor
string

The automation adaptor

Enumeration:
APPROVAL_REQUESTS

Approval Requests

AUTOMATIC_CONTENT_UPDATES

Automatic Content Updates

COMMUNICATIONS

Communications

ORDER_PROVISIONING

Order Provision

SERVICE_REQUEST_PROVISION

Service Request Provision

WEBHOOKS

Webhooks

MICROS_SIMPHONY_ORDER_PROV

MICROS Simphony Order Provision

NCR_ALOHA_ORDER_PROVISIONING

NCR Aloha Order Provision

adaptor_action
string

The automation adaptor action (each action is applicable for specific adaptors)

Enumeration:
REQUEST_APPROVAL

Request Appoval (Approval Requests adaptor)

UPDATE_CONTENT

Update Content (Automatic Content Updates adaptor)

COMMUNICATE_CUSTOMER

Communicate Customer (Communications adaptor)

COMMUNICATE_USER

Communicate User (Communications adaptor)

ASSIGN_SPECIFIC_USER

Assign To A Specific User (Order Provision & Service Request Provision adaptor)

FF_BY_SPECIFIC_ORGANISATION

Fulfilled By Specific Organisation (Order Provision & Service Request Provision adaptor)

ASSIGN_SPECIFIC_DEPARTMENT

Assign To Specific Department (Order Provision adaptor)

FULFILLED_BY_NEAREST_LOCATION

Fulfilled By Nearest Location (Order Provision adaptor)

FF_BASED_ON_POST_CODE_COVERAGE

Fulfilled Based On Post Code Coverage (Order Provision adaptor)

POST_WEBHOOK

POST Webhook (webhooks adaptor)

PUT_WEBHOOK

Put Webhook (webhooks adaptor)

ASSIGN_USER_OF_SPECIFIC_DEP

Assign To User Of A Specific Department (Service Request Provision adaptor)

ASSIGN_USER_OF_SPEC_USER_ROLE

Assign To User Of A Specific User Role (Service Request Provision adaptor)

FF_BY_USER_OF_SPEC_USER_ROLE

Fulfilled By User Of A Specific User Role (Service Request Provision adaptor)

FULFILLED_BY_SPECIFIC_USER

Fulfilled By Specific User (Service Request Provision adaptor)

PROV_ORDER_TO_SIMPHONY_POS

Provision Order To Simphony POS (MICROS Simphony Order Provision adaptor)

PROV_ORDER_TO_ALOHA_POS

Provision Order To Aloha POS (NCR Aloha Order Provision adaptor)

adaptor_action_parameters
Array

Details about the adaptor’s actions parameters

Object
id
string GUID

The parameter identifier

Example:
4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55
parameter_key
string

The parameter key

Enumeration:
COMMUNICATION_PLAN
USERS_COMMUNICATE_USERS_ID
USERS_COMMUNICATE_USER_ROLE_ID
ASSIGN_ORDER_ORGANISATION_ID
ASSIGN_ORDER_USER_ID
FULFILL_ORDER_DISTANCE
FULFILL_ORDER_ORGANISATION_ID
FULFILL_ORDER_POSTAL_CODE
FULFILL_ORDER_POSTAL_CODE_RANGE
WEBHOOK
parameter_from_value
string

The parameter from value

Example:
123
parameter_to_value
string

The parameter to value

Example:
1234
parameter_type
string

The parameter type

Enumeration:
DATE
INTEGER
NUMBER
STRING
parameter_group
string

The parameter group (used when more than one parameters should be specified for an adaptor’s action)

Example:
1
action_filters
Array

Details about the filters to be applied (required when type is based on Filter)

Object
id
string GUID

The action filter identifier

Example:
34a68915-ef49-69b6-a54b-c2ff66108473
filters
Array

Details about the applicable filtered attributes

Object
id
string GUID

The filter identiifer

Example:
edd5ac0e-05e3-e543-d38e-c6df6eed8d46
attribute
string

The attribute that its value will be compared based on the related operator

Enumeration:
SUPPLY_METHOD
PASS_TYPE
REWARD_OFFER_GOAL
REWARD_OFFER_TYPE
REWARD_OFFER_SPEND_METHOD
REWARD_OFFER_AWARD_AMOUNT
REWARD_OFFER_AWARD_PERCENTAGE
type
string

The type of the key

Enumeration:
STRING
INTEGER
NUMBER
DATE
operator
string

The filter operator to compare the attribute actual value with the filtered one

Enumeration:
EQUAL

Applicable for type of number/integer/date

IS

Applicable for type of string

EQUAL_GREATER

Applicable for type of number/integer/date

EQUAL_LESS

Applicable for type of number/integer/date

LESS

Applicable for type of number/integer/date

GREATER

Applicable for type of number/integer/date

value
string

The attribute value to apply the filter condition (either value or value_list should be specified)

Example:
123
value_list
Array of string

The supported list of values (either value or value_list should be specified)

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/automations/6A24D2B5E44F44B28451FE021FCAD51E/actions HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "ACTIONB5E44F44B28451FE021FCAD51E",
            "order": 1,
            "adaptor": "COMMUNICATIONS",
            "adaptor_action": "REQUEST_APPROVAL",
            "adaptor_action_parameters": [
                {
                    "id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
                    "parameter_key": "RICH_CONTENT",
                    "parameter_from_value": "123",
                    "parameter_to_value": "1234",
                    "parameter_type": "SUPPLY_METHOD",
                    "parameter_group": "1"
                }
            ],
            "action_filters": [
                {
                    "filters": [
                        {
                            "id": "edd5ac0e-05e3-e543-d38e-c6df6eed8d46",
                            "attribute": "NAME",
                            "type": "NUMBER",
                            "operator": "GREATER",
                            "value": "123",
                            "value_list": [
                                ""
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}
Adaptors
Adaptor Action Records
POST /adaptors/{id}/actions/{action_id}/records/{record_id}
GET /adaptors/{id}/actions/{action_id}/records
GET /adaptors/{id}/actions/{action_id}/records/{record_id}
Update Action Records
POST /adaptors/{id}/actions/{action_id}/records/{record_id}

Change the value of a specific adaptor action record attribute

Path variables

id
string GUID required

The approval request identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
action_id
string GUID required

The action identifier whoe record will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFQ
record_id
string GUID required

The record identifier that will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFJ

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
key
string required

The record’s key

Example:
url-endpoint
value
string required

The record’s value

Example:
https://crm.com

Responses

200 200

Successful Request

Body
Object
id
string GUID

The record identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/adaptors/CAD1E31269B76D7A65ACCE45B2E68DFD/actions/CAD1E31269B76D7A65ACCE45B2E68DFQ/records/CAD1E31269B76D7A65ACCE45B2E68DFJ HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "key": "url-endpoint",
    "value": "https://crm.com"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Search Action Records
GET /adaptors/{id}/actions/{action_id}/records

Search for an adaptor action’s records (e.g. CRM.COM Apporvals Adaptor approval requests)

Path variables

id
string GUID required

The adaptor identifier whose actions will be retrieved

Example:
82697d43-4970-4dcc-bd35-7df27c72b8f6
action_id
string GUID required

The action identifier that will be retrieved

Example:
1b75a53f-b189-40bb-8db0-39b0578a6aqa

Request parameters

search_type
string optional

Defines the entitiy type that the search will be applied (required for search_value)

Enumeration:
KEY
LABEL
VALUE
ADAPTOR_NAME
ADAPTOR_ACTION_NAME
search_value
string optional

Defines the free text search parameter based on the provided type (required when search_type is specified)

Example:
POS Delivery
automations
array of string optional

Filter based on automations that triggered such action

Collection format: csv
Unique items: YES
adaptor_actions
array of string optional

Filter based on adapto action that created such record

Collection format: csv
Unique items: YES
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The record identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
record_attributes
Array

Details about the records attributes

Object
id
string GUID

The attribute identifier

Example:
CEEE83D6E0804A30966F684B0269AD9G
key
string

The record’s attribute key

Example:
url-endpoint
label
string

The record’s attribute label

Example:
URL Endpoint
type
string

The record’s attribute type

Example:
string
value
string

The record’s attribute value

Example:
https://crm.com
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/adaptors/82697d43-4970-4dcc-bd35-7df27c72b8f6/actions/1b75a53f-b189-40bb-8db0-39b0578a6aqa/records HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CEEE83D6E0804A30966F684B0269AD91",
            "record_attributes": [
                {
                    "id": "CEEE83D6E0804A30966F684B0269AD9G",
                    "key": "url-endpoint",
                    "label": "URL Endpoint",
                    "type": "string",
                    "value": "https://crm.com"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Action Record
GET /adaptors/{id}/actions/{action_id}/records/{record_id}

Retrieve details for a specifc adaptor action’s records (e.g. CRM.COM WEbhooks Adaptor webhook request)

Path variables

id
string GUID required

The adaptor identifier whose action’s record will be retrieved

Example:
82697d43-4970-4dcc-bd35-7df27c72b8f6
action_id
string GUID required

The action identifier whoe record will be retrieved

Example:
1b75a53f-b189-40bb-8db0-39b0578a6aqa
record_id
string GUID required

The record identifier that will be retrieved

Example:
1b75a53f-b189-40bb-8db0-39b0578a6a2w

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The record identifier

Example:
be8c05c4-2f97-4b40-a979-42f066db265c
record_attributes
Array

Details about the record attributes

Object
id
string GUID

The attribute identifier

Example:
be8c05c4-2f97-4b40-a979-42f066db26qw
key
string

The record’s attribute key

Example:
url-endpoint
label
string

The record’s attribute label

Example:
URL Endpoint
type
string

The record’s attribute type

Example:
string
value
string

The record’s attribute value

Example:
https://crm.com
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/adaptors/82697d43-4970-4dcc-bd35-7df27c72b8f6/actions/1b75a53f-b189-40bb-8db0-39b0578a6aqa/records/1b75a53f-b189-40bb-8db0-39b0578a6a2w HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "be8c05c4-2f97-4b40-a979-42f066db265c",
    "record_attributes": [
        {
            "id": "be8c05c4-2f97-4b40-a979-42f066db26qw",
            "key": "url-endpoint",
            "label": "URL Endpoint",
            "type": "string",
            "value": "https://crm.com"
        }
    ]
}
Webhooks
POST /webhooks
PUT /webhooks/{id}
DELETE /webhooks/{id}
GET /webhooks
GET /webhooks/{id}
GET /webhook_requests
Create Webhook
POST /webhooks

Create a new webhook

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
name
string required

The webhook name

Example:
CRMdotCOM Delivery
method
string required

The webhook method type

Enumeration:
POST
PUT
url_endpoint
string required

The webhook url endpoint

Example:
https://crm.com/delivery
url_auth
string nullable

Defines how the webhook will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
Default:
NO_AUTH
username
string nullable

The username that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
johndoe
password
string nullable

The password that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
crm.com
api_key
string nullable

The api key that will auth the webhook requests (applicable if url_auth = API_KEY)

Example:
qwert-12345-qwewerwer-123234234-werwerwr

Responses

200 200

OK

Body
Object
id
string GUID

The webhook identifier

Example:
API1E31269B76D7A65ACCE45B2E68DFD
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/webhooks HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "CRMdotCOM Delivery",
    "method": "POST",
    "url_endpoint": "https://crm.com/delivery",
    "url_auth": "NO_AUTH",
    "username": "johndoe",
    "password": "crm.com",
    "api_key": "qwert-12345-qwewerwer-123234234-werwerwr"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "API1E31269B76D7A65ACCE45B2E68DFD"
}
Update Webhook
PUT /webhooks/{id}

Update an existing webhook

Path variables

id
string required

The webhook identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68WHI

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
name
string nullable

The webhook name

Example:
CRMdotCOM Delivery
url_endpoint
string nullable

The webhook url endpoint

Example:
https://crm.com/delivery
url_auth
string nullable

Defines how the webhook will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
Default:
NO_AUTH
username
string nullable

The username that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
johndoe
password
string nullable

The password that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
crm.com
api_key
string nullable

The api key that will auth the webhook requests (applicable if url_auth = API_KEY)

Example:
qwert-12345-qwewerwer-123234234-werwerwr

Responses

200 200

OK

Body
Object
id
string GUID

The webhook identifier

Example:
API1E31269B76D7A65ACCE45B2E68DFD
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://devapi.crm.com/backoffice/v1/webhooks/CAD1E31269B76D7A65ACCE45B2E68WHI HTTP/1.1 

Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A

{
    "name": "CRMdotCOM Delivery",
    "url_endpoint": "https://crm.com/delivery",
    "url_auth": "NO_AUTH",
    "username": "johndoe",
    "password": "crm.com",
    "api_key": "qwert-12345-qwewerwer-123234234-werwerwr"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "API1E31269B76D7A65ACCE45B2E68DFD"
}
Delete Webhook
DELETE /webhooks/{id}

Delete an existing webhook

Path variables

id
string required

The webhook identifier that will be deleted

Example:
CAD1E31269B76D7A65ACCE45B2E68WHI

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
DELETE https://devapi.crm.com/backoffice/v1/webhooks/CAD1E31269B76D7A65ACCE45B2E68WHI HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Search Webhooks
GET /webhooks

Retrieve all webhooks

Request parameters

search_value
string optional

The value of the search (case insensitive) across Name, URL Endpoint

Example:
https://crm.com/delivery
name
string optional

Filter based on the name

Example:
CRMdotCOM Delivery
url_endpoint
string optional

Filter based on the url endpoint

Example:
https://crm.com/delivery
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

Body
Object
content
Array

Information about the organisation’ webhooks

Object
id
string GUID

The webhook identifier

Example:
API1E31269B76D7A65ACCE45B2E68DFD
name
string

The webhook name

Example:
Registration Name
method
string

The webhook method type

Enumeration:
POST
PUT
url_endpoint
string

The webhook url endpoint

Example:
https;//crm.com/delivery
url_auth
string

Defines how the webhook url will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
number_requests
Object
pending
string

The number of pending requests

Example:
12
successful
string

The number of successful requests

Example:
2
failed
string

The number of failed requests

Example:
1
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/webhooks HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "API1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Registration Name",
            "url_endpoint": "https;//crm.com/delivery",
            "url_auth": "API_KEY"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Webhook
GET /webhooks/{id}

Get details of a single webhook

Path variables

id
string GUID required

The webhooks identifier that will be retrieved

Example:
API1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

Body
Object
content
Array

Information about the organisation’ webhooks

Object
id
string GUID

The organisation’s webhook identifier

Example:
API1E31269B76D7A65ACCE45B2E68DFD
name
string

The webhook name

Example:
CRMdotCOM Delivery
method
string

The webhook method type

Enumeration:
POST
PUT
url_endpoint
string

The webhook url endpoint

Example:
https://crm.com/delivery
url_auth
string

Defines how the webhook url will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
username
string

The webhook auth username (applicable only if url_auth = USERNAME_PASSWORD)

Example:
johndoe
password
string

The webhook auth password (applicable only if url_auth = USERNAME_PASSWORD)

Example:
crm.com
api_key
string

Defines the date up until the secret api key will be active

Example:
sdfsdfsdf-32423423423-wefsdfsdfdsf-234234234
number_requests
Object
pending
integer

The number of pending requests

Example:
12
successful
integer

The number of successfull requests

Example:
2
failed
integer

The number of failed requests

Example:
1
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/webhooks/API1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "API1E31269B76D7A65ACCE45B2E68DFD",
            "name": "CRMdotCOM Delivery",
            "url_endpoint": "https://crm.com/delivery",
            "url_auth": "USERNAME_PASSWORD",
            "username": "johndoe",
            "password": "crm.com",
            "api_key": "sdfsdfsdf-32423423423-wefsdfsdfdsf-234234234"
        }
    ]
}
Search Webhook Requests
GET /webhook_requests

Retrieve webhook requests

Request parameters

search_value
string optional

The value of the search (case insensitive) across Webhook Name, URL Endpoint

Example:
https://crm.com/delivery
webhooks
array of string optional

Filter based on the webhook

Collection format: csv
Unique items: YES
url_endpoint
string optional

Filter based on the url endpoint

Example:
https://crm.com/delivery
state
string optional

Filter based on the request state

Enumeration:
PENDING
SUCCESS
FAILED
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

OK

Body
Object
content
Array

Information about the organisation’ webhook requests

Object
id
string GUID

The webhook request identifier

Example:
API1E31269B76D7A65ACCE45B2E68DFD
state
string

The state of the webhook request

Enumeration:
PENDING
SUCCESS
FAILED
url_endpoint
string

The webhook url endpoint

Example:
https;//crm.com/delivery
url_auth
string

Defines how the webhook url will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
body
string

The request body that was sent

Example:
POST /crm.com/delivery HTTP/1.1 Host: staging.crm.com Content-Type: application/json api_key: 123456789012-1234-1234-1234-123456789012 Content-Type: text/plain { "contact_id": "123456789012-ABCD-ABCD-ABCD-123456789012", "amount": 20.45 }
response
string

The response that was sent

Example:
{ "status": { "code": "COM.CRM.EXCEPTION.INVALIDTOKENEXCEPTION", "description": "The specific token is not valid.", "message": "The token is invalid, please obtain a new one." } }
retries
integer

The total number of request retries

Example:
3
webhook
Object

The webhook of the request

id
string

The webhook identifier

Example:
API1E31269B76D7A65ACCE45B2E68WIH
name
string

The webhook name

Example:
CRMdotCOM Delivery
automation
Object

The automation that triggered the webhook

id
string

The automation identifier

Example:
b63ed1ab-0256-453d-82a4-a8a83a02ea8b
name
string

The automation name

Example:
Share content to delivery system
entity
Object

Information about the related entity that the request is created for

type
string

The entity type that the webhook request is created for

Examples:
CONTACTORDERREWARDOFFER
reference
string

The entity’s reference name/code/number

Example:
ORD1234ER
date
integer epoch

The date that such request was made

Example:
1596093272
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/webhook_requests HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "API1E31269B76D7A65ACCE45B2E68DFD",
            "state": "SUCCESS",
            "url_endpoint": "https;//crm.com/delivery",
            "url_auth": "USERNAME_PASSWORD",
            "body": "POST /crm.com/delivery HTTP/1.1 Host: staging.crm.com Content-Type: application/json api_key: 123456789012-1234-1234-1234-123456789012 Content-Type: text/plain  {     \"contact_id\": \"123456789012-ABCD-ABCD-ABCD-123456789012\",     \"amount\": 20.45 }",
            "response": "{     \"status\": {         \"code\": \"COM.CRM.EXCEPTION.INVALIDTOKENEXCEPTION\",         \"description\": \"The specific token is not valid.\",         \"message\": \"The token is invalid, please obtain a new one.\"     } }",
            "retries": 3,
            "webhook": {
                "id": "API1E31269B76D7A65ACCE45B2E68WIH",
                "name": "CRMdotCOM Delivery"
            },
            "automation": {
                "id": "b63ed1ab-0256-453d-82a4-a8a83a02ea8b",
                "name": "Share content to delivery system"
            },
            "entity": {
                "type": "CONTACT",
                "reference": "ORD1234ER"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Communications
POST /communications
GET /communications/{id}
GET /communications
Create Communication
POST /communications

Creates a single communication for a speciifc Contact

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Request body

application/json
Object
name
string

The name of the communication

Example:
Happy Birthday
contact_id
string GUID required

The GUID of the Contact that the communication will be sent to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
Example:
EMAIL
integration_id
string GUID

The integration that will send the communication

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
language
string

The language of the communication

Example:
ENG
recipient
string

The recipient’s address or phone according to the channel

Example:
customer@crm.com
subject
string

The actual subject of the communication sent (applicable for EMAIL and INAPP channels)

Example:
New Rewards Offer
content
string

The actual content of the communication sent

ignore_preferences
boolean

If set to True then the email and sms opt-out preferences of contact will be ignored

Default:
false
Example:
true

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/communications HTTP/1.1 

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

{
    "name": "Happy Birthday",
    "contact_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "channel": "EMAIL",
    "integration_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "language": "ENG",
    "recipient": "customer@crm.com",
    "subject": "New Rewards Offer",
    "content": "",
    "ignore_preferences": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Get Communication
GET /communications/{id}

Retrieve a specific communication

Path variables

id
string GUID required

The ID of the communication to be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Responses

200 200

The request has succeeded

Body
application/json
Object
name
string

The name of the communication

Example:
Happy Birthday
life_cycle_state
string

The state of the communication

Enumeration:
PENDING
COMPLETED
REJECTED
Example:
PENDING
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
Example:
EMAIL
is_viewed
boolean

Has the recipient viewed the communication?

Example:
false
viewed_on
integer epoch

The datetime that the recipient viewed the communication

Example:
1583846861
is_archived
boolean

Has the recipient archived the communication?

Example:
true
clicked_on
integer epoch

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

Example:
1583846865
created_on
integer epoch

The date and time that the communication was created

Example:
1583846861
language
string

The language of the communication

Example:
ENG
sender
string

The default sender

Example:
dev@crm.com
recipient
string

The email or number of the recipient

Example:
jon@crm.com
subject
string

The actual subject of the communication sent (if applicable)

content
string

The actual content of the communication sent

contact
Object

The contact that the communication was delivered to

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
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/communications/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "Happy Birthday",
    "life_cycle_state": "PENDING",
    "channel": "EMAIL",
    "is_viewed": true,
    "viewed_on": 1583846861,
    "is_archived": true,
    "clicked_on": 1583846865,
    "created_on": 1583846861,
    "language": "ENG",
    "sender": "dev@crm.com",
    "recipient": "jon@crm.com",
    "subject": "",
    "content": "",
    "contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Johnson",
        "code": "C123"
    }
}
List Communications
GET /communications

Retrieves all available communications

Request parameters

contact_id
string GUID optional

The contact ID for which the communications will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
life_cycle_state
string optional

The life cycle state of the communications to be retrieved

Enumeration:
PENDING
COMPLETED
REJECTED
channel
string optional

The channel of the communications to be retrieved

Enumeration:
SMS
EMAIL
DEVICE
INAPP
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array
Object
id
string GUID

The communication ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

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

Example:
Happy Birthday
life_cycle_state
string

The state of the communication

Enumeration:
PENDING
COMPLETED
REJECTED
Example:
PENDING
contact_id
string GUID

The GUID of the Contact

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
Example:
EMAIL
is_viewed
boolean

Has the recipient viewed the communication?

Example:
false
viewed_on
integer epoch

The datetime that the recipient viewed the communication

Example:
1583846865
is_archived
boolean

Has the recipient archived the communication?

clicked_on
integer epoch

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

Example:
1583846865
created_on
integer epoch

The date and time that the communication was created

Example:
1583846865
language
string

The communication’s language

Example:
ENG
sender
string

The default sender

Example:
dev@crm.com
recipient
string

The email or number of the recipient

Example:
jon@crm.com
subject
string

The actual subject of the communication sent (if applicable)

Example:
Welcome to our company
content
string

The actual content of the communication sent

Example:
Dear sir/madam...
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/communications HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Happy Birthday",
            "life_cycle_state": "PENDING",
            "contact_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "channel": "EMAIL",
            "is_viewed": true,
            "viewed_on": 1583846865,
            "is_archived": true,
            "clicked_on": 1583846865,
            "created_on": 1583846865,
            "language": "ENG",
            "sender": "dev@crm.com",
            "recipient": "jon@crm.com",
            "subject": "Welcome to our company",
            "content": "Dear sir/madam..."
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Communication Templates
POST /communication_templates
GET /communication_templates
GET /communication_templates/{id}
Create Communication Template
POST /communication_templates

Creates a communication template

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Request body

application/json
Object
name
string required

The name of the communication template

Example:
New Rewards Offer Template
contents
Array
Object
language
string

The language that the content is provided in (3-digits)

Example:
ENG
subject
string

The subject of the communication of the rich content

rich_content
string

The content in rich format

plain_content
string

The content in plain format

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication template identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://devapi.crm.com/backoffice/v1/communication_templates HTTP/1.1 

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

{
    "name": "New Rewards Offer Template",
    "contents": [
        {
            "language": "ENG",
            "subject": "",
            "rich_content": "",
            "plain_content": ""
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
List Communication Templates
GET /communication_templates

Retrieves all available communication templates

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10
name
string optional

Retrieves the communication templates based on their names

Example:
New Rewards Offer Template

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array
Object
name
string

The name of the communication template

Example:
New Rewards Offer Template
contents
Array
Object
language
string

The language that the content is provided in (3-digits)

Example:
ENG
subject
string

The subject of the communication of the rich content

rich_content
string

The content in rich format

plain_content
string

The content in plain format

paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/communication_templates HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "name": "New Rewards Offer Template",
            "contents": [
                {
                    "language": "ENG",
                    "subject": "",
                    "rich_content": "",
                    "plain_content": ""
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Communication Template
GET /communication_templates/{id}

Retrieve a single communication template

Path variables

id
string GUID required

The communication template id

Example:
4AD9C84FA60F9FE407140E20F707726A

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Responses

200 200

The request has succeeded

Body
application/json
Object
name
string required

The name of the communication template

Example:
New Rewards Offer Template
contents
Array
Object
language
string

The language that the content is provided in (3-digits)

Example:
ENG
subject
string

The subject of the communication of the rich content

rich_content
string

The content in rich format

plain_content
string

The content in plain format

400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/communication_templates/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "New Rewards Offer Template",
    "contents": [
        {
            "language": "ENG",
            "subject": "",
            "rich_content": "",
            "plain_content": ""
        }
    ]
}
Communication Plans
POST /communication_plans
PUT /communication_plans/{id}
DELETE /communication_plans/{id}
GET /communication_plans
GET /communication_plans/{id}
Create Communication Plan
POST /communication_plans

Creates a single communication plan

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Request body

application/json
Object
name
string

The communication plan’s name

Example:
New Reward Offers
end_date
integer epoch

The datetime that the communication plan ends running

Example:
12345678
start_date
integer epoch required

The datetime that the communication plan will start running

Example:
12345678
preferred_channel
string

The channel to send the communication in case the user has enabled more than one channels to receive communications

Enumeration:
EMAIL
SMS
segments
Array

A list of segments that the communications will be sent to

string GUID

the segment ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
contents
Array

A list of communication contents set up based on the channels and languages enabled

Object

the IDs of different contents used in this communication plan. Different languages and type of text

language
string

The language that the content is provided in (3-digitis)

Example:
ENG
subject
string

The subject of the communication of the rich content

rich_content
string

The content in rich format

plain_content
string

The content in plain format

integrations
Array

A list of integrations that will send the emails. One integration/connector per channel should be provided

string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
life_cycle_state
string

The life cycle state of the Communication Plan

Enumeration:
DRAFT
POSTED

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication plan identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/communication_plans HTTP/1.1 

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

{
    "name": "New Reward Offers",
    "end_date": 12345678,
    "start_date": 12345678,
    "preferred_channel": "EMAIL",
    "segments": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "contents": [
        {
            "language": "ENG",
            "subject": "",
            "rich_content": "",
            "plain_content": ""
        }
    ],
    "integrations": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "frequency": "0 0 12 * * ?",
    "life_cycle_state": "DRAFT"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Update Communication Plan
PUT /communication_plans/{id}

Updates an existing communication plan

Path variables

id
string GUID required

The ID of the communication plan to be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Request body

application/json
Object
name
string

The communication plan’s name

Example:
New Reward Offer
end_date
integer epoch

The datetime that the communication plan ends running

Example:
12345678
start_date
integer epoch required

The datetime that the communication plan will start running

Example:
112345678
preferred_channel
string

The channel to send the communication in case the user has enabled more than one channels to receive communications

Enumeration:
EMAIL
SMS
segments
Array

A list of segments that the communications will be sent to

string GUID

the segment ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
contents
Array

A list of communication contents set up based on the channels and languages enabled

Object

the IDs of different contents used in this communication plan. Different languages and type of text

language
string

The language that the content is provided in (3-digitis)

Example:
ENG
subject
string

The subject of the communication of the rich content

rich_content
string

The content in rich format

plain_content
string

The content in plain format

integrations
Array

A list of integrations that will send the emails. One integration/connector per channel should be provided

string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
life_cycle_state
string

The life cycle state of the Communication Plan

Enumeration:
DRAFT
POSTED

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication plan identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://stagingapi.crm.com/backoffice/v1/communication_plans/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

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

{
    "name": "New Reward Offer",
    "end_date": 12345678,
    "start_date": 112345678,
    "preferred_channel": "EMAIL",
    "segments": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "contents": [
        {
            "language": "ENG",
            "subject": "",
            "rich_content": "",
            "plain_content": ""
        }
    ],
    "integrations": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "frequency": "0 0 12 * * ?",
    "life_cycle_state": "DRAFT"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Delete Communication Plan
DELETE /communication_plans/{id}

Deletes a single communication plan

Path variables

id
string GUID required

The ID of the communication plan to be deleted

Example:
4AD9C84FA60F9FE407140E20F707726A

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Responses

200 200

The request has succeeded

400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
DELETE https://devapi.crm.com/backoffice/v1/communication_plans/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 
List Communication Plans
GET /communication_plans

Retrieves all available communication plans

Request parameters

search_value
string optional

The value of the search across the plan name

Example:
New Offer
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array
Object
id
string GUID

The communication plan ID

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The communication plan name

Example:
New Reward Offers
end_date
integer epoch

The datetime that the communication plan ends running

Example:
12345678
start_date
integer epoch

The datetime that the communication plan will start running

Example:
12345678
life_cycle_state
string

The life cycle state of the communication plan

Enumeration:
DRAFT
POSTED
integrations
Object
id
string GUID

The unique ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the integration

Example:
Connection for Emails
channel
string

The Channel

Enumeration:
EMAIL
SMS
INAPP
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/communication_plans HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "name": "New Reward Offers",
            "end_date": 12345678,
            "start_date": 12345678
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Communication Plan
GET /communication_plans/{id}

Retrieves a specific communication plan

Path variables

id
string GUID required

The unique ID of the communication plan to be retrieved

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 200

The request has succeeded

Body
application/json
Object
name
string

The name of the communication plan

Example:
New Rewards Offer
end_date
integer epoch

The datetime that the communication plan ends running

Example:
12345678
start_date
integer epoch required

The datetime that the communication plan will start running

Example:
12345678
preferred_channel
string

The channel to send the communication in case the user has enabled more than one channels to receive communications

Enumeration:
EMAIL
SMS
segments
Array

A list of segments that the communications will be sent to

Object

the segment ID

id
string GUID

The ID of the segment

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The name of the segment

Example:
VIP Contacts
contents
Array

A list of communication contents set up based on the channels and languages enabled

Object

the IDs of different contents used in this communication plan. Different languages and type of text

language
string

The language that the content is provided in (3-digits)

Example:
ENG
subject
string

The subject of the communication of the rich content

rich_content
string

The content in rich format

plain_content
string

The content in plain format

integrations
Array

A list of integrations that will send the communications. One integration/connector per channel should be provided

Object
id
string GUID

The unique ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the integration

Example:
Connection for Emails
channel
string

The channel

Enumeration:
EMAIL
SMS
INAPP
frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
life_cycle_state
string

The life cycle state of the communication plan

Enumeration:
DRAFT
POSTED
400 400

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

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/communication_plans/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "New Rewards Offer",
    "end_date": 12345678,
    "start_date": 12345678,
    "preferred_channel": "SMS",
    "segments": [
        {
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "name": "VIP Contacts"
        }
    ],
    "contents": [
        {
            "language": "ENG",
            "subject": "",
            "rich_content": "",
            "plain_content": ""
        }
    ],
    "integrations": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Connection for Emails",
            "channel": "SMS"
        }
    ],
    "frequency": "0 0 12 * * ?",
    "life_cycle_state": "POSTED"
}
Contacts
POST /contacts
PUT /contacts/{id}
GET /contacts
GET /contacts/{id}
GET /contacts/{id}/activity_feed
GET /contacts/{id}/payment_methods
POST /contacts/change_password
Create Contact
POST /contacts

Create a new contact, either a new Person or a Company

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
id
string GUID

The contact identifier. if not supplied one will be generated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
code
string

User readable code for the contact

Example:
0010202311
contact_type
string required

Type of contact support types include Person and Company.

Enumeration:
PERSON
COMPANY
is_tax_exempt
boolean

Defines whether the contatc is classified as Tax Exempt or not. Defaults to False.

Default:
false
Example:
false
company_name
string required nullable

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

Example:
Good Burger
title
string

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

Example:
Sir
first_name
string required nullable

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

Example:
Louis
middle_name
string nullable

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

Example:
Aloz
last_name
string required nullable

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

Example:
Kozior
preferred_language_code
string

The contact’s preferred language for communication

Example:
ENG
statutory_number
string

The contact’s unique statutory number

Example:
231224-1222000
notes
string

Notes for the contact

Example:
Notes
sms_opt_out
boolean nullable

The contact setting for receiving sms. Default value is false

Example:
true
email_opt_out
boolean nullable

The contact setting for receiving emails. Default value is false

Example:
false
create_default_account
boolean

If set to true, then a single account is created for the contact usig the system’s default settings and no further input is needed.

Example:
true
category_id
string GUID

The unique ID of the contact’s category

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
demographics
Object

Information about the contact’s demographic. Applicable only if the contact type is PERSON

gender
string

The gender of the contact

Enumeration:
MALE
FEMALE
country_of_residence
string

The country code for the country of residence

Example:
USA
passport
Object

Information about the contact’s passport

passport_number
string

The passport number

Example:
K)123456
issue_country_code
string

The passport’s issue country code

Example:
GRC
expiration_date
integer epoch

The passport’s expiration date

Example:
13423423222
id_details
Object

Information about the contact’s id. Applicable only if the contact is type of PERSON

id_number
string

The id number

Example:
132465
issue_country_code
string

The id’s issue country code

Example:
CYP
expiration_date
integer epoch

The id’s expiration date

Example:
1129876567
name_day
Object

The contact’s name day. Applicable only if the contact is type of PERSON

month
integer

The month of the name day

Example:
4
day
integer

The day of the name day

Example:
12
date_of_birth
Object

Information about the contact’s data of birth. Applicable only if the contact is type of PERSON

year
integer

The birtdate year

Example:
1999
month
integer

The borthdate month

Example:
12
day
integer

The borthdate day

Example:
31
company_profile
Object

Information about the company’s profile. Applicable only if contact_type is COMPANY

industry_id
string GUID

The company’s industry unique ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
industry_sectors
Array

The company’s industry sectors IDs

string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
profile_year
integer

The profile year

Example:
2019
annual_turnover
integer

The annual turnover

Example:
450000
established_on
integer epoch

The date that the company was established on

Example:
98765342
number_of_employees
integer

The company’s number of employees

Example:
200
registration_number
string

The company’s registration number

Example:
123456
registration_country
string

The company’s registrationc country code

Example:
CYP
tax_reference_number
string

The company’s tax reference number

Example:
TAX1234
vat_registration_number
string

The company VAT registration numnber

Example:
VAT1234
addresses
Array nullable

Information about the contact’s addresses

Object
address_type
string required

The address type

Enumeration:
HOME
BUSINESS
is_primary
boolean

Primary address for Billing or Communication

Example:
true
address_line_1
string
address_line_2
string
Example:
Thomas V
state_province_county
string
Example:
Active
town_city
string
postal_code
string
country_code
string
Example:
CYP
lat
string
lon
string
googlePlaceId
string
phones
Array
Object
is_primary
boolean
Example:
true
country_code
string
Example:
CYP
number
string
Example:
238065437
email_address
string

The contact’s email address

Example:
bill@gmail.com
accounts
Array

Optional basic account settings for a financial contact

Object
name
string

The account name

is_primary
boolean

Indicates the primary account of the contact

credit_limit
number
Example:
250
currency_code
string
Example:
GBP
classification_id
string

The account classification’s GUID

custom_fields
Array
Object
key
string

The custom field’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345
referral_code
string nullable

The contact’s referral code

Example:
REF123

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1

Create a contact for a person

POST https://stagingapi.crm.com/backoffice/v1/contacts HTTP/1.1 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "code": "0010202311",
    "contact_type": "PERSON",
    "is_tax_exempt": "false",
    "company_name": "Good Burger",
    "title": "Mr",
    "first_name": "Louis",
    "middle_name": "Aloz",
    "last_name": "Kozior",
    "preferred_language_code": "ENG",
    "statutory_number": "231224-1222000",
    "notes": "Notes",
    "sms_opt_out": "true",
    "email_opt_out": "false",
    "create_default_account": true,
    "category_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "demographics": {
        "gender": "FEMALE",
        "country_of_residence": "USA",
        "passport": {
            "passport_number": "K)123456",
            "issue_country_code": "GRC",
            "expiration_date": 13423423222
        },
        "id_details": {
            "id_number": "132465",
            "issue_country_code": "CYP",
            "expiration_date": 1129876567
        },
        "name_day": {
            "month": 4,
            "day": 12
        },
        "date_of_birth": {
            "year": 1999,
            "month": 12,
            "day": 31
        }
    }
    "addresses": [
        {
            "address_type": "HOME",
            "is_primary": "true",
            "address_line_1": "",
            "address_line_2": "Thomas V",
            "state_province_county": "Active",
            "town_city": "",
            "postal_code": "",
            "country_code": "CYP"
        }
    ],
    "phones": [
        {
            "is_primary": true,
            "country_code": "CYP",
            "number": "238065437"
        }
    ],
    "email_address": "bill@gmail.com",
    "accounts": [
        {
            "name": "",
            "is_primary": true,
            "credit_limit": 250,
            "currency_code": "GBP",
            "classification_id": ""
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "referral_code": "REF123",
    "loyalty_identifier": "1234567897415"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Update Contact
PUT /contacts/{id}

Update a Contact, it is possible to supply a partial body so that only supplied items will be updated.

Path variables

id
string required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
company_name
string

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

Example:
Good Burger
title
string

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

Example:
Sir
first_name
string

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

Example:
Louis
middle_name
string

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

Example:
Aloz
last_name
string

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

Example:
Kozior
preferred_language_code
string
Example:
ENG
category_id
string GUID

The contact’s category ID

Example:
4AD9C84FA60F9FE407140E20F707726A
notes
string
Example:
Notes
statutory_number
string
Example:
EF12345
demographics
Object
gender
string
Enumeration:
MALE
FEMALE
country_of_residence
string
passport
Object
passport_number
string
issue_country_code
string
Example:
GRC
expiration_date
integer
Example:
129876567
id_details
Object
id_number
string
isssue_country_code
string
Example:
CYP
expiration_date
integer
name_day
Object
month
integer
Example:
10
day
integer
Example:
4
date_of_birth
Object
year
integer
Example:
2018
month
integer
Example:
10
day
integer
Example:
16
company_profile
Object

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

industry_id
string GUID

The company’s Industry ID

Example:
4AD9C84FA60F9FE407140E20F707726A
industry_sectors
Array

The company’s Industry Sectors.

string GUID
Example:
4AD9C84FA60F9FE407140E20F707726A
profle_year
number
annual_turnover
number
established_on
integer
number_of_employees
number
registration_number
string
registration_country
string
tax_reference_number
string
vat_registration_number
string
addresses
Array
Object
id
string
address_type
string
Enumeration:
HOME
BUSINESS
is_primary
string
Example:
true
address_line_1
string required
address_line_2
string
Example:
Thomas V
state_province_county
string
Example:
California
town_city
string
postal_code
string
country_code
string
Example:
CYP
lat
string
lon
string
googlePlaceId
string
phones
Array
Object
id
string
is_primary
boolean
Example:
true
country_code
string
Example:
44
number
string
Example:
238065437
phone_type
string
Enumeration:
LANDLINE
MOBILE
FAX
custom_fields
Array
Object
key
string

The custom field’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345
email_address
string
Example:
bill@gmail.com
sms_opt_out
boolean

The contact setting for receiving sms.

email_opt_out
boolean

The contact setting for receiving emails.

is_tax_exempt
boolean

Defines whether the contact is tax exempt or not

Example:
false

Responses

200 200

OK

Body
Object
id
string

The updated contact’s GUID

Example:
GUID
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Content-Type: application/json

{
    "company_name": "Good Burger",
    "title": "Sir",
    "first_name": "Louis",
    "middle_name": "Aloz",
    "last_name": "Kozior",
    "preferred_language_code": "ENG",
    "category_id": "4AD9C84FA60F9FE407140E20F707726A",
    "notes": "Notes",
    "statutory_number": "EF12345",
    "demographics": {
        "gender": "FEMALE",
        "country_of_residence": "",
        "passport": {
            "passport_number": "",
            "issue_country_code": "GRC",
            "expiration_date": 129876567
        },
        "id_details": {
            "id_number": "",
            "isssue_country_code": "CYP",
            "expiration_date": 1
        },
        "name_day": {
            "month": 10,
            "day": 4
        },
        "date_of_birth": {
            "year": 2018,
            "month": 10,
            "day": 16
        }
    },
    "company_profile": {
        "industry_id": "4AD9C84FA60F9FE407140E20F707726A",
        "industry_sectors": [
            "4AD9C84FA60F9FE407140E20F707726A"
        ],
        "profle_year": 1,
        "annual_turnover": 1,
        "established_on": 1,
        "number_of_employees": 1,
        "registration_number": "",
        "registration_country": "",
        "tax_reference_number": "",
        "vat_registration_number": ""
    },
    "addresses": [
        {
            "id": "",
            "address_type": "HOME",
            "is_primary": "true",
            "address_line_1": "",
            "address_line_2": "Thomas V",
            "state_province_county": "California",
            "town_city": "",
            "postal_code": "",
            "country_code": "CYP"
        }
    ],
    "phones": [
        {
            "id": "",
            "is_primary": true,
            "country_code": "44",
            "number": "238065437",
            "phone_type": "LANDLINE"
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "email_address": "bill@gmail.com",
    "sms_opt_out": true,
    "email_opt_out": true,
    "is_tax_exempt": "false"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "GUID"
}
List Contacts
GET /contacts

Search For Contacts

Request parameters

page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
search_value
string optional

The value of the search across Full Name, Company Name, Contact Code, Phone Number and Loyalty Identifier (case insensitive)

Example:
C0123456
code
string optional

Unique Code of Contact

last_name
string optional

The last name of contact. Applicable only when searching for physical persons

company_name
string optional

The name of the company. Applicable only when searching for companies

email_address
string optional

The email address of the contact

phone_number
string optional

The phone number of the contact

statutory_number
string optional

The contact’s unique statutory number

first_name
string optional

The first name of contact. Applicable only when searching for physical persons

include_financials
boolean optional

If set to true then information about the primary account and wallet will be also retrieved

cim
string optional

The customer identification medium

Example:
123456
loyalty_identifier
string optional

The contact’s loyalty identifier

Example:
1234567897415
registered_from
integer optional

The date from which the contact was registered

register_to
integer optional

The date unitl which the contact was registered

owned_by
string optional

The unique identifier of the organisation that owns the contact

metrics
string optional

Defines the additional metrics to be retrieved in the response (comma separated)

Example:
SUBSCRIPTIONS, SCHEMES

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

Body
Object
content
Array
Object
id
string GUID

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
code
string

The contact code

Example:
ABC-123
contact_type
string

The contact type

Example:
PERSON
contact_name
string

The contact full name

Example:
John CRM Doe
statutory_number
string

The contact statutory number

Example:
EF00001231
registered_on
integer epoch

The date on which the contact was registered in CRM.COM

category
Object

Information about the contact’s category

id
string GUId

The category identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The category name

Example:
VIP
addresses
Array

Details about contact addresses

Object
id
string GUID

The address id

Example:
60bcca96-4965-4d56-8341-cb6f5ae61803
address_type
string

The address type

Enumeration:
HOME
BUSINESS
is_primary
boolean

Defines whether the address is the primary one

Example:
true
address_line_1
string required
Example:
Elia Papakyriakou
address_line_2
string
Example:
7 Stars Tower
state_province_county
string
Example:
Egkomi
town_city
string
Example:
Nicosia
postal_code
string
Example:
2000
country
string required
Example:
CYP
lat
number
lon
number
googlePlaceId
string
phones
Array

Details about contact’s phone

Object
id
string GUID

The phone identifier

Example:
60bcca96-4965-4d56-8341-cb6f5ae61803
phone_type
string
Enumeration:
LANDLINE
MOBILE
FAX
is_primary
boolean

Defines whether the phone is the primary one

Example:
true
country_code
string
Example:
357
number
string
Example:
99999999
email_address
string

The contact’s email

Example:
bill@gmail.com
financials
Object

The primary account and primary wallet (if available) of the contact. Available only if “financials” parameter is set to True

account
Object
id
string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
number
string
Example:
AR123
life_cycle_state
string
Enumeration:
ACTIVE
SUSPENDED
TERMINATED
currency_code
string
Example:
EUR
overdue_amount
number
Example:
1
balance
number
Example:
200
wallet
Object
id
string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
code
string
Example:
W132
life_cycle_state
string
Enumeration:
ACTIVE
SUSPENDED
balance
number
Example:
200
wallet_currency_code
string
Example:
EUR
interaction_status
string enum

The interaction status of the contact, retrieved by REDIS

Examples:
OPERATIONALNEVER_OPERATIONALRESTINGDORMANT
metrics
Object

Retrieves the metrics requested

subscriptions
Object
timestamp
integer epoch

Defaults to current timestamp

Example:
1589791784
total
integer

Total number of Subscriptions

Example:
2
schemes
Object
timestamp
integer epoch

Defaults to current timestamp

Example:
1589791784
total
integer

Total number of Schemes

Example:
2
kyc_profile
Object

The Contact’s assigned KYC profile

id
string GUID

The ID of the KYC profile

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the KYC profile

Example:
Standard
kyc_status
string

The status of the KYC profile assigned to Contact

Enumeration:
PENDING
VERIFIED
loyalty_identifiers
Array

The contact’s loyalty identifiers (cards)

Object
id
string GUID

The unique identifier of the loyalty identifier (CIM)

Example:
3311eb31-1f2c-5d8f-ae0d-d22595bbfb7a
identifier
string

The loyalty identifier

Example:
234234234324234234234234
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/contacts HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "contacts": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "code": "ABC-123",
            "contact_type": "PERSON",
            "contact_name": "John CRM Doe",
            "statutory_number": "EF00001231",
            "registered_on": 1,
            "category": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "VIP"
            },
            "addresses": [
                {
                    "id": "60bcca96-4965-4d56-8341-cb6f5ae61803",
                    "address_type": "BUSINESS",
                    "is_primary": "true",
                    "address_line_1": "Elia Papakyriakou",
                    "address_line_2": "7 Stars Tower",
                    "state_province_county": "Egkomi",
                    "town_city": "Nicosia",
                    "postal_code": "2000",
                    "country": "CYP"
                }
            ],
            "phones": [
                {
                    "id": "60bcca96-4965-4d56-8341-cb6f5ae61803",
                    "phone_type": "FAX",
                    "is_primary": "true",
                    "country_code": "357",
                    "number": "99999999"
                }
            ],
            "email_address": "bill@gmail.com",
            "financials": {
                "account": {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "number": "AR123",
                    "life_cycle_state": "ACTIVE",
                    "currency_code": "EUR",
                    "overdue_amount": 1,
                    "balance": 200
                },
                "wallet": {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "code": "W132",
                    "life_cycle_state": "ACTIVE",
                    "balance": 200,
                    "alternative_balance": 12,
                    "wallet_currency_code": "EUR",
                    "alternative_currency_code": "PTS"
                }
            },
            "interaction_status": "RESTING",
            "metrics": {
                "subscriptions": {
                    "timestamp": 1589791784,
                    "total": 2
                },
                "schemes": {
                    "timestamp": 1589791784,
                    "total": 2
                }
            },
            "kyc_profile": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "Standard"
            },
            "kyc_status": "PENDING"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Contact
GET /contacts/{id}

Get Contact information for a given Contact

Path variables

id
string required

The contact identifier (GUID) or code that should be returned

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The contact’s GUID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
code
string

The contact’s unique code

Example:
ABC-123
contact_type
string

Type of contact support types include Person and Company.

Enumeration:
PERSON
COMPANY
company_name
string

The name of the company if the contact type is COMPANY

Example:
Louis Kozior
title
string

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

Example:
Sir
first_name
string

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

Example:
Louis
middle_name
string

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

Example:
Aloz
last_name
string

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

Example:
Kozior
contact_name
string

The full name of the Contact taking into consideration the name display settings

Example:
Mark Johnson
preferred_language_code
string

The contact’s preferred language for communication

Example:
ENG
notes
string

Notes for the contact

Example:
Notes
statutory_number
string

The contact’s unique statutory code

Example:
EF-12345
is_tax_exempt
boolean

Defines whether the contact is Tax Exempt or not

Example:
true
category
Object
id
string

The category’s GUID

Example:
GUID
name
string
Example:
Category A
demographics
Object

The contact’s dmographic information. Applicable only if the contact type is PERSON

gender
string
Example:
FEMALE
country_of_residence
string
passport
Object
passport_number
string
issue_country_code
string
Example:
GRC
expiration_date
integer
Example:
129876567
id_details
Object
id_number
string
issue_country_code
string
Example:
CYP
expiration_date
integer
name_day
Object
month
integer
Example:
10
day
integer
Example:
4
date_of_birth
Object
year
integer
Example:
2018
month
integer
Example:
10
day
string
Example:
16
company_profile
Object

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

industry
Object

The company’s Industry details

id
string
name
string
industry_sectors
Array

The company’s Industry Sectors

Object
id
string
Example:
342343234234
name
string
profile_year
number
annual_turnover
number
established_on
integer
number_of_employees
number
registration_number
string
registration_country
string
tax_reference_number
string
vat_registration_number
string
addresses
Array
Object
id
string

The address’s id

address_type
string
Enumeration:
HOME
BUSINESS
is_primary
string
Example:
true
care_of
string
address_line_1
string required
address_line_2
string
Example:
Thomas V
state_province_county
string
Example:
Active
town_city
string
postal_code
string
country
string
Example:
CYP
lat
number

The latitude of the address

Example:
35.157115
lon
number

The longitude of the address

Example:
33.313719
googlePlaceId
string

The Google textual identifier that uniquely identifies an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
phones
Array
Object
id
string

The phone’s GUID

phone_type
string
Enumeration:
LANDLINE
MOBILE
FAX
is_primary
boolean
Example:
true
country_code
string
Example:
44
number
string
Example:
238065437
custom_fields
Array
Object
key
string

The custom field’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345
email_address
string

The contact’s email

Example:
bill@gmail.com
consent_state
string

The contact’s consent state

Enumeration:
PENDING
REJECTED
ACCEPTED
WITHDRAWN
is_anonymized
boolean

Defines whether the contact is anonymized

interaction_status
string enum

The contact’s interaction status, retrieved from REDIS

Examples:
OPERATIONALNEVER_OPERATIONALRESTINGDORMANT
total_spend
string

The contact’s total spend amount in the last 12 months, retrieved from REDIS

Example:
250
sms_opt_out
boolean
email_opt_out
boolean
kyc_profile
Object

The Contact’s assigned KYC profile

id
string GUID

The ID of the KYC profile

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the KYC profile

Example:
Standard
kyc_status
string

The status of the KYC profile assigned to Contact

Enumeration:
PENDING
VERIFIED
referral_code
string

The contact referral code

Example:
REF123
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "code": "ABC-123",
    "contact_type": "PERSON",
    "company_name": "Louis Kozior",
    "title": "Sir",
    "first_name": "Louis",
    "middle_name": "Aloz",
    "last_name": "Kozior",
    "contact_name": "Mark Johnson",
    "preferred_language_code": "ENG",
    "notes": "Notes",
    "statutory_number": "EF-12345",
    "is_tax_exempt": "true",
    "category": { 
        "id": "GUID",
        "name": "Category A"
    },
    "demographics": {
        "gender": "FEMALE",
        "country_of_residence": "",
        "passport": {
            "passport_number": "",
            "issue_country_code": "GRC",
            "expiration_date": 129876567
        },
        "id_details": {
            "id_number": "",
            "issue_country_code": "CYP",
            "expiration_date": 1
        },
        "name_day": {
            "month": 10,
            "day": 4
        },
        "date_of_birth": {
            "year": 2018,
            "month": 10,
            "day": "16"
        }
    },
    "company_profile": {
        "industry": {
            "id": "",
            "name": ""
        },
        "industry_sectors": [
            {
                "id": "342343234234",
                "name": ""
            }
        ],
        "profile_year": 1,
        "annual_turnover": 1,
        "established_on": 1,
        "number_of_employees": 1,
        "registration_number": "",
        "registration_country": "",
        "tax_reference_number": "",
        "vat_registration_number": ""
    },
    "addresses": [
        {
            "id": "",
            "address_type": "HOME",
            "is_primary": "true",
            "care_of": "",
            "address_line_1": "",
            "address_line_2": "Thomas V",
            "state_province_county": "Active",
            "town_city": "",
            "postal_code": "",
            "country": "CYP",
            "lat": 35.157115,
            "lon": 33.313719,
            "googlePlaceId": "ChIJrTLr-GyuEmsRBfy61i59si0"
        }
    ],
    "phones": [
        {
            "id": "",
            "phone_type": "LANDLINE",
            "is_primary": true,
            "country_code": "44",
            "number": "238065437"
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "email_address": "bill@gmail.com",
    "consent_state": "ACCEPTED",
    "is_anonymized": true,
    "interaction_status": "DORMANT",
    "total_spend": "250",
    "sms_opt_out": true,
    "email_opt_out": true,
    "kyc_profile": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "Standard"
    },
    "kyc_status": "VERIFIED",
    "referral_code": "REF123",
    "loyalty_identifier": "1234567891234"
}
Get Contact Activity Feed
GET /contacts/{id}/activity_feed

Retrieves Contact’s activity feed

Path variables

id
string GUID required

The contact identifier that the activity will be retrieved for

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
activity_type
string optional

The activity type

Enumeration:
INVOICE
PAYMENT
CREDIT_NOTE
REFUND
TOP_UP
TRANSFER
PURCHASE
AWARD
SPEND
REFERRAL
created_date
string epoch optional

The created date of the activity (no time)

Example:
1576486645

Responses

200 200

Successful Request

Body
Object
activity_feed
Array
Object
id
string GUID

The activity unique ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
number
string

The entity’s number

Example:
I10003
reference_number
string

The entity’s reference number

Example:
Ref12345678
code
string

The entity’s code

Example:
123456789ABE2364
state
string

The entity’s life cycle state

Example:
POSTED
created_date
integer epoch

The date and time where the activity was created

Example:
1576486645
activity_type
string

The activity type

Enumeration:
INVOICE
PAYMENT
REFUND
CREDIT_NOTE
TOP_UP
TRANSFER
PURCHASE
AWARD
SPEND
direction
string

The entity’s direction.

Enumeration:
INCOMING
OUTGOING
notes
string

The notes of the activity

Example:
This Invoice is created for November 2019
type
string

The entity’s type name

Example:
INVOICE
total_amount
number

The entity’s total amount

Example:
200
currency
string

The currency code provided in the entity

Example:
EUR
due_date
integer epoch

The entity’s due date in case of Invoices

Example:
1576486645
reward_offer
string

The name of the reward offer that provided the Award

Example:
Happy Birthday Offer
merchant_name
string

The name of the merchant that the activity was performed for

Example:
Bakery Nicosia
topup_entity
Object

The entity that the topup was performed for

id
string GUID

The unique ID of the topup entity

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
number
string

The number or code of the topup entity

Example:
AC00123 John Johnson
type
string

The type of the topup entity

Enumeration:
ACCOUNT
WALLET
transfer_origin_entity
Object

The origin entity that the transfer was performed from

id
string GUID

The unique ID of the transfer origin entity

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
number
string

The number or code of the transfer origin entity

Example:
AC00123 John Johnson
type
string

The type of the transfer origin entity

Enumeration:
ACCOUNT
WALLET
transfer_dest_entity
Object

The destination entity that the transfer was performed for

id
string GUID

The unique ID of the transfer destination entity

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
number
string

The number or code of the transfer destination entity

Example:
W00123 John Johnson
type
string

The type of the transfer destination entity

Enumeration:
ACCOUNT
WALLET
referred_by_account
Object

The referred by account details

id
string GUID

The referred by account identifer

Example:
4bab629d-0d6b-f93b-4664-82cea61c1481
name
string

The referred by account name

Example:
John Doe
number
string

The referred by account number

Example:
AR0000112346
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/activity_feed HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "activity_feed": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "number": "I10003",
            "reference_number": "Ref12345678",
            "code": "123456789ABE2364",
            "state": "POSTED",
            "created_date": 1576486645,
            "activity_type": "TRANSFER",
            "direction": "INCOMING",
            "notes": "This Invoice is created for November 2019",
            "type": "INVOICE",
            "total_amount": 200,
            "currency": "EUR",
            "due_date": 1576486645,
            "reward_offer": "Happy Birthday Offer",
            "merchant_name": "Bakery Nicosia",
            "topup_entity": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "number": "AC00123 John Johnson",
                "type": "WALLET"
            },
            "transfer_origin_entity": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "number": "AC00123 John Johnson",
                "type": "WALLET"
            },
            "transfer_dest_entity": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "number": "W00123 John Johnson",
                "type": "ACCOUNT"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
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

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10
type
string optional
Enumeration:
CARD
DIRECT_DEBIT
PAYPAL
ACCOUNT
WALLET

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
content
Array
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:
true
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
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:
JCC
STRIPE
token
string

The card token

Example:
123654789654
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "payment_method_type": "CARD",
            "is_primary": true,
            "is_backup": true,
            "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": 5124
    }
}
Change Password
POST /contacts/change_password

Changes the password for a contact’s identity

Request body

Object
token
string required nullable

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

Responses

200 OK

The request has succeeded

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/contacts/change_password HTTP/1.1 

Content-Type: application/json

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

HTTP/1.1 200 OK 
Address
POST /contacts/{id}/addresses
PUT /contacts/{id}/addresses/{address_id}
DELETE /contacts/{id}/addresses/{address_id}
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 that the address should be added

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
address_type
string
Enumeration:
HOME
BUSINESS
care_of
string
is_primary
boolean
address_line_1
string
address_line_2
string
Example:
Thomas V
state_province_county
string
Example:
Active
town_city
string
postal_code
string
country_code
string
Example:
CYP
lat
number nullable

The latitude of the address

Example:
35.157115
lon
number nullable

The longitude of the address

Example:
33.313719
googleplaceid
string nullable

The Google textual identifier that uniquely identifies an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the address

Example:
9d1df8ce-cecd-d335-2b44-2644c9576e6f
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://devapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses HTTP/1.1 

Content-Type: application/json

{
    "address_type": "HOME",
    "care_of": "",
    "is_primary": true,
    "address_line_1": "",
    "address_line_2": "Thomas V",
    "state_province_county": "Active",
    "town_city": "",
    "postal_code": "",
    "country_code": "CYP"
}
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 that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
address_id
string GUID required

The address identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
care_of
string
is_primary
boolean
address_line_1
string
address_line_2
string
Example:
Thomas V
state_province_county
string
Example:
Active
town_city
string
postal_code
string
country_code
string
Example:
CYP
lat
number nullable

The latitude of the address

Example:
35.157115
lon
number nullable

The longitude of the address

Example:
33.313719
googleplaceid
string nullable

The Google textual identifier that uniquely identifies an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the address

Example:
9d1df8ce-cecd-d335-2b44-2644c9576e6f
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Remove Contact Address
DELETE /contacts/{id}/addresses/{address_id}

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

Path variables

id
string GUID required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
address_id
string GUID required

The contact identifier that will be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

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

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
KYC Profile
PUT /contacts/{id}/kyc
POST /contacts/{id}/kyc/verify
Update Contact KYC Profile
PUT /contacts/{id}/kyc

Update the contact’s KYC profile

Path variables

id
string GUID required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
kyc_id
string GUID

The id of the KYC to be provided to the contact

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the contact

Example:
4AD9C84FA60F9FE407140E20F707726A
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/kyc HTTP/1.1 

Content-Type: application/json

{
    "kyc_id": "4AD9C84FA60F9FE407140E20F707726A"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4AD9C84FA60F9FE407140E20F707726A"
}
Verify Contact KYC Profile
POST /contacts/{id}/kyc/verify

Set the KYC profile status of a Contact as Verified

Path variables

id
string GUID required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the contact

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/kyc/verify HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Phone
POST /contacts/{id}/phones
PUT /contacts/{id}/phones/{phone_id}
DELETE /contacts/{id}/phones/{phone_id}
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 identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
is_primary
boolean
number
string

697665675

country_code
string
Example:
GRC
phone_type
string
Enumeration:
LANDLINE
MOBILE
FAX

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the phone

Example:
9d1df8ce-cecd-d335-2b44-2644c9576e6f
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

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

Content-Type: application/json

{
    "is_primary": true,
    "number": "",
    "country_code": "GRC"
}

HTTP/1.1 200 OK 

Content-Type: application/json

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

Update the phone of an existing contact

Path variables

id
string GUID required

The contact identifer that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
phone_id
string GUID required

The phone identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
is_primary
boolean
number
string

The contact’s phone number

country_code
string
Example:
GRC

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the phone

Example:
9d1df8ce-cecd-d335-2b44-2644c9576e6f
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

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 identifier whose phone will be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
phone_id
string GUID required

The phone identifier that will be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

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

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 
Loyalty Identifier
POST /contacts/{id}/loyalty_identifiers
DELETE /contacts/{id}/loyalty_identifiers/{loyalty_id}
GET /contacts/{id}/loyalty_identifiers
Add Loyalty Identifier
POST /contacts/{id}/loyalty_identifiers

Add a new loyalty identifier to an existing contact. A contact can have multiple loyalty identifier

Path variables

id
string GUID required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
identifier
string required

The loyalty identifier

Example:
123234345624356213

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the loyalty identifier (CIM)

Example:
891d84dd-4b3b-84b3-ba87-aa63fed3b88a
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/loyalty_identifiers HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "identifier": "123234345624356213"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "891d84dd-4b3b-84b3-ba87-aa63fed3b88a"
}
Remove Loyalty Identifier
DELETE /contacts/{id}/loyalty_identifiers/{loyalty_id}

Removes a contact loyalty identifier. A single loyalty identifier can be removed at a time

Path variables

id
string GUID required

The contact identifier whose phone will be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
loyalty_id
string GUID required

The loylaty identifier (CIM based) that will be removed

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
DELETE https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/loyalty_identifiers/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 
List Loyalty Identifiers
GET /contacts/{id}/loyalty_identifiers

Retrieve the loyalty identifiers for a specific contact

Path variables

id
string GUID required

The contact identifier that loyalty identiers will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

Body
Object
content
Array
Object
id
string GUID

The unique identifier of the loyalty identifier (CIM)

Example:
7dd8120f-4c47-839c-dee1-fbc945b3c3f9
identifier
string

The loyalty identifier of the customer

Example:
2367234512365
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/loyalty_identifiers HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "id": "d8f5ee58-6949-0bd6-6218-d10d9426a04c",
        "identifier": "1234567892345"
    },
    {
        "id": "d8f5ee58-6949-0bd6-6218-d10d9426a04Q",
        "identifier": "1234567892343"
    }
]
Applications Usage
GET /contacts/{id}/applications
DELETE /contacts/{id}/applications/{app_id}
List Applications Usage
GET /contacts/{id}/applications

List of applications that are used by a specific contact

Path variables

id
string GUID required

The contact identifier whose applications usage will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The application usage identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
first_usage_date
integer epoch

The date on which the first uage was recorded

Example:
1598598647
platform
string

The platform on which the application was downloaded

Enumeration:
ANDROID
IOS
application
Object

The payment method that is related with the account

id
string GUID

The application identiier

Example:
af9c61d3-7685-e31f-3387-27c42858e868
name
string

The application name

Example:
Best Coffee App
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/applications HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "first_usage_date": 1598598647,
            "platform": "IOS",
            "application": {
                "id": "af9c61d3-7685-e31f-3387-27c42858e868",
                "name": "Best Coffee App"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Remove Applications Usage
DELETE /contacts/{id}/applications/{app_id}

Remove an application from a contact

Path variables

id
string GUID required

The contact identifier whose applications usage will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
app_id
string GUID required

The application usage record identifier that will be removed

Example:
57561166-6aa5-3ce5-2269-c38febe7e888

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
DELETE https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/applications/57561166-6aa5-3ce5-2269-c38febe7e888 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 
PUT /contacts/{id}/consents
POST /contacts/{id}/anonymize
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 optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
consent_state
string

The consent state to be updated

Enumeration:
PENDING
ACCEPTED
REJECTED
WITHDRAWN

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the contact

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
PUT https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/consents HTTP/1.1 

Content-Type: application/json

{
    "consent_state": "REJECTED"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Anonymize Contact
POST /contacts/{id}/anonymize

Anonymizes a Contact

Path variables

id
string GUID required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the contact

400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Customer Events
Purchase Customer Events
POST /purchases
POST /purchases/{id}/cancel
GET /purchases
GET /purchases/{id}
GET /purchases/{id}/rewards
Create Purchase
POST /purchases

Create a new purchase customer event in posted life cycle state

Notes

Product SKUs and Product Families will be created automatically if they are submitted in a purchase and do not exist in CRM.COM

The supported reduction method should be provided, by specyfing such value on the API’s “reduction_method” attribute

Request headers

api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Request body

Object
id
string GUID nullable

The purchase customer event Identifier

Max length: 32
Example:
CEEE83D6E0804A30966F684B0269AD91
contact_id
string GUID required nullable

The contact identifier that the purchase is created for (customer identification can be made either using contact_ud or cim)

Max length: 32
Example:
79adca27-e50d-40d2-b025-e7d4710a1053
cim
string required nullable

The value for a single contact identification medium representing the customer that the purchase is created for (customer identification can be made either using contact_ud or cim)

Example:
4A30966F684B0269AD91
contact_token
string nullable

The token that will identify the contact

Example:
123456
reference_number
string nullable

The purchase reference number

Example:
RF000001
payment_medium_identifier
string nullable

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

Example:
42424242
performed_on
integer epoch nullable

The date that the customer event was performed

Example:
1572423477
reduction_method
string required

Defines the reduction method that will be applied on spend

Enumeration:
FRONT_END
BACK_END
products
Array required nullable

The purchased products. Applicable when net/tax/total amounts are not provided

Object
product_sku
string required nullable

The purchased product sku (semi-optional with product family)

Example:
FREDESPR001
product_name
string nullable

The purchased product name

Example:
Freddo Espresso
product_family
string required nullable

The purchase product family (semi-optional with product sku)

Example:
Chocolates
net_amount
number required

The purchased product net amount

Example:
14.15
tax_amount
number required

The purchased product vat amount

Example:
1.04
total_amount
number required

The purchased product total amount (net and vat amount)

Example:
15.19
quantity
integer nullable

The purchased product quantity

Default:
1
Example:
2
spend_request
Object nullable

Information related with the spend request that should be created as part of the purchase

amount
number required nullable

The amount to be spent by the specified spend request in system currency

Example:
2.12
merchant_tap
Object nullable

The merchant transactio acquiring point that the purchase was submitted from (id or code must be specified)

id
string GUID required nullable

The transaction acquiring point identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
code
string required nullable

The transaction acquiring point code

Example:
TAP001
outlet_tap
Object nullable

The venue transactio acquiring point that the purchase was submitted from (id or code must be specified)

id
string GUID required nullable

The transaction acquiring point identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
code
string required nullable

The transaction acquiring point code

Example:
TAP002
discount_amount
number nullable

The discount of the purchase

Example:
14.56
net_amount
number required nullable

The purchase net amount. Applicable when products (sku/family) are not provided

Example:
121.1
tax_amount
number required nullable

The purchase tax amount. Applicable when products (sku/family) are not provided

Example:
10.1
total_amount
number required nullable

The purchase total amount (net + tax - discount). Applicable when products (sku/family) are not provided

Example:
131.2
classification
Object nullable

The purchase classification

id
string GUID required nullable

The customer event classification identifier

Example:
c8d83493-3f50-40df-adb0-762ec5f41863
name
string required nullable

The customer event classification name

Example:
Delivery Purchase
pass
Object nullable

Details about the pass

code
string required

The pass code

Example:
1231231231231231
otp
string nullable

The pass one time password (if applicable)

Example:
2345

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The purchase identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
reference_number
string

The purchase reference number (applicable only for Front-End Reduction)

Example:
RF123
total_award
number

The total award amount (applicable only for Front-End Reduction)

Example:
1.4
total_spend
number

The sum of all spends (instant discount, auto spends, spends on request). Applicable only for Front End Reduction

Example:
2.21
instant_discount
number

The spend related to instant discount. Applicable only for Front End Reduction

Example:
0.21
auto_spend
number

The spend related to auto spend requests. Applicable only for Front End Reduction

Example:
1.51
spend_on_request
number

The actual spend related to requested spend requests. Applicable only for Front End Reduction

Example:
0.49
400 400

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

401 401

The provided API Key or Token is invalid

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
Example 2
POST /purchases HTTP/1.1 

Content-Type: application/json

{
    "id": "CEEE83D6E0804A30966F684B0269AD91",
    "cim": "4A30966F684B0269AD91",
    "reference_number": "RF000001",
    "payment_medium_identifier": "42424242",
    "performed_on": 1572423477,
    "discount_amount": 1.56,
    "reduction_method": "BACK_END",
    "products": [
        {
            "product_sku": "FREDESPR001",
            "net_amount": 14.15,
            "tax_amount": 1.04,
            "total_amount": 15.19,
            "quantity": 2
        }
    ],
    "spend_request": {
        "amount": 2.12
    },
    "merchant_tap": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "code": "EK123456"
    },
    "outlet_tap": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "code": "CD123456"
    }
}
{
    "contact_id": "79adca27-e50d-40d2-b025-e7d4710a1053",
    "reference_number": "1234567890",
    "payment_medium_identifier": "42424242",
    "reduction_method": "FRONT_END",
    "products": [
        {
            "product_sku": "FREDESPR001",
            "product_name": "Freddo Espresso",
            "product_family": "Chocolates",
            "net_amount": 1200,
            "tax_amount": 0.00,
            "total_amount": 1200,
            "quantity": 2
        }
    ],
  
    "merchant_tap": {
        "code": "TAP001"
    },
    "outlet_tap": {
        "code": "TAP002"
    }
}
Cancel Purchase
POST /purchases/{id}/cancel

Cancel an existing customer’s purchase and as a result any related awards/spends will be reversed

Path variables

id
string required

The purchase identifier that will be canceled

Example:
CEEE83D6E0804A30966F684B0269AD91

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The customer event identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST /purchases/CEEE83D6E0804A30966F684B0269AD91/cancel HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CEEE83D6E0804A30966F684B0269AD91"
}
Search Purchases
GET /purchases

Search for purchase customer events

Request parameters

contact_id
string GUID optional

The contact identifier who performed the purchase

Example:
CEEE83D6E0804A30966F684B0269AD91
contact_code
string optional

The contact code who performed the purchase

Example:
ABC1234
reference_number
string optional

The purchase’s reference number

Example:
REF1234
from_date
integer epoch optional

The date from which the purchase was performed.If not specified, then the last 10 purchases will be returned

to_date
integer epoch optional

The date until which the purchase was performed

life_cycle_state
string optional

The life cycle state of the customer event

Enumeration:
POSTED
CANCELLED
organisation_id
string GUID optional

The organisation that the purchase customer event was performed

Example:
CEEE83D6E0804A30966F684B0269AD91
tap_id
string GUID optional

The transaction acquiring point that captured the customer event

Example:
CEEE83D6E0804A30966F684B0269AD91
from_total_amount
number optional

Filters customer events that have greater or equal total amount as specified

Example:
1.12
to_total_amount
number optional

Filters customer events that have less or equal total amount as specified

Example:
1234.21
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The purchase identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
reference_number
string

The purchase’s reference number

Example:
REF1234
contact
Object

Contact details

id
string GUID

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The contact full name

Example:
John Doe
code
string

The contact code

Example:
CO1234
account
Object

Account details

id
string GUID

The account identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The account name

Example:
ACR1234 John Doe
number
string

The account number

Example:
ACR1234
life_cycle_state
string

The purchase’s life cycle state

Enumeration:
POSTED
CANCELLED
reduction_method
string

The reduction method that was applied on the related spend

Enumeration:
FRONT_END
BACK_END
classification
Object

The purchase event’s classification details

id
string GUID

The classification identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The classification name

Example:
Delivery
total_net_amount
number

The purchase’s total net amount of all products’ net amount

Example:
1.51
total_tax_amount
number

The purchase’s total tax amount of all products’ tax amount

Example:
0.49
discount_amount
number

The purchase’s discount amount

Example:
1
total_amount
number

The purchase’s total amount after discount

Example:
1
organisation
Object

The organisation details at which the purchase was performed

id
string GUID

The organisation identifier at which the purchase was performed

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The organisation name at which the purchase was performed

Example:
Bravo Coffee
performed_on
integer epoch

The date on which the purchase was performed

Example:
1576486645
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/purchases HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJmYmNmZjFmNS0zNDE2LTRkZWMtYTk3NC05YjA4MjBhMWQxNmIiLCJmdWxsX25hbWUiOiJHaW9yZ29zIFNha2thcyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJjdXJyZW50X29yZ2FuaXNhdGlvbl9pZCI6IjViZjNmOTkyLTE4ZGQtNGYzYi05ZTc0LTAyYWRkNGU1ZmJkNSIsInByaW1hcnlfb3JnYW5pc2F0aW9uX2lkIjoiNWJmM2Y5OTItMThkZC00ZjNiLTllNzQtMDJhZGQ0ZTVmYmQ1IiwiY3VycmVudF9vcmdhbmlzYXRpb25fbmFtZSI6IlN0YWdpbmciLCJpc3MiOiJodHRwczovL3d3dy5jcm0uY29tIiwiZ3JvdXBzIjpbIlZJRVdfT1JHQU5JU0FUSU9OUyIsIk1BTkFHRV9PUkdBTklTQVRJT05fR1JPVVBTIiwiTUFOQUdFX09SR0FOSVNBVElPTlMiLCJBTExPV19UT19NQVNRVUVSQURFIiwiTUFOQUdFX1VTRVJTIiwiVklFV19VU0VSUk9MRVMiLCJNQU5BR0VfVVNFUlJPTEVTIiwiTUFOQUdFX0FQSUtFWVMiLCJERUxFVEVfUk9MTF9BUElLRVlTIiwiU0VUX1VQX0lOVEVHUkFUSU9OUyIsIlZJRVdfQ09OVEFDVFMiLCJNQU5BR0VfQ09OVEFDVFMiLCJNQU5BR0VfQUNDT1VOVFMiLCJTRVRfVVBfQ09OVEFDVFMiLCJTRVRfVVBfRklOQU5DSUFMUyIsIlZJRVdfRklOQU5DSUFMX1RSQU5TQUNUSU9OUyIsIk1BTkFHRV9GSU5BTkNJQUxfVFJBTlNBQ1RJT05TIiwiU0VUX1VQX0NVU1RPTUVSX0VWRU5UUyIsIlZJRVdfQ1VTVE9NRVJfRVZFTlRTIiwiTUFOQUdFX0NVU1RPTUVSX0VWRU5UUyIsIk1BTkFHRV9XQUxMRVRTIiwiVklFV19XQUxMRVRfVFJBTlNBQ1RJT05TIiwiTUFOQUdFX1dBTExFVF9UUkFOU0FDVElPTlMiLCJTRVRfVVBfUFJPRFVDVFMiLCJWSUVXX1JFV0FSRF9TQ0hFTUVTIiwiTUFOQUdFX1JFV0FSRF9TQ0hFTUVTIiwiVklFV19SRVdBUkRfT0ZGRVJTIiwiTUFOQUdFX1JFV0FSRF9PRkZFUlMiLCJTRVRfVVBfUkVXQVJEUyIsIk1BTkFHRV9QTEFURk9STSJdLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJnX3Nha2thc0Bjcm0uY29tIiwicHJpbWFyeV9vcmdhbmlzYXRpb25fbmFtZSI6IlN0YWdpbmciLCJ0eXBlIjoiYWNjZXNzIiwiZW1haWwiOiJnX3Nha2thc0Bjcm0uY29tIiwiaWF0IjoxNTkxMTc5NjM1LCJhdXRoX3RpbWUiOjE1OTExNzk2MzUsImV4cCI6MTU5MTE4NjgzNSwianRpIjoiYjRlZDk1MmUtNTI4Ny00ZWVmLWE4N2YtN2FhYTIwYmI0OGM5In0.iydf6Yi-H6v9P44Jb8htXayfbsXQxtHMOKquVqChpDM3IrVBolLS6mZ3dPCu7aoMejRK_OgIrriABC54Eh2yX7bgOiClZYhAQbdu3BAnykhiywEgrULD3RXkwS90gtOq-Uu8lE8b9Bm1lBcOr3HRwzlS8pweSh7nGR93i7XzxOwgRmfHMa17IC9t3GNKxVjyanG8gPTpvJI9f1nMvAad-y-rG4T90DiVJQ_uDCKmCJ0eCwgH_v4jQvcRnufW9F_7wI8VbYiIzYMuQC8f0DGZFif57FKl6_HQIYOH22JB6M9bQrJoEGDKWLqjfDEVerLiyyQf05zYvLTHvI_P6Gcn-Q

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CEEE83D6E0804A30966F684B0269AD91",
            "reference_number": "REF1234",
            "contact": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "John Doe",
                "code": "CO1234"
            },
            "account": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "ACR1234 John Doe",
                "number": "ACR1234"
            },
            "life_cycle_state": "POSTED",
            "reduction_method": "BACK_END",
            "classification": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "Delivery"
            },
            "total_net_amount": 1.51,
            "total_tax_amount": 0.49,
            "discount_amount": 1,
            "total_amount": 1,
            "organisation": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "Bravo Coffee"
            },
            "performed_on": 1576486645
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Purchase
GET /purchases/{id}

Get details for a single purchase customer event

Path variables

id
string GUID required

The purchase customer event identifier that will be retrieved

Example:
CEEE83D6E0804A30966F684B0269AD91

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The purchase identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
reference_number
string

The purchase reference number

Example:
REF001
life_cycle_state
string

The purchase’s life cycle state

Enumeration:
POSTED
CANCELLED
reduction_method
string

The reduction method that was applied on the related spend

Enumeration:
FRONT_END
BACK_END
payment_medium_identifer
string

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

Example:
424242
performed_on
integer epoch

The date on which the purchase was performed

Example:
1576486645
total_net_amount
number

The purchase’s total net amount of all product lines’ net amount

Example:
1.59
total_tax_amount
number

The purchase’s total tax amount of all product lines’ tax amount

Example:
0.41
discount_amount
number

The purchase’s discount amount

Example:
0.5
total_amount
number

The purchase’s total amount after discount

Example:
1.5
requested_spend_amount
number

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

contact
Object

Contact details

id
string

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The contact full name

Example:
John Doe
code
string

The contact code

Example:
CO1234
account
Object

Account details

id
string GUID

The account identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The account name

Example:
ACR1234 John Doe
number
string

The account number

Example:
ACR1234
organisation
Object

The organisation from which the purchase was posted

id
string GUID

The organisation identifier at which the purchase was performed

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The organisation name at which the purchase was performed

Example:
Bravo Coffee
tap
Object

The transaction acquiring point that captured the purchase

id
string GUID

The transaction acquiring point identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The transaction acquiring point name

Example:
ePOS
code
string

The transaction acquiring point code

Example:
TAP00012
rewards
Object

Information (dynamic) about the award/spend amounts

total_award_amount
number

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

Example:
121.99
total_spend_amount
number

The total amount (automatic + instant+ spend on request) 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
ad_hoc_return
Object

Details of ad hoc return of goods

amount
number

The amount that the customer was debited due to ad hoc return of goods

Example:
12.34
ad_hoc_return_date
integer epoch

The date that ad hoc retun of goods was applied

Example:
1589987160
reference_number
string

The ad hoc return reference number

Example:
AHR001
return_amount
number

The amount that was returned

Example:
200.99
currency
string

The currency that the ad hoc return was made

Example:
EUR
products
Array

Information about the purchase’s product line items

Object
product_sku
Object

Information about the product sku

id
string GUID

The product identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
sku
string

The product sku

Example:
SKU00012
name
string

The product name

Example:
Cappuccino
description
string

The product description

Example:
Cappuccino Coffee
product_family
Object

Information about the product family

id
string GUID

The product family identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The product family

Example:
Chocolates
quantity
integer

The quantity of the line item

Example:
1
net_amount
number

The net amount of the line item

Example:
1.08
tax_amount
number

The tax amount of the line item

Example:
0.51
total_amount
number

The total amount (net + tax) of the line item

Example:
1.59
classification
Object

Details about the customer event classification

id
string GUID

The customer event classification identifier

Example:
c8d83493-3f50-40df-adb0-762ec5f41863
name
string

The customer event classification name

Example:
Delivery Purchase
pass
Object

Details about the customer event pass

id
string GUID

The pass identifier

Example:
83cbad41-86ee-4aa5-bc5a-6483094dceca
code
string

The pass code

Example:
132465798
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/purchases/CEEE83D6E0804A30966F684B0269AD91 HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CEEE83D6E0804A30966F684B0269AD91",
    "reference_number": "REF001",
    "life_cycle_state": "CANCELLED",
    "reduction_method": "BACK_END",
    "payment_medium_identifer": "424242",
    "performed_on": 1576486645,
    "total_net_amount": 1.59,
    "total_tax_amount": 0.41,
    "discount_amount": 0.5,
    "total_amount": 1.5,
    "requested_spend_amount": 1,
    "contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Doe",
        "code": "CO1234"
    },
    "account": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "ACR1234 John Doe",
        "number": "ACR1234"
    },
    "organisation": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "Bravo Coffee"
    },
    "tap": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "ePOS",
        "code": "TAP00012"
    },
    "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
    },
    "products": [
        {
            "product_sku": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "sku": "SKU00012",
                "name": "Cappuccino",
                "description": "Cappuccino Coffee"
            }
            "quantity": 1,
            "net_amount": 1.08,
            "tax_amount": 0.51,
            "total_amount": 1.59
        },
        {
            "product_family": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "Chocolates"
            },
            "quantity": 1,
            "net_amount": 1.08,
            "tax_amount": 0.51,
            "total_amount": 1.59
        }
    ]
}
List Purchase Rewards Breakdown
GET /purchases/{id}/rewards

Get reward details (awards/spends) for a specific purchase customer event

Path variables

id
string GUID required

The purchase identifier whose rewards details will be retrieved

Example:
CEEE83D6E0804A30966F684B0269AD91

Request parameters

type
string optional

The reward type

Enumeration:
AWARD
SPEND

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
content
Array

Details about the reward (award/spend) breakdown

Object
type
string

The reward type

Enumeration:
AWARD
SPEND
reward_offer
Object

Details about the reward offer that triggered the award/spend (spend is related to an offer when is instantly spend)

id
string GUID

The reward offer identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The reward offer name

Example:
1% cashback on all products
spend_method
string

The reward spend method

Enumeration:
SPEND_ON_REQUEST
AUTOMATIC_SPEND_REQUEST
INSTANT_DISCOUNT
amount
number

The award/spend amount

Example:
9.99
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://devapi.crm.com/backoffice/v1/purchases/CEEE83D6E0804A30966F684B0269AD91/rewards HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "type": "AWARD",
            "reward_offer": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "1% cashback on all products"
            },
            "spend_method": "INSTANT_DISCOUNT",
            "amount": 9.99
        }
    ]
}
Referral Customer Events
POST /referrals/{id}/cancel
GET /referrals
GET /referrals/{id}
Cancel Referral
POST /referrals/{id}/cancel

Cancel an existing customer’s referral and as a result any related awards will be reversed

Path variables

id
string required

The referral identifier that will be canceled

Example:
CEEE83D6E0804A30966F684B0269AD91

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The customer event identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST /referrals/CEEE83D6E0804A30966F684B0269AD91/cancel HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CEEE83D6E0804A30966F684B0269AD91"
}
Search Referrals
GET /referrals

Search for referral customer events

Request parameters

referred_contact_id
string GUID optional

The referred contact identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
referred_by_contact_id
string GUID optional

The referred by contact identifier

reference_number
string optional

The referral’s reference number

Example:
REF1234
from_date
integer epoch optional

The date from which the referral was performed

to_date
integer epoch optional

The date until which the referral was performed

life_cycle_state
string optional

The life cycle state of the customer event

Enumeration:
POSTED
CANCELLED
organisation_id
string GUID optional

The organisation that the referral customer event was performed

Example:
CEEE83D6E0804A30966F684B0269AD91
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAME
order
string optional

Defines how the results will be ordered

Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The referral identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
reference_number
string

The referral reference number

Example:
REF1234
referred_contact
Object

Details about the referred contact

id
string GUID

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The contact full name

Example:
John Doe
code
string

The contact code

Example:
CO1234
referred_account
Object

Details about the referred contact’s account

id
string GUID

The account identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The account name

Example:
ACR1234 John Doe
number
string

The account number

Example:
ACR1234
life_cycle_state
string

The referral’s life cycle state

Enumeration:
POSTED
CANCELLED
classification
Object

The referral event’s classification details

id
string GUID

The classification identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The classification name

Example:
Delivery
organisation
Object

The organisation details at which the referral was performed

id
string GUID

The organisation identifier at which the referral was performed

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The organisation name at which the referral was performed

Example:
Bravo Coffee
performed_on
integer epoch

The date on which the referral was performed

Example:
1576486645
referred_by_contact
Object

Details about the referred by contact

id
string GUID

The contact identifier

Example:
7db94d8b-4cbc-a7cc-9dc8-48ef68f9bf36
name
string

The contact name

Example:
Jane Doe
code
string

The contact code

Example:
JD987
referred_by_account
Object

Details about the referred by contact’s account

id
string GUID

The account identifier

Example:
9a0eab8b-d592-3039-9705-be3708d4f8cf
name
string

The account name

Example:
AR456 Jane Doe
number
string

The account number

Example:
AR456
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/referrals HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CEEE83D6E0804A30966F684B0269AD91",
            "reference_number": "REF1234",
            "referred_contact": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "John Doe",
                "code": "CO1234"
            },
            "referred_account": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "ACR1234 John Doe",
                "number": "ACR1234"
            },
            "life_cycle_state": "CANCELLED",
            "classification": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "Delivery"
            },
            "organisation": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "Bravo Coffee"
            },
            "performed_on": 1576486645,
            "referred_by_contact": {
                "id": "7db94d8b-4cbc-a7cc-9dc8-48ef68f9bf36",
                "name": "Jane Doe",
                "code": "JD987"
            },
            "referred_by_account": {
                "id": "9a0eab8b-d592-3039-9705-be3708d4f8cf",
                "name": "AR456 Jane Doe",
                "number": "AR456"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Referral
GET /referrals/{id}

Get details for a single referral customer event

Path variables

id
string GUID required

The referral customer event identifier that will be retrieved

Example:
CEEE83D6E0804A30966F684B0269AD91

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The referral identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
reference_number
string

The referral reference number

Example:
REF001
life_cycle_state
string

The referral’s life cycle state

Enumeration:
POSTED
CANCELLED
performed_on
integer epoch

The date on which the referral was made

Example:
1576486645
referred_contact
Object

Details about the referred contact

id
string

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The contact full name

Example:
John Doe
code
string

The contact code

Example:
CO1234
referred_account
Object

Details about the referred contact’s account

id
string GUID

The account identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The account name

Example:
ACR1234 John Doe
number
string

The account number

Example:
ACR1234
organisation
Object

The organisation from which the purchase was posted

id
string GUID

The organisation identifier at which the purchase was performed

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The organisation name at which the purchase was performed

Example:
Bravo Coffee
rewards
Object

Information (dynamic) about the award/spend amounts

total_award_amount
number

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

Example:
121.99
classification
Object

Details about the customer event classification

id
string GUID

The customer event classification identifier

Example:
c8d83493-3f50-40df-adb0-762ec5f41863
name
string

The customer event classification name

Example:
Delivery Purchase
referred_by_contact
Object

Details about the referred by contact

id
string GUID

The contact identifier

Example:
b47cc2a3-6e00-b826-6bb5-48849e222e2a
name
string

The contact name

Example:
Jane Doe
code
string

The contact code

Example:
45679
referred_by_account
Object

Details about the referred by contact’s account

id
string GUID

The account identifier

Example:
0a1c62c3-75cc-7b65-d7c8-9ce59f7ad6cc
name
string

The account name

Example:
AR567 Jane Doe
number
string

The account number

Example:
AR567
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
GET https://stagingapi.crm.com/backoffice/v1/referrals/CEEE83D6E0804A30966F684B0269AD91 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CEEE83D6E0804A30966F684B0269AD91",
    "reference_number": "REF001",
    "life_cycle_state": "CANCELLED",
    "performed_on": 1576486645,
    "referred_contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Doe",
        "code": "CO1234"
    },
    "referred_account": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "ACR1234 John Doe",
        "number": "ACR1234"
    },
    "organisation": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "Bravo Coffee"
    },
    "rewards": {
        "total_award_amount": 121.99
    },
    "classification": {
        "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
        "name": "Delivery Purchase"
    },
    "referred_by_contact": {
        "id": "b47cc2a3-6e00-b826-6bb5-48849e222e2a",
        "name": "Jane Doe",
        "code": "45679"
    },
    "referred_by_account": {
        "id": "0a1c62c3-75cc-7b65-d7c8-9ce59f7ad6cc",
        "name": "AR567 Jane Doe",
        "number": "AR567"
    }
}
Estimates
POST /estimates/invoicing
POST /estimates/order_fulfillment
POST /estimates/orders
GET /estimates/routing_rules
GET /estimates/subscriptions
Invoicing
POST /estimates/invoicing

Estimates how a product will be charged in invoices, quotations, billing without generating any invoices etc. Pricing estimation includes the price, all applicable promotions as well as the taxes to be applied.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
contact_id
string nullable
account_id
string nullable
supply_method
string
Enumeration:
ON_SITE
DELIVERY
PICK_UP
fulfilled_by
string

The unique idetifier of the organisation from which the customer purchases prducts

line_items
Array required
Min items: 1
Object
product_id
string required

The unique identifier of a product

bundle_product_id
string
quantity
integer required
Default:
1
Example:
1
price
number

The unit price of the product. If specified, then the pricing strategy is not applied.

Example:
9.99
discount_value
number
discount_option
string

Required if a discount value is specified.

Enumeration:
AMOUNT
PERCENTAGE
tax_model
string

Required if a price is specified as input

Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE

Responses

200 OK

The request has succeeded

Body
Object
issued_date
integer
Example:
123456789
due_date
integer
Example:
123456789
currency_code
string
Example:
EUR
total_net_amount
number
total_discount_amount
number
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
number
line_items
Array
Object
id
string
Example:
7CD9C84FA60F9FE407140E20F707726A
sku
string
name
string
tax_model
string
Example:
TAX_INCLUSIVE
pricing_model
string
Example:
TIERED
currency
string
Example:
EUR
quantity
integer
Example:
1
unit_price
number
Example:
9.99
net_amount
number
Example:
9.99
discount_amount
number
Example:
0.1
discount_percentage
number
Example:
5
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
number
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://stagingapi.crm.com/backoffice/v1/estimates/invoicing HTTP/1.1 

Content-Type: application/json

{
    "contact_id": "",
    "account_id": "",
    "supply_method": "DELIVERY",
    "fulfilled_by": "",
    "line_items": [
        {
            "product_id": "",
            "bundle_product_id": "",
            "quantity": 1,
            "price": 9.99,
            "discount_value": 1,
            "discount_option": "AMOUNT",
            "tax_model": "TAX_EXCLUSIVE"
        }
    ]
}
Order Fulfillment
POST /estimates/order_fulfillment

Preview order fulfillment information

Notes

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

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

application/json
Object
supply_method
string required

Preview order based on the supply method

Enumeration:
DELIVERY
PICK_UP
is_open
boolean

Preview order only for open venues

Example:
true
postal_code
string

Preview order based on the postal code

Example:
2415
lat_lot
string

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

Example:
35.157204,33.314151
address_id
string GUID

Preview order based on the customer address

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

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

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

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 200

The request has succeeded

Body
application/json
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
Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
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/logo.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/logo.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
Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
usage_type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
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/logo.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/logo.jpg
400 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/estimates/order_fulfillment HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "supply_method": "DELIVERY",
    "is_open": true,
    "postal_code": "2415",
    "lat_lot": "35.157204,33.314151",
    "address_id": "28441e3e-767a-b6cc-9a59-6d7705de6428",
    "requested_organisation_id": "4456e728-019c-86e4-3e4f-bb7920e2ef75",
    "requested_delivery_at": {
        "time": 30,
        "time_unit": "MINUTES",
        "date": 12312323123
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "fulfilled_by": {
            "id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Best Burger Egkomi",
            "phone": "+6934222321",
            "address": {
                "address_line_1": "Ilia Papakyriakou 21",
                "address_line_2": "7 Stars Tower",
                "state_province_county": "Egkomi",
                "town_city": "Nicosia",
                "postal_code": "2415",
                "lat": "35.157115",
                "lon": "33.313719",
                "googleplaceid": "ChIJrTLr-GyuEmsRBfy61i59si0"
            },
            "creatives": [
                {
                    "id": "CA123456789AQWSXZAQWS1236547896541",
                    "usage_type": "ATTACHMENT",
                    "width": 2159,
                    "height": 3075,
                    "format": "jpg",
                    "url": "https://assets.crm.com/image/logo.jpg",
                    "public_id": "crm-com/image",
                    "media": [
                        {
                            "width": 200,
                            "height": 300,
                            "url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
                        }
                    ]
                }
            ],
            "parent_organisation": {
                "id": "b1607c37-e750-2324-ac49-6591a86f54b8",
                "name": "Best Burger",
                "creatives": [
                    {
                        "id": "CA123456789AQWSXZAQWS1236547896541",
                        "usage_type": "PROFILEIMAGE",
                        "width": 2159,
                        "height": 3075,
                        "format": "jpg",
                        "url": "https://assets.crm.com/image/logo.jpg",
                        "public_id": "crm-com/image",
                        "media": [
                            {
                                "width": 200,
                                "height": 300,
                                "url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
                            }
                        ]
                    }
                ]
            }
        }
    }
]
Orders
POST /estimates/orders

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

Notes

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

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

application/json
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 200

The request has succeeded

Body
application/json
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
Example:
3FD1E31269B76D7A65ACCE45B2E68DFD
name
string
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 400

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

401 401

The provided API Key or Token is invalid

403 403

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

404 404

The requested resource does not exist

500 500

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

502 502

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

503 503

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

504 504

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/estimates/orders HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "account_id": "1bd3e4d3-5981-209b-787d-352dcd5389a3",
    "supply_method": "DELIVERY",
    "fulfilled_by": "",
    "requested_delivery_at": {
        "time": 30,
        "time_unit": "MINUTES",
        "date": 12312323123
    },
    "address_id": "84bfd840-b520-5bde-8f0a-b36937a2fce7",
    "notes": "",
    "line_items": [
        {
            "id": "7f45ad8a-b164-2a67-eb93-8651c0f1b101",