BackOffice Admin

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

Welcome to 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 contacts to manage their subscription and/or reward accounts.

Change Log

Expected Release Date Jun 2022

This is the second release of the CRM V5 APIs

API Documentation
Unique Resource Identifiers

CRM.COM is built on a domain based micro-service architecture. Our primary resources such as Contact, Account, Wallet, Products and 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.

API Reference

CRM.COM API is organized around REST. Our API has specific resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses and uses standard HTTP response codes, authentication & verbs.

You can use the entire API in test mode, which does not affect your live data. The API Key used to authenticate any of your requests will determine whether the request is on live mode or test mode.

The API may differ based on each CRM.COM release. For every new release with noticable changes that might alter backwards compatibility, a new version will be created.

Authentication

CRM.COM Back-Office API uses either API Keys to authenticate requests or an authentication JWT token obtained from a user successful logging in.

SECURITY NOTICE

All API requests must be made over HTTPS. Any request made over plain HTTP or without authentication will fail. In addition, 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 or client-side code.

API KEY AUTHORIZATION HEADER EXAMPLE

curl -X $HTTP_METHOD -H "api_key: 2189341e-981e-9ad5-9912-11101670314a" 

AUTH TOKEN AUTHORIZATION HEADER EXAMPLE

curl -X $HTTP_METHOD -H "authorization: Bearer JWT_TOKEN" 
Requests

API requests should be made using the HTTPS protocol so that traffic is encrypted. The interface responds to different methods depending on the action required.

Method Usage
POST To create a new object, your request should specify the POST method. The POST request includes all of the attributes necessary to create a new object to the targeted endpoint.
PUT To update the information on an existing object, the PUT method should be used. This will update the specified object if it is found using the provided values, regardless of their current values. If it is not found, the operation will return a response indicating that the object was not found. This idempotency means that you do not have to check for a resource’s availability prior to issuing an update command, the final state will be the same regardless of its existence. Requests using the PUT method do not need to check the current attributes of the object.
DELETE To remove an existing object from your environment, the DELETE method should be used. Similar to PUT method, the DELETE method is idempotent.
GET For retrieving information about customers, purchases or orders, the GET method should be used. Any requested information will be returned as a JSON object. The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the retrieved objects.
Responses

Along with the HTTP methods that the API responds to, CRM.COM uses conventional HTTP response codes and human-readable messages in JSON format to indicate the success or failure of an API request.

In the event of a problem, the status will contain the error code, while the body of the response will usually contain additional information about the problem that was encountered.

HTTP Status Description
2XX Return codes in the 200 range indicate that the request was fulfilled successfully and that no error was encountered.
4XX Return codes in the 400 range, typically, indicate that there was an issue with the request that was sent. Most common reasons could be an invalid authentication method, unauthorised requests or the object that you are requesting does not exist.
5XX Return codes in the 500 range indicate that there is a server-side problem and CRM.COM cannot fulfill your request at the moment.

Most of our 4XX range errors that could be handled programmatically contain all the necessary details for a better integration handling. Such details are

  • HTTP Status Code & Error are used for programmatic consumption
  • Message is human-readable and can be used as a default error message
  • Parameters are used for programmatic consumption and can be used for enhancing the interface error message with additional information

4XX ERROR RESPONSE EXAMPLE

An example of a customer not found error is as follows

HTTP/1.1 404 Not Found
    {
        "status": 404,
        "message": "Record not found.",
        "error": "CRM.EXCEPTIONS.NOTFOUNDEXCEPTION",
        "parameters": [
            "contact",
            "789dacae-cf71-414f-9483-ca88acaa46432"
        ]
    }
Response Codes

Below is a list of our common HTTP response codes that can be returned.

200 OK

The request has succeeded

201 Created
204 No Content

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

425 Too Early

The server is unwilling to process a request because it may be replayed

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Operations
Accounts

The ledger of customer financial transactions such as invoices and payments. An account has a set currency and credit terms and outputs balances such as running balance, overdue amount and pending balance per accounting period. Many processes within CRM.COM are carried out against an account, such as placing an order or creating a subscription.

GET /accounts/{id}
PUT /accounts/{id}
GET /contacts/{id}/accounts
POST /contacts/{id}/accounts
POST /accounts/{id}/actions
Get Account
GET /accounts/{id}

Get a single Account with its financial information

Path variables

id
string GUID required

The unique identifier of the Account

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

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

The unique identifier of the account

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

The account’s name

Example:
AC00123456 John Smith
number
string

The account’s number

Example:
AC00123456
is_primary
boolean

Defines whether the account is the primary one of the contact

Example:
true
state
string
Enumeration:
ACTIVE

Contact is able to perform transactions

SUSPENDED

Contact blocked from ordering/purchases but still allowed to make Payments

TERMINATED

Contact can no longer perform any kind of transactions using this account(financial, ordering, rewards etc)

Example:
ACTIVE
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
balance
number

The account’s running balance

Example:
99.99
overdue_amount
number

The unpaid amount that is passed its due date

Example:
9.99
credit_limit
number

The account’s credit limit.

Example:
99.99
payment_terms
Object

The account’s payment terms

id
string

Payment terms unique identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

Payment terms nane

Example:
Net 7
classification
Object

Details about the event classification

id
string GUID

The classification identifier

Example:
c8d83493-3f50-40df-adb0-762ec5f41863
name
string

The classification name

Example:
Delivery Purchase
billing_address
Object
id
string GUID

The id of the billing address

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

Address line 1

Example:
2265 Oak Street
address_line_2
string

Address line 2

state_province_county
string
Example:
New York
town_city
string
Example:
Old Forge
postal_code
string
Example:
13420
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/accounts/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "name": "AC00123456 John Smith",
    "number": "AC00123456",
    "is_primary": "true",
    "state": "ACTIVE",
    "currency_code": "EUR",
    "balance": 99.99,
    "overdue_amount": 9.99,
    "credit_limit": 99.99,
    "payment_terms": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "Net 7"
    },
    "classification": {
        "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
        "name": "Delivery Purchase"
    },
    "billing_address": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "address_line_1": "2265 Oak Street",
        "address_line_2": "",
        "state_province_county": "New York",
        "town_city": "Old Forge",
        "postal_code": "13420",
        "country_code": "CYP"
    }
}
Update Account
PUT /accounts/{id}

Update the account of a contact or organisation. A single account can be updated per Web API call. Select to update at least one of the account’s basic attributes

Path variables

id
string GUID required

The account (identifier) that will be updated

Example:
a2c0809f-ed91-4b68-b912-5bd6064d602a

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 nullable

If set to true, then this account will be set as the primary one, unmarking the previous account from being the primary.

Example:
true
classification_id
string GUID nullable

The account’s classification identifier

Example:
d230809f-ed91-4b68-b912-5bd6064d602a
billing_address_id
string GUID nullable

The unique identifier of a contact address which will be set as the billing address of the account.

Example:
a345fb9f-ed91-4b68-b912-5bd6064d602a
credit_limit
number nullable

Sets the credit limit of the account. The credit limit is set in the account’s currency

Example:
20.99
payment_terms_id
string nullable

Sets the Account’s Payment Terms.

Example:
d230809f-ed91-4b68-b912-5bd6064d602a

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The account identifier

Example:
d230809f-ed91-4b68-b912-5bd6064d602a
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/accounts/a2c0809f-ed91-4b68-b912-5bd6064d602a HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "is_primary": true,
    "classification_id": "d230809f-ed91-4b68-b912-5bd6064d602a",
    "billing_address_id": "a345fb9f-ed91-4b68-b912-5bd6064d602a",
    "credit_limit": 20.99,
    "payment_terms_id": "d230809f-ed91-4b68-b912-5bd6064d602a"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "d230809f-ed91-4b68-b912-5bd6064d602a"
}
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. All accounts of the contact are retrieved by default, regardless of their state

Path variables

id
string GUID required

The contact identifier whose accounts will be retrieved

Example:
a2c0809f-ed91-4b68-b912-5bd6064d602a

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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
is_primary
boolean optional

If set to true, then only the primary account of the contact will get retrieved. If not specified, then all accounts are retrieved including terminated ones

Default:
false
Example:
true
state
array of Account State (Enum) optional

Filter accounts based on whether they are Active, Suspended and or Terminated. If not specified then all contact accounts are retrieved, even terminated ones.

Collection format: csv
Example:
[
    "ACTIVE"
]

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:
4dc0809f-ed91-4b68-b912-5bd6064d901e
is_primary
boolean

Indicates if this is the primary account of the contact

Example:
true
name
string

The account name

Example:
AC123456 John Smith
number
string

The Account number. This is a unique number across all Accounts

Example:
AC123456
state
string
Enumeration:
ACTIVE

Contact is able to perform transactions

SUSPENDED

Contact blocked from ordering/purchases but still allowed to make Payments

TERMINATED

Contact can no longer perform any kind of transactions using this account(financial, ordering, rewards etc)

Example:
ACTIVE
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
classification
Object

Details about the event classification

id
string GUID

The classification identifier

Example:
c8d83493-3f50-40df-adb0-762ec5f41863
name
string

The classification name

Example:
Delivery Purchase
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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/contacts/a2c0809f-ed91-4b68-b912-5bd6064d602a/accounts HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "is_primary": true,
            "name": "AC123456 John Smith",
            "number": "AC123456",
            "state": "ACTIVE",
            "currency_code": "EUR",
            "classification": {
                "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
                "name": "Delivery Purchase"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Add Account for Contact
POST /contacts/{id}/accounts

Create a new Account for a contact. A contact can have multiple accounts, each one having a different currency. A contact can own a single primary account.

Path variables

id
string GUID required

The unique identifier of the contact for which the new account is created

Example:
3ec0809f-ed91-4458-b912-5bd6064dabf1

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 nullable

Mark the new account as the contact’s primary account. If contact has another account marked as the primary, then this setting will enforce the new account to be the primary, unmarking the other one from being the primary.

Default:
false
Example:
true
currency_code
string required
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
name
string

The account’s name. If not specified, then a name will be assigned by CRM.COM based on account name rules

Example:
John Smith Main account
classification_id
string GUID

The account’s classification. If not specified, then the default Classification is set

Example:
a2c0809f-ed91-4b68-b912-5bd6064d602a
billing_address_id
string GUID nullable

The unique identifier of a contact address which will be set as the billing address of the account.

Example:
e230809f-ed91-4b68-b912-5bd6064d602a

Responses

201 201

Created

Body
Object
id
string GUID

The account identifier

Example:
b4c0809f-ed91-4b68-b912-5bd60545902a
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/contacts/3ec0809f-ed91-4458-b912-5bd6064dabf1/accounts HTTP/1.1 

Content-Type: application/json

{
    "is_primary": true,
    "currency_code": "EUR",
    "name": "John Smith Main account",
    "classification_id": "a2c0809f-ed91-4b68-b912-5bd6064d602a",
    "billing_address_id": "e230809f-ed91-4b68-b912-5bd6064d602a"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "b4c0809f-ed91-4b68-b912-5bd60545902a"
}
Account Actions
POST /accounts/{id}/actions

Use this Web API to update the account’s state. The new state to which the account will be updated to also denotes the action performed on it, for example terminating or reactivating the account.

Path variables

id
string GUID required

The account identifier on which the action is performed

Example:
1eaa809f-ed91-4b68-b912-5bd6064d3400

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
state
string required
Enumeration:
ACTIVE

Contact is able to perform transactions

SUSPENDED

Contact blocked from ordering/purchases but still allowed to make Payments

TERMINATED

Contact can no longer perform any kind of transactions using this account(financial, ordering, rewards etc)

Example:
ACTIVE
account_id
string GUID nullable

The account to which any account balance will get transfered, in case of Termination. Applicable and required when terminating the account. If not specified on terminating the account, the terminated account’s balance is lost

Example:
2ee0809f-ed91-4b68-b912-5bd6064d602a

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the account

Example:
b560809f-ed91-4b68-b912-5bd6064d602a
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/accounts/1eaa809f-ed91-4b68-b912-5bd6064d3400/actions HTTP/1.1 

Content-Type: application/json

{
    "state": "ACTIVE",
    "account_id": "2ee0809f-ed91-4b68-b912-5bd6064d602a"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "b560809f-ed91-4b68-b912-5bd6064d602a"
}
Activities
POST /activities
PUT /activities/{id}
DELETE /activities/{id}
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

application/json
Object
name
string required

The activity name

Example:
Call customer
description
string nullable

The activity description

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

The activity type (identifier)

Example:
cdd8e232-ddce-87c0-44fd-27f44035a252
address_id
string GUID nullable

The contact address (identifier) associated to the activity

Example:
4d1b276d-6ae9-eca3-8c61-aedd35ebb9a4
use_entity_address
boolean

Use the entity address as the Activity address. In cases where an Activity is being created for an entity which has an address (e.g. Contact, Order, Service Request) then use that address as the default Activity address. Either the address_id or the use_entity_address can be specified, not both

Example:
false
scheduled_on
Object required
from_date
integer epocjh required

The scheduled from date/time

Example:
1592809457
to_date
integer epoch nullable

The scheduled to date/time

Example:
11653396172
linked_to
Array required

The related entities for the activity. Contact should always be specified and optionally one of the the rest entities (orders, service requests, leadds) can be specified as well

Example:
[
    {
        "type": "ORDER",
        "id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
    },
    {
        "type": "CONTACT",
        "id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
    }
]
Object
type
string

The type of related entity.

Enumeration:
CONTACT
LEAD
SERVICE_REQUEST
ORDER
id
string GUID

The related entity identifier

Example:
50490788-0f2c-0a73-8ae0-1b129f8fdb50
assign_to
Object nullable
user_id
string GUID

The user identifier

Example:
1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf
team_id
string GUID

The team identifier

Example:
a43f08ca-998b-afbc-6ed4-c9dc2d136935
custom_fields
Array nullable
Object
key
string

The custom field’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345

Responses

201 Created

The request has succeded

Body
Object
id
string GUID

The activity identifier

Example:
81b8d150-1196-6e6a-1df9-aaf23adc757d
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/activities HTTP/1.1 

Content-Type: application/json

{
    "name": "Call customer",
    "description": "We need to call the contact (after 4pm) in order to schedule a demo",
    "type_id": "cdd8e232-ddce-87c0-44fd-27f44035a252",
    "address_id": "4d1b276d-6ae9-eca3-8c61-aedd35ebb9a4",
    "use_entity_address": "false",
    "scheduled_on": {
        "from_date": 1592809457,
        "to_date": 11653396172
    },
    "linked_to": [
        {
            "type": "ORDER",
            "id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
        }
    ],
    "assign_to": {
        "user_id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
        "team_id": "a43f08ca-998b-afbc-6ed4-c9dc2d136935"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "81b8d150-1196-6e6a-1df9-aaf23adc757d"
}
Update Activity
PUT /activities/{id}

Update an existing activity

Path variables

id
string GUID required

The activity (identifier) that will be updated

Example:
43bf8b4a-6b7c-f86d-6faf-454b7e99a8e2

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
name
string nullable

The activity name

Example:
Approve Offers
description
string nullable

The activity description

Example:
Require 4 approvals for an offer
state
string nullable

The activity state

Enumeration:
PENDING
COMPLETED
CANCELLED
address_id
string GUID nullable

The contact address (identifier) associated to the activity

Example:
6cbe314d-9f32-d3c7-4be6-f453e7b8e77e
scheduled_on
Object nullable
from_date
integer epocjh required

The scheduled from date/time

Example:
1592809457
to_date
integer epoch nullable

The scheduled to date/time

Example:
11653396172
linked_to
Array nullable

The related entities for the activity, contact cannot be updated

Example:
[
    {
        "type": "ORDER",
        "id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
    }
]
Object
type
string required

The type of related entity.

Enumeration:
LEAD
SERVICE_REQUEST
ORDER
id
string GUID required

The related entity identifier

Example:
50490788-0f2c-0a73-8ae0-1b129f8fdb50
assign_to
Object nullable
user_id
string GUID

The user identifier

Example:
1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf
team_id
string GUID

The team identifier

Example:
a43f08ca-998b-afbc-6ed4-c9dc2d136935
custom_fields
Array nullable
Object
key
string

The custom field’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345

Responses

200 OK

The request has succeded

Body
Object
id
string GUID

The activity identifier

Example:
43bf8b4a-6b7c-f86d-6faf-454b7e99a8e2
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/activities/43bf8b4a-6b7c-f86d-6faf-454b7e99a8e2 HTTP/1.1 

Content-Type: application/json

{
    "name": "Approve Offers",
    "description": "Require 4 approvals for an offer",
    "state": "CANCELLED",
    "address_id": "6cbe314d-9f32-d3c7-4be6-f453e7b8e77e",
    "scheduled_on": {
        "from_date": 1592809457,
        "to_date": 11653396172
    },
    "linked_to": [
        {
            "type": "ORDER",
            "id": "50490788-0f2c-0a73-8ae0-1b129f8fdb50"
        }
    ],
    "assign_to": {
        "user_id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
        "team_id": "a43f08ca-998b-afbc-6ed4-c9dc2d136935"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "43bf8b4a-6b7c-f86d-6faf-454b7e99a8e2"
}
Delete Activity
DELETE /activities/{id}

Delete an existing activity

Path variables

id
string GUID required

The activity (identifier) that will be deleted

Example:
52cbb887-a61a-9b1e-63df-1303f7b5718a

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

204 No Content

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
DELETE https://sandbox.crm.com/backoffice/v2/activities/52cbb887-a61a-9b1e-63df-1303f7b5718a HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Activities
GET /activities/

Retrieve a list of activities based on search criteria (e.g. all open activities)

Request parameters

search_value
string optional

Filter based on search values, such as name (behave as like)

Example:
demo
types
array of string optional

Filter based on activity type(s)

Collection format: csv
contact_id
string GUID optional

Filter based on related contact

Example:
c932ffb1-efe6-b7b3-58c1-a6a86ddcc8d3
service_request_id
string GUID optional

Filter based on related service request

Example:
c932ffb1-efe6-b7b3-58c1-a6a86ddcc822
lead_id
string GUID optional

Filter based on related lead

Example:
c932ffb1-efe6-b7b3-58c1-a6a86ddcc8qq
order_id
string GUID optional

Filter based on related order

Example:
c932ffb1-efe6-b7b3-58c1-a6a86ddcc8d3
states
array of activity state (enum) optional

Filter based on activity state

Collection format: csv
tag_ids
array of string optional

Filter based on activity tags

Collection format: csv
include_tags
boolean optional

Defines whether tags should be retrieved or not

Example:
false
created_on
string optional

Filter based on the created date, which may fall within a given date range. The value can be a string with a date in epoch format. Each option must also include an operator. Use up to two options based on the required search (e.g. created_on[gte]=1618395497&created_on[lt]=1618395497).

Enumeration:
created_on[gt]

Returns results where the created date is greater than this value

created_on[gte]

Returns results where the created date is greater than or equal to this value

created_on[lt]

Returns results where the created date is less than this value

created_on[lte]

Returns results where the created date is less then or equal to this value

completed_on
string optional

Filter based on the completed date, which may fall within a given date range. The value can be a string with a date in epoch format. Each option must also include an operator. Use up to two options based on the required search (e.g. completed_on[gte]=1618395497&completed_on[lt]=1667890564).

Enumeration:
completed_on[gt]

Returns results where the date is greater than this value

completed_on[gte]

Returns results where the date is greater than or equal to this value

completed_on[lt]

Returns results where the date is less than this value

completed_on[lte]

Returns results where the date is less then or equal to this value

assign_to_user_id
string GUID optional

Filters based on specific assign to user

Example:
c45903ff-4a00-49bd-93b4-6b2f0373ce20
assign_to_team_id
string GUID optional

Filters based on specific assign to team

Example:
5beb415c-3246-1a10-f806-3f975e4898dc
custom_fields
string optional

Filters based on custom fields (key/value set should be semicolon separated)

Example:
key;value
include_custom_fields
boolean optional

Defines whether custom fields should be retrieved or not (via List/Get APIs)

Default:
false
Example:
true
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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

The request has succeded

Body
Object
content
Array
Object
id
string GUID

The activity identifier

Example:
1cf0d458-b799-1d99-52e4-d7f5081b3c01
name
string

The activity name

Example:
Call customer
description
string

The activity description

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

The activity state

Enumeration:
PENDING
COMPLETED
CANCELLED
key_dates
Object
created_on
integer epoch

The date that the activity was created

Example:
1592809457
scheduled_on
Object

The date/time that the activity is scheduled

from_date
integer epoch

The scheduled from date

Example:
1592809457
to_date
integer epoch

The scheduled to date

Example:
1592809457
type
Object

The activity type

id
string

The activity type identifier

Example:
HGJDHGSJDHG
name
string

The activity type name

Example:
site visit
color
string

The activity type color (hex code), used for visual purposes

Example:
876FD5
contact
Object

Details about the related contact

id
string GUID

The contact identifier

Example:
1c060611-0667-313e-b3bf-4cb70ee81cdf
name
string

The contact full name

Example:
John Doe
code
string

The contact unique code

Example:
C123
lead
Object
id
string GUID

The lead identifier

Example:
2760043d-c671-a428-9b35-2f27b0623fa1
title
string

The lead title

Example:
ASOS
service_request
Object
id
string
Example:
JHGHGF7576HGFTGD564654
number
string
Example:
SRV78001
order
Object
id
string GUID

The order identifier

Example:
2760043d-c671-a428-9b35-2f27b0623fa1
number
string

The order number

Example:
O101367
assign_to
Object
user
Object

Details about the user that the record is assigned to

id
string GUID

The user identifier

Example:
47ac694d-6281-b873-bf46-3fd8da334a3a
name
string

The user name

Example:
John Doe
username
string

The username of the user

Example:
j_doe@crm.com
team
Object

Details about team

id
string GUID

The team identifier

Example:
bf1370a1-73ad-0bbf-6fef-f2ce1938d4fe
name
string

The team name

Example:
Support
custom_fields
Array
Object
key
string

The custom field (unique) key

Example:
back_office
value
string

The custom field’s (provided) value

Example:
Back Office
tags
Array
Object
id
string

Tag unique id

Example:
609a369e-3f10-492a-8332-679ecbe56b65
name
string

Tag name

Example:
Maintenance
colour
string

The colour of the tag - for list view only

Example:
FR547F
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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/activities/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "1cf0d458-b799-1d99-52e4-d7f5081b3c01",
            "name": "Call customer",
            "description": "We need to call the customer to arrange a demo",
            "state": "CANCELLED",
            "key_dates": {
                "created_on": 1592809457,
                "scheduled_on": {
                    "from_date": 1592809457,
                    "to_date": 1592809457
                }
            },
            "type": {
                "id": "HGJDHGSJDHG",
                "name": "site visit",
                "color": "876FD5"
            },
            "contact": {
                "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
                "name": "John Doe",
                "code": "C123"
            },
            "lead": {
                "id": "2760043d-c671-a428-9b35-2f27b0623fa1",
                "title": "ASOS"
            },
            "service_request": {
                "id": "JHGHGF7576HGFTGD564654",
                "number": "SRV78001"
            },
            "order": {
                "id": "2760043d-c671-a428-9b35-2f27b0623fa1",
                "number": "O101367"
            },
            "assign_to": {
                "user": {
                    "id": "47ac694d-6281-b873-bf46-3fd8da334a3a",
                    "name": "John Doe",
                    "username": "j_doe@crm.com"
                },
                "team": {
                    "id": "bf1370a1-73ad-0bbf-6fef-f2ce1938d4fe",
                    "name": "Support"
                }
            },
            "custom_fields": [
                {
                    "key": "back_office",
                    "value": "Back Office"
                }
            ],
            "tags": {
                "id": "609a369e-3f10-492a-8332-679ecbe56b65",
                "name": "Maintenance",
                "colour": "FR547F"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Activity
GET /activities/{id}

Retrieve detailed information for an activity

Path variables

id
string GUID required

The activity (identifier) that will be retrieved

Example:
6215f115-321a-c3d4-8809-59ca5f502433

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

The request has succeded

Body
Object
id
string GUID

The activity identifier

Example:
6215f115-321a-c3d4-8809-59ca5f502433
name
string

The activity name

Example:
Call customer
description
string

The activity description

Example:
Arrange a call with the customer after 4pm to schedule a demo for next week
key_dates
Object
created_on
integer epoch

The date that the activity was created

Example:
1592809457
scheduled_on
Object

The date/time that the activity is scheduled

from_date
integer epoch

The scheduled from date

Example:
1592809457
to_date
integer epoch

The scheduled to date

Example:
1592809457
type
Object

The activity type

id
string

The activity type identifier

Example:
HGJDHGSJDHG
name
string

The activity type name

Example:
site visit
color
string

The activity type color (hex code), used for visual purposes

Example:
876FD5
contact
Object

Details about the related contact

id
string GUID

The contact identifier

Example:
1c060611-0667-313e-b3bf-4cb70ee81cdf
name
string

The contact full name

Example:
John Doe
code
string

The contact unique code

Example:
C123
service_request
Object
id
string
Example:
JHGHGF7576HGFTGD564654
number
string
Example:
SRV78001
lead
Object
id
string GUID

The lead identifier

Example:
2760043d-c671-a428-9b35-2f27b0623fa1
title
string

The lead title

Example:
ASOS
order
Object
id
string GUID

The order identifier

Example:
2760043d-c671-a428-9b35-2f27b0623fa1
number
string

The order number

Example:
O101367
address
Object
address_line_1
string

The address line 1

Example:
Elia Papakyriakou
address_line_2
string

The address line 2

Example:
7 Tower Stars
state_province_county
string

The address state/province/county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2015
country
string

The address country (based on ISO 3 char code)

Example:
CYP
lat
number

The latitude of the address

Example:
35.157115
lon
number

The longitude of the address

Example:
33.313719
google_place_id
string

The Google textual identifier that uniquely identifies an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
states
Array

The activity states history

Object
state
string

The activity state

Enumeration:
PENDING
COMPLETED
CANCELLED
date
integer epoch

The date on which the state was reached

Example:
1653400142
assign_to
Object
user
Object

Details about the user that the record is assigned to

id
string GUID

The user identifier

Example:
47ac694d-6281-b873-bf46-3fd8da334a3a
name
string

The user name

Example:
John Doe
username
string

The username of the user

Example:
j_doe@crm.com
team
Object

Details about team

id
string GUID

The team identifier

Example:
bf1370a1-73ad-0bbf-6fef-f2ce1938d4fe
name
string

The team name

Example:
Support
custom_fields
Array
Object
key
string

The custom field (unique) key

Example:
back_office
value
string

The custom field’s (provided) value

Example:
Back Office
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/activities/6215f115-321a-c3d4-8809-59ca5f502433 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "6215f115-321a-c3d4-8809-59ca5f502433",
    "name": "Call customer",
    "description": "Arrange a call with the customer after 4pm to schedule a demo for next week",
    "key_dates": {
        "created_on": 1592809457,
        "scheduled_on": {
            "from_date": 1592809457,
            "to_date": 1592809457
        }
    },
    "type": {
        "id": "HGJDHGSJDHG",
        "name": "site visit",
        "color": "876FD5"
    },
    "contact": {
        "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
        "name": "John Doe",
        "code": "C123"
    },
    "service_request": {
        "id": "JHGHGF7576HGFTGD564654",
        "number": "SRV78001"
    },
    "lead": {
        "id": "2760043d-c671-a428-9b35-2f27b0623fa1",
        "title": "ASOS"
    },
    "order": {
        "id": "2760043d-c671-a428-9b35-2f27b0623fa1",
        "number": "O101367"
    },
    "address": {
        "address_line_1": "Elia Papakyriakou",
        "address_line_2": "7 Tower Stars",
        "state_province_county": "Egkomi",
        "town_city": "Nicosia",
        "postal_code": "2015",
        "country": "CYP",
        "lat": 35.157115,
        "lon": 33.313719,
        "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
    },
    "states": [
        {
            "state": "COMPLETED",
            "date": 1653400142
        }
    ],
    "assign_to": {
        "user": {
            "id": "47ac694d-6281-b873-bf46-3fd8da334a3a",
            "name": "John Doe",
            "username": "j_doe@crm.com"
        },
        "team": {
            "id": "bf1370a1-73ad-0bbf-6fef-f2ce1938d4fe",
            "name": "Support"
        }
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "Back Office"
        }
    ]
}
Tags
PUT /activities/{id}/tags
GET /activities/{id}/tags
Update Activity Tags
PUT /activities/{id}/tags

Update the tags associated with the activity

Path variables

id
string GUID required

The activity (identifier) on which tags will be upaded

Example:
d4187991-4d1a-4aa2-fa3e-ce5fe7fdb7d9

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
tags
Array required

The tags that will be associated with the activity

string GUID
Example:
96c3cb52-c68f-6ba6-e886-ed28f2b594cb

Responses

200 OK

The request has succeded

Body
Object
id
string GUID

The activity identifier

Example:
d4187991-4d1a-4aa2-fa3e-ce5fe7fdb7d9
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/activities/d4187991-4d1a-4aa2-fa3e-ce5fe7fdb7d9/tags HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "tags": [
        "96c3cb52-c68f-6ba6-e886-ed28f2b594cb"
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "d4187991-4d1a-4aa2-fa3e-ce5fe7fdb7d9"
}
Get Activity Tags
GET /activities/{id}/tags

Retrieve a list of tags that are associated with the activity

Path variables

id
string GUID required

The activity (identifier) of which tags will be retrieved

Example:
d82881e9-a909-9d44-4f28-4b30fc1ac276

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

The request has succeded

Body
application/json
Object
content
Array
Object
id
string GUID

The tag identifier

Example:
1abe9097-d46a-d2ed-3415-fd3e1439d8d4
name
string

The tag name

Example:
VIP
colour
string

The tag color (hex code) that will be used for visual purposes

Example:
#0000FF
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/activities/d82881e9-a909-9d44-4f28-4b30fc1ac276/tags HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "1abe9097-d46a-d2ed-3415-fd3e1439d8d4",
            "name": "VIP",
            "colour": "#0000FF"
        }
    ]
}
Analytics
GET /organisations/{id}/analytics
GET /contacts/{id}/analytics
Insights
POST /insights
PUT /insights/{id}
DELETE /insights/{id}/
GET /insights
GET /insights/{id}
POST /insights/{id}/events
POST /insights/{id}/filters
POST /insights/{id}/breakdowns
GET /insights/{id}/results
POST /insights/{id}/preview
POST /insights/{id}/exports
Create Insight
POST /insights

Create a new insight

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 insight name

Example:
Marketing customers
description
string nullable

The insight description

Example:
A list of customers that own an account

Responses

200 OK
Body
Object
id
string GUID

The insight identifier

Example:
c0d4712e-6688-4604-b3d6-d084e4d2dc05
200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/insights HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Marketing customers",
    "description": "A list of customers that own an account"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05"
}
Update Insights
PUT /insights/{id}

Updates the basic information of an insight

Path variables

id
string GUID required

The insight identifier that will be updated

Example:
c0d4712e-6688-4604-b3d6-d084e4d2dc05

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 insight name

Example:
Rewards Award
description
string nullable

The insight’s description

Example:
List of contacts owning a non-terminated account
refresh_frequency
integer
Example:
1

Responses

200 200
Body
Object
id
string GUID

The insight identifier

Example:
c0d4712e-6688-4604-b3d6-d084e4d2dc05
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v1/insights/c0d4712e-6688-4604-b3d6-d084e4d2dc05 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Rewards Award",
    "description": "List of contacts owning a non-terminated account",
    "refresh_frequency": 1
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05"
}
Delete Insights
DELETE /insights/{id}/

Delete an existing insight

Path variables

id
string GUID required

The insight identifier that will be deleted

Example:
c0d4712e-6688-4604-b3d6-d084e4d2dc05

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

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
DELETE https://sandbox.crm.com/backoffice/v1/insights/c0d4712e-6688-4604-b3d6-d084e4d2dc05/ HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 
List Insights
GET /insights

Returns a list of insights

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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
search_value
string optional

Search using Insights name

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
Body
Object
content
Array
Object
id
string GUID

The insights unique identifier

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The insight’s name

Example:
Marketing customers
descripion
string

The insights’s description

Example:
List customers owning an account
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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/insights HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "name": "Marketing customers",
            "descripion": "List customers owning an account"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Insight
GET /insights/{id}

Get all data for a single insight

Path variables

id
string GUID required

The insight identifier that will be retrieved

Example:
c0d4712e-6688-4604-b3d6-d084e4d2dc05

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
id
string GUID

The insight identifier

Example:
c0d4712e-6688-4604-b3d6-d084e4d2dc05
name
string

The insight name

Example:
Rewards Award
events
Array
Object
id
string GUID

The event identifier

Example:
c0d4712e-6688-4604-b3d6-d084e4d2dc05
name
string
Example:
Purchases
event_name
string
Example:
SPEND
totals
Object
is_frequency
boolean
property_name
string
Example:
amount
criteria
Array
Object
name
string
Example:
A
property
Object
property
string
Example:
venue.name
operator
string
Example:
IS
value_list
Array
Example:
["Costa Coffee Nicosia"]
string
Example:
Costa Coffee Nicosia
filters
Array
Object
id
string GUID

The filter identifier

Example:
c0d4712e-6688-4604-b3d6-d084e4d2dc05
name
string
type
string
Example:
CONTACT
property_name
string
operator
string
Example:
NOT_EQUAL
min_value
string
max_value
string
value_list
Array of string
breakdowns
Array
Object
id
string GUID

The breakdown identifier

Example:
c0d4712e-6688-4604-b3d6-d084e4d2dc05
name
string

simple naming A, B, C used for ordering

type
string
Example:
CONTACT
property_name
string
Example:
city
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/insights/c0d4712e-6688-4604-b3d6-d084e4d2dc05 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05",
    "name": "Rewards Award",
    "events": [
        {
            "id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05",
            "name": "Purchases",
            "event_name": "SPEND",
            "totals": {
                "is_frequency": true,
                "property_name": "amount"
            },
            "criteria": [
                {
                    "name": "A",
                    "property": {
                        "property": "venue.name",
                        "operator": "IS",
                        "value_list": [
                            "Costa Coffee Nicosia"
                        ]
                    }
                }
            ]
        }
    ],
    "filters": [
        {
            "id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05",
            "name": "",
            "type": "CONTACT",
            "property_name": "",
            "operator": "NOT_EQUAL",
            "min_value": "",
            "max_value": "",
            "value_list": [
                ""
            ]
        }
    ],
    "breakdowns": [
        {
            "id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05",
            "name": "",
            "type": "CONTACT",
            "property_name": "city"
        }
    ]
}
Add Insight Events
POST /insights/{id}/events

Adds a set of events on an insight

Path variables

id
string required

Request body

Object
events
Array
Object
name
string required
Example:
Purchases
event_name
string
Enumeration:
PURCHASE
AWARD
SPEND
totals
Object
is_frequency
boolean

if the measurement is Freqency or Total of property

property_name
string

Name of the property to sum for a total or count frequency

criteria
Array
Object
name
string
Example:
A
property
Object
property
string
Example:
venue.name
operator
string

List of selection operators

Enumeration:
IS
IS_NOT
CONTAINS
DOES_NOT_CONTAIN
value_list
Array of string

List of values if the operator is contains or single item if matching

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/insights/{id}/events HTTP/1.1 

Content-Type: application/json

{
    "events": [
        {
            "name": "Purchases",
            "event_name": "SPEND",
            "totals": {
                "is_frequency": false,
                "property_name": "amount"
            },
            "criteria": [
                {
                    "name": "A",
                    "property": {
                        "property": "venue.name",
                        "operator": "IS",
                        "value_list": [
                            "Costa Coffee Nicosia"
                        ]
                    }
                }
            ]
        }
    ]
}
Add Insight Filters
POST /insights/{id}/filters

Adds a set of filters on an insight

Path variables

id
string required

Request body

Object
filters
Array
Object
name
string
type
string
Enumeration:
EVENT
CONTACT
property_name
string
operator
string

Use Operator

Enumeration:
IS
IS_NOT
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
EQUAL
NOT_EQUAL
min_value
string
max_value
string
value_list
Array of string
Example:
Venue1,Venue2

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/insights/{id}/filters HTTP/1.1 

Content-Type: application/json

{
    "filters": [
        {
            "name": "",
            "type": "EVENT",
            "property_name": "",
            "operator": "IS_NOT",
            "min_value": "",
            "max_value": "",
            "value_list": [
                ""
            ]
        }
    ]
}

HTTP/1.1 201 Created 
Add Insight Breakdowns
POST /insights/{id}/breakdowns

Adds a set of breakdowns on an insight

Path variables

id
string GUID required

The insight identifier which breakdown will be set

Example:
96578cce-9a50-575e-ed6a-46ae13c9219f

Request body

Object
breakdowns
Array
Object
name
string
type
string
Enumeration:
EVENT
CONTACT
property_name
string

name of the property to create the breakdown

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/insights/{id}/breakdowns HTTP/1.1 

Content-Type: application/json

{
    "breakdowns": [
        {
            "name": "",
            "type": "CONTACT",
            "property_name": ""
        }
    ]
}

HTTP/1.1 201 Created 
Get Insight Results
GET /insights/{id}/results

Retrieve results of a specific insight

Path variables

id
string GUID required

The insight identifier which results will be retrieved

Example:
04f28639-5ceb-a25e-1e44-b1109e533f42

Request parameters

start_date
integer epoch optional

The start date of the insight sequence

Example:
1612953199
end_date
integer epoch optional

The end date of the insight sequence

Example:
1612953199

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
breakdown
Object
id
string GUID

A temporary identifier to link child levels

Example:
bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f
parent_id
string GUID

The identifier of the previous level

Example:
bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f
level
integer

The breakdown level 0 = EVENTS

Example:
1
property_name
string

The name of the property within the group

Example:
venue.name
property_value
string

The value of the property

Example:
Costa Coffee Larnaca
event_name
string

The name of the event

count
integer

The number of points can be used for frequency

Example:
1
amount
number

The decimal amounts for the level

Example:
12.8
list_name
string

Applicable only if the property is a list and represents the list name

Example:
products
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/insights/04f28639-5ceb-a25e-1e44-b1109e533f42/results HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "breakdown": {
                "id": "bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f",
                "parent_id": "bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f",
                "level": 1,
                "property_name": "venue.name",
                "property_value": "Costa Coffee Larnaca",
                "event_name": "",
                "count": 1,
                "amount": 12.8,
                "list_name": "products"
            }
        }
    ]
}
Preview Insight Results
POST /insights/{id}/preview

Preview the results of a specific insight

Path variables

id
string GUID required

The insight identifier which results will be previewed

Example:
62cb9ada-3a7b-cafb-b7a7-7c103011fa48

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
start_date
integer epoch required

The start date of the insight sequence

Example:
1612953199
end_date
integer epoch required

The end date of the insight sequence

Example:
1612953199
events
Array
Object
name
string required
Example:
Purchases
event_name
string
Enumeration:
PURCHASE
AWARD
SPEND
totals
Object
is_frequency
boolean

if the measurement is Freqency or Total of property

property_name
string

Name of the property to sum for a total or count frequency

criteria
Array
Object
name
string
Example:
A
property
Object
property
string
Example:
venue.name
operator
string

List of selection operators

Enumeration:
IS
IS_NOT
CONTAINS
DOES_NOT_CONTAIN
value_list
Array of string

List of values if the operator is contains or single item if matching

filters
Array
Object
name
string
type
string
Enumeration:
EVENT
CONTACT
property_name
string
operator
string

Use Operator

Enumeration:
IS
IS_NOT
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
EQUAL
NOT_EQUAL
min_value
string
max_value
string
value_list
Array of string
Example:
Venue1,Venue2
breakdowns
Array
Object
name
string
type
string
Enumeration:
EVENT
CONTACT
property_name
string

name of the property to create the breakdown

Responses

200 OK
Body
Object
content
Array
Object
breakdown
Object
id
string GUID

A temporary identifier to link child levels

Example:
bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f
parent_id
string GUID

The identifier of the previous level

Example:
bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f
level
integer

The breakdown level 0 = EVENTS

Example:
1
property_name
string

The name of the property within the group

Example:
venue.name
property_value
string

The value of the property

Example:
Costa Coffee Larnaca
event_name
string

The name of the event

count
integer

The number of points can be used for frequency

Example:
1
amount
number

The decimal amounts for the level

Example:
12.8
list_name
string

Applicable only if the property is a list and represents the list name

Example:
products
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/insights/62cb9ada-3a7b-cafb-b7a7-7c103011fa48/preview HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "start_date": 1612953199,
    "end_date": 1612953199,
    "events": [
        {
            "name": "Purchases",
            "event_name": "PURCHASE",
            "totals": {
                "is_frequency": true,
                "property_name": ""
            },
            "criteria": [
                {
                    "name": "A",
                    "property": {
                        "property": "venue.name",
                        "operator": "IS_NOT",
                        "value_list": [
                            ""
                        ]
                    }
                }
            ]
        }
    ],
    "filters": [
        {
            "name": "",
            "type": "CONTACT",
            "property_name": "",
            "operator": "DOES_NOT_CONTAIN",
            "min_value": "",
            "max_value": "",
            "value_list": [
                ""
            ]
        }
    ],
    "breakdowns": [
        {
            "name": "",
            "type": "CONTACT",
            "property_name": ""
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "breakdown": {
                "id": "bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f",
                "parent_id": "bb686ff0-e7a4-a8a6-05a6-cfe8e39f675f",
                "level": 1,
                "property_name": "venue.name",
                "property_value": "Costa Coffee Larnaca",
                "event_name": "",
                "count": 1,
                "amount": 12.8,
                "list_name": "products"
            }
        }
    ]
}
Get Distinct Values for an Insight property
GET /distincts

Get a list of distinct values for a contact or event property

Request parameters

collection
string optional

Contact or Event collectioons

Example:
CONTACT, EVENT
property_name
string optional

city

Responses

200 OK
Body
Array
Object
property_value
string

Value of the property

Example:
London
Example 1
GET https://sandbox.crm.com/backoffice/v1/distincts HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "property_value": "London"
    }
]
Export Insight Results
POST /insights/{id}/exports

Export the results of a specific insight

Path variables

id
string GUID required

The insights (identifier) that will be exported

Example:
efc5c8af-56ba-3d6f-d180-18be6dd04cc8

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Request body

Object
type
string required

Defines what data should be exported from the related insight results

Enumeration:
RESULTS

Export results in a tabular format, excluding underlying data

UGD

Export all underlying granular data that were used for this Insight

format
string nullable

Defines the file format in which the exported data should be exported

Enumeration:
csv

CSV file

Default:
csv

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/insights/efc5c8af-56ba-3d6f-d180-18be6dd04cc8/exports HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "type": "UGD",
    "format": "csv"
}

HTTP/1.1 200 OK 
Reports

CRM.COM provides a pre-defined list of Reports.

POST /reports/{name}/preview
POST /reports/{name}
PUT /reports/{id}
DELETE /reports/{id}
GET /reports/{id}
Preview Report
POST /reports/{name}/preview

Runs the report in preview mode. The Web API returns a subset of the report’s results for preview purposes (max 10 records included in the response).

Path variables

name
string required

The report (unique name) that will be previewed

Enumeration:
contacts_summary
contacts_orders_analysis
order_details
contacts_rewards_analysis
organisations_rewards_analysis
organisations_rewards_statement
reward_offer_performance
devices_summary
subscriptions_summary
service_requests_summary
service_requests_analysis

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
filters_set
Array required

Set of filters based on which the report runs

Object
key
string required

The filter’s name

Example:
period_from
value
string required

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

Example:
This month
columns_set
Array required

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 key name

Example:
product_code

Responses

200 OK
Body
Object
content
Array
Object
fields
Array

List of fields and their values. Each object in this list represents a row in the report’s preview. Up to 10 records are returned

Object
key
string

The field’s key

Example:
name
value
string

The key’s value

Example:
Jane Smith
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/reports/contacts_summary/preview HTTP/1.1 

Content-Type: application/json

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "fields": [
                {
                    "key": "name",
                    "value": "Jane Smith"
                }
            ]
        }
    ]
}
Run Report
POST /reports/{name}

Runs the requested report and sends an email to the User that ran it. User receives a link through which the report can be downloaded. The download link will be available for 2 days. The Report can also be scheduled via this Web API, i.e. schedule to run and send its results on a frequent basis.

Path variables

name
string required

The report (unique name) that will be scheduled

Enumeration:
contacts_summary
contacts_orders_analysis
order_details
contacts_rewards_analysis
organisations_rewards_analysis
organisations_rewards_statement
reward_offer_performance
devices_summary
subscriptions_summary
service_requests_summary
service_requests_analysis

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
format
string required

The report’s format

Enumeration:
PDF
CSV
filters_set
Array required

Set of filters based on which the report runs

Min items: 1
Unique items: YES
Example:
[
    {
        "label": "Registration date",
        "key": "period_from",
        "value": "THIS_MONTH",
        "type": "NUMBER"
    }
]
Object
label
string required

The filter’s label

Example:
Registration date
key
string required

The filter’s name

Example:
period_from
value
string required

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

Example:
THIS_MONTH
type
string required

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 required

The ordering of the columns from left to right

Example:
1
label
string required

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

Example:
Code
key
string required

The field’s name

Example:
product_code
type
string required

The data type of the filter

Enumeration:
TEXT
NUMBER
INTEGER
DATE
group_by_set
Array nullable

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

Object
order
integer required

The grouping’s ordering

Example:
1
label
string required

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

Example:
Type
key
string required

The field’s name

Example:
product_type
type
string required

The data type of the filter

Enumeration:
TEXT
NUMBER
INTEGER
DATE
name
string nullable

Defines the report’s name (if not provided will be set based on the report’s unique name, e.g. Contacts Summary). Specify a meaningfull name if reprot is to be scheduled. This report name appears in the email’s subject.

Example:
VIP Contacts
scheduler_options
Object nullable

Defines the scheduler settings that will send a report on a recurring basis (if not specified, report will be generated and send only once)

period
string required

Defines the period when report generation will take place

Enumeration:
DAILY
WEEKLY
MONTHLY
frequency
string required

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
recipients
Array nullable

Defines the recipients that will receive the report results (if not specified, will be sent to the user that requested such report). Applicable only on scheduling the report.

Object
type
string required

The type of recipients that will retrieve the report

Enumeration:
TEAM

Applicable only to Business organisations

USER
id
string GUID required

The recipients that will retrieve the report

Example:
b52f4dbb-0ccf-db7a-93b6-2cc35af9fc39

Responses

204 No Content
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
Example 2

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

POST https://sandbox.crm.com/backoffice/v2/reports/contacts_summary HTTP/1.1 

Content-Type: application/json

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

Schedule a report to be sent on a recurring basis and send to users of a specific team

POST https://sandbox.crm.com/backoffice/v2/reports/contacts_summary 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": "NUMBER"
        }
    ],
    "group_by_set": [
        {
            "order": 1,
            "label": "Type",
            "key": "product_type",
            "type": "TEXT"
        }
    ],
    "name": "VIP Contacts",
    "scheduler_options": {
        "period": "WEEKLY",
        "frequency": "0 0 12 * * ?"
    },
    "recipients": [
        {
            "type": "TEAM",
            "id": "b52f4dbb-0ccf-db7a-93b6-2cc35af9fc39"
        }
    ]
}
Update Report
PUT /reports/{id}

Update a Report’s scheduling options.

Path variables

id
string GUID required

The scheduled report’s identifier

Example:
81228876-09c6-cc46-638d-be2a7a6867bf

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
format
string required

The report’s format

Enumeration:
PDF
CSV
scheduler_options
Object nullable

Defines the scheduler settings that will send a report on a recurring basis (if not specified, report will be generated and send only once)

period
string required

Defines the period when report generation will take place

Enumeration:
DAILY
WEEKLY
MONTHLY
frequency
string required

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
recipients
Array nullable

Defines the recipients that will receive the report results. A scheduled reprot requires at least one recipient.

Object
type
string required

The type of recipients that will retrieve the report

Enumeration:
TEAM

Applicable only to Business organisations

USER
id
string GUID required

The recipients that will retrieve the report

Example:
b52f4dbb-0ccf-db7a-93b6-2cc35af9fc39

Responses

200 OK
Body
Object
id
string GUID

The report identifier

Example:
81228876-09c6-cc46-638d-be2a7a6867bf
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/reports/81228876-09c6-cc46-638d-be2a7a6867bf HTTP/1.1 

Content-Type: application/json

{
    "format": "PDF",
    "scheduler_options": {
        "period": "WEEKLY",
        "frequency": "0 0 12 * * ?"
    },
    "recipients": [
        {
            "type": "TEAM",
            "id": "b52f4dbb-0ccf-db7a-93b6-2cc35af9fc39"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "81228876-09c6-cc46-638d-be2a7a6867bf"
}
Delete Report
DELETE /reports/{id}

Deletes a scheduled report. The selected report will no longer be sent to any recipients.

Path variables

id
string GUID required

The schedulued report’s identifier

Example:
1193d47e-f079-3f03-299b-50b7419459af

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

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

204 No Content

The request has succeeded

Example 1
DELETE https://sandbox.crm.com/backoffice/v2/reports/1193d47e-f079-3f03-299b-50b7419459af HTTP/1.1 

HTTP/1.1 204 No Content 
List Scheduled Reports
GET /reports

Retrieves a list of all scheduled reports

Request parameters

search_value
string optional

Filter based on report name

Example:
VIP Customers
type
string optional

Filter based on report type

Enumeration:
contacts_summary
contacts_orders_analysis
order_details
contacts_rewards_analysis
organisations_rewards_analysis
organisations_rewards_statement
reward_offer_performance
devices_summary
subscriptions_summary
service_requests_summary
service_requests_analysis
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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
type
string

The type of the event

Enumeration:
contacts_summary
contacts_orders_analysis
order_details
contacts_rewards_analysis
organisations_rewards_analysis
organisations_rewards_statement
reward_offer_performance
devices_summary
subscriptions_summary
service_requests_summary
service_requests_analysis
name
string

The scheduled report name

Example:
VIP Contacts
scheduler_options
Object

Defines the scheduler settings that will send a report on a recurring basis (if not specified, report will be generated and send only once)

period
string

Defines the period when report generation will take place

Enumeration:
DAILY
WEEKLY
MONTHLY
frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
next_scheduled
integer

The next scheduled period to run the report

Example:
1639123750
recipients
Array

Defines the recipients that will receive the report results

Object
type
string

The type of recipients that will retrieve the report

Enumeration:
TEAM

Applicable only to Business organisations

USER
name
string

The recipient name

Example:
John Doe
username
string

The recipient username (applicable for recipients of type == USER)

Example:
johndoe@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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/reports HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "type": "organisations_rewards_analysis",
            "name": "VIP Contacts",
            "scheduler_options": {
                "period": "WEEKLY",
                "frequency": "0 0 12 * * ?",
                "next_scheduled": 1639123750
            },
            "recipients": [
                {
                    "type": "TEAM",
                    "name": "John Doe",
                    "username": "johndoe@crm.com"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Scheduled Report
GET /reports/{id}

Get details for a specific scheduled report

Path variables

id
string GUID required

The scheduled report’s identifier that will be retrieved

Example:
df97fe77-84f0-d761-39d6-6d9e1ddf4962

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
id
string GUID

The (scheduled) report (identifier) that will be retrieved

Example:
df97fe77-84f0-d761-39d6-6d9e1ddf4962
name
string

The scheduled report name

Example:
VIP Contacts
type
string

The type of the event

Enumeration:
contacts_summary
contacts_orders_analysis
order_details
contacts_rewards_analysis
organisations_rewards_analysis
organisations_rewards_statement
reward_offer_performance
devices_summary
subscriptions_summary
service_requests_summary
service_requests_analysis
format
string

The report’s format

Enumeration:
PDF
CSV
filters_set
Array

Details about the filters based on which the report runs

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

Details about the columns that will be included in the report

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

The data type of the filter

Enumeration:
TEXT
NUMBER
INTEGER
DATE
group_by_set
Array

Details about the fields to be used to group the report’s results

Object
order
integer required

The grouping’s ordering

Example:
1
label
string required

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

Example:
Type
key
string required

The field’s name

Example:
product_type
type
string required

The data type of the filter

Enumeration:
TEXT
NUMBER
INTEGER
DATE
scheduler_options
Object

Defines the scheduler settings that will send a report on a recurring basis (if not specified, report will be generated and send only once)

period
string

Defines the period when report generation will take place

Enumeration:
DAILY
WEEKLY
MONTHLY
frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
next_scheduled
integer

The next scheduled period to run the report

Example:
1639123750
recipients
Array

Details about the recipients that will receive the report results

Object
recipient_type
string

The type of recipients that will retrieve the report

Enumeration:
TEAM

Applicable only to Business organisations

USER
recipient_id
string GUID

The recipients that will retrieve the report

Example:
b52f4dbb-0ccf-db7a-93b6-2cc35af9fc39
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/reports/df97fe77-84f0-d761-39d6-6d9e1ddf4962 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "df97fe77-84f0-d761-39d6-6d9e1ddf4962", 
    "name": "VIP Contacts",
    "type": "devices_summary",
    "format": "PDF",
    "filters_set": [
        {
            "label": "Registration date",
            "key": "period_from",
            "value": "THIS_MONTH",
            "type": "INTEGER"
        }
    ],
    "columns_set": [
        {
            "order": 1,
            "label": "Code",
            "key": "product_code",
            "type": "NUMBER"
        }
    ],
    "group_by_set": [
        {
            "order": 1,
            "label": "Type",
            "key": "product_type",
            "type": "DATE"
        }
    ],
    "scheduler_options": {
        "period": "WEEKLY",
        "frequency": "0 0 12 * * ?",
        "next_scheduled": 1639123750
    },
    "recipients": [
        {
            "recipient_type": "USER",
            "recipient_id": "b52f4dbb-0ccf-db7a-93b6-2cc35af9fc39"
        }
    ]
}
Get Organisation Analytics
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
string required

Which metrics are required. A list of metrics can be included in the request, comma separated. At least one must be specified.

Enumeration:
NEW_SIGN_UPS
REWARD_PARTICIPANTS
REWARD_PARTICIPANTS_PER_TIER
OPEN_LOOP_PARTICIPANTS
CLOSE_LOOP_PARTICIPANTS
ACTIVE_REWARD_OFFERS
MOST_REWARDED_OFFER
TOTAL_AWARDS
TOTAL_SPENDS
GIVEN_AWARDS
AWARDS_SPEND
AWARDS_SPEND_PER_VISIT
TOP_10_BEST_OFFERS
TOTAL_PURCHASE_AMOUNT
NUMBER_OF_VISITS
MOST_VISITED_VENUES VISITS
MERCHANTS
VENUES
TOTAL_APPLICATIONS_USAGE
REFERRED_BY
WALLET_BALANCE_BREAK_DOWN
ACTIVE_SUBSCRIBERS
INACTIVE_SUBSCRIBERS
NEW_SERVICES
CANCELLED_SERVICES
REGRETTED_SERVICES
SERVICES_IN_TRIAL
DEACTIVATED_sERVICES
ACTIVATED_SERVICES
SERVICES_IN_TRIAL_WITH_FAILED_PAYMENTS
PAID_SERVICES_IN_TRIAL
CANCELLED_SERVICES_IN_TRIAL
CANCELLED_SERVICES_AFTER_TRIAL
NEW_SUBSCRIBERS
REACTIVATED_SUBSCRIPTIONS
REMOVED_SERVICES_AFTER_EXPIRATION
CANCELLED_SERVICES_IN_CONTRACT
CANCELLED_SERVICES_NOT_IN_CONTRACT
RENEWED_SERVICES
EXPIRED_SERVICES
SUBSCRIBER_CHURN_RATE
TRIALS_STARTED_PER_MONTH
AWARDS

Total Awarded Amount and Total Number of Awards and Previous Period Values

SPENDS

Total Spent Amount and Total Number of Spends and Previous Period Values

SPEND_ANALYSIS
TOTAL_INSTANT_SPENDS
TOTAL_REQUEST_SPENDS
TOTAL_AUTO_SPENDS
TOTAL_EXPIRED_AWARDS
TOTAL_AD_HOC_RETURN_AMOUNT
NUMBER_OF_AD_HOC_RETURNS
TOTAL_LOTTERY_AWARD_AMOUNT
TOTAL_REFERRAL_AWARD_AMOUNT
NUMBER_OF_LOTTERY_AWARDS
NUMBER_OF_REFERRALS
NUMBER_OF_ACHIEVEMENTS
REWARDS_ANALYSIS
CUSTOMER_EVENTS_ANALYSIS
AD_HOC_RETURNS
LOTTERY_WINNERS
REFERRALS
PURCHASES
TOTAL_OPEN_SERVICE_REQUESTS
TOTAL_CLOSED_SERVICE_REQUESTS
MOST_POPULAR_CLOSURE_REASON
SERVICE_REQUEST_RESOLUTION_RATE
SERVICE_REQUESTS_ANALYSIS
TOTAL_OPEN_LEADS
TOTAL_WON_LEADS
TOTAL_LOST_LEADS
LEAD_RESOLUTION_RATIO
LEADS_ANALYSIS
NEW_CONTACTS
CONTACT_REFERRALS
ACTIVE_CONTACTS
CONTACTS_USING_APPLICATIONS
CONTACTS_ACTIVITY
APPLICATIONS_USAGE_BREAKDOWN
ORDERS_ANALYSIS
NEW_ORDERS
CANCELLED_ORDERS
COMPLETED_ORDERS
AVERAGE_ORDER_COMPLETION
TOTAL_ORDER_AMOUNT
MOST_POPULAR_CANCELLATION_REASON
PREFERRED_ORDERING_ORGANISATION
frequency
string required

Frequency denotes which metric will be applied for example get the daily or monthly metrics

Enumeration:
OVERALL
DAILY
WEEKLY
MONTHLY
QUARTERLY
HALF_YEARLY
YEARLY
Default:
OVERALL

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
organisation_id
string GUID
Example:
64824e45-ad64-40c5-9ef4-81cb4d88d9b5
organisation_name
string
Example:
Subscription-Billing
merchants
integer
venues
integer
trials
integer
new_sign_ups
integer
referred_by
integer
reward_participants
integer
reward_participants_per_tier
integer
open_loop_reward_participants
integer
close_loop_reward_participants
integer
active_offers
integer
most_awarded_offer
string
total_awards
number
total_spends
integer
given_awards
integer
awards_spend
integer
average_spend_per_visit
number
top_10_best_offers
Array
Object
offer_id
string GUID
Example:
034de72f-2006-4a80-ba49-13c4de5cc31b
offer_name
string
Example:
Register to Sports channel and win 21 BDT
total_award_amount
number
Example:
26.25
total_purchase_amount
number
total_visits
integer
most_visited_venues
string
total_applications_usage
integer
wallets_open_balance
number
wallets_commerse_balance
number
active_subscribers
integer
inactive_subscribers
integer
new_services
integer
cancelled_services
integer
regretted_services
integer
upgraded_services
integer
downgraded_services
boolean
services_in_trial
integer
deactivated_services
integer
activated_services
integer
paid_services_in_trial
integer
cancelled_services_in_trial
integer
new_subscribers
integer
reactivated_subscriptions
integer
removed_services_after_expiration
integer
cancelled_services_in_contract
integer
cancelled_services_not_in_contract
integer
renewed_services
integer
expired_services
integer
subscriber_churn_rate
integer
active_subscriptions_per_billing_period
integer
active_services_per_month
integer
connected_wifi_contacts
integer

The number of contacts auth’d against a WiFi platform

Example:
3
total_wifi_devices
integer

The number of devices auth’d against a WiFi platform

Example:
2
data_allowance_consumption
Object

Details about data allowance (data should be aggregated from child organisations as well)

consumed_allowance
number

The consumed data allownace

Example:
12
remaining_allowance
number

The remaining data allownace

Example:
12.12
total_allowance
number

The total data allownace (consumed + remaining)

Example:
24.12
top_10_organisation_allowance
Array

Details about the top 10 organisations that allowance was consumed

Object
organisation_id
string GUID

The organisation identifier

Example:
8833bf28-e888-a21b-9619-0945f2dd47c1
organisation_name
string

The organisation name

Example:
CRM
total_consumption
number

The total allowance consumed on the organisation

Example:
123.12
total_open_service_requests
integer
total_closed_service_requests
integer
previous_total_open_service_requests
integer
previous_total_closed_service_requests
integer
most_popular_closure_reason
string
previous_most_popular_closure_reason
string
service_requests_analysis
Array
Object
month
string
open_service_requests
integer
closed_service_requests
integer
previous_total_open_leads
string
total_open_leads
integer
total_lost_leads
integer
previous_total_lost_leads
integer
total_won_leads
integer
previous_total_won_leads
integer
leads_analysis
Array
Object
month
string
open_leads
integer
won_leads
integer
lost_leads
integer
new_contacts
integer
previous_new_contacts
integer
referrals
integer
previous_referrals
integer
active_contacts
integer
previous_active_contacts
integer
contacts_using_applications
integer
previous_contacts_using_applications
integer
contacts_activity
Array
Object
month
string
contacts_registered
integer
contacts_using_applications
integer
referrals
integer
applications_usage_breakdown
Object
mobile_applications
integer
portal_applications
integer
other_applications
integer
new_orders
integer
previous_new_orders
integer
completed_orders
integer
previous_completed_orders
integer
cancelled_orders
integer
previous_cancelled_orders
integer
average_order_completion
number
previous_average_order_completion
number
total_order_amount
number
previous_total_order_amount
number
most_popular_cancellation_reason
string
previous_most_popular_cancellation_reason
string
preferred_ordering_organisation
string
previous_preferred_ordering_organisation
string
orders_analysis
Array
Object
month
string
new_orders
integer
completed_orders
integer
cancelled_orders
integer
total_mrr
number
previous_total_mrr
number
new_mrr
number
previous_new_mrr
number
mrr_growth
number
previous_mrr_growth
number
trial_paid_mrr
number
previous_trial_paid_mrr
number
reactivation_mrr
number
previous_reactivation_mrr
number
expand_mrr
number
previous_expand_mrr
number
upgrade_mrr
number
previous_upgrade_mrr
number
sub_expansion_mrr
number
previous_sub_expansion_mrr
number
restart_mrr
number
previous_restart_mrr
number
churn_mrr
number
previous_churn_mrr
number
downgrade_mrr
number
previous_downgrade_mrr
number
cancel_mrr
number
previous_cancel_mrr
number
regret_mrr
number
previous_regret_mrr
number
contact_category_mrr
Array
Object
month
string
mrr
number
category
Object
id
string
name
string
service_mrr
Array
Object
month
string
mrr
number
product
Object
id
string
name
string
price_term_mrr
Array
Object
month
string
mrr
number
price_term
string
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
Example 1
GET https://sandbox.crm.com/backoffice/v1/organisations/babc8d45-50be-4259-b1bf-c85dee46642f/analytics HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "",
            "organisation_id": "64824e45-ad64-40c5-9ef4-81cb4d88d9b5",
            "organisation_name": "Subscription-Billing",
            "merchants": 1,
            "venues": 1,
            "trials": 1,
            "new_sign_ups": 1,
            "referred_by": 1,
            "reward_participants": 1,
            "reward_participants_per_tier": 1,
            "open_loop_reward_participants": 1,
            "close_loop_reward_participants": 1,
            "active_offers": 1,
            "most_awarded_offer": "",
            "total_awards": 1,
            "total_spends": 1,
            "given_awards": 1,
            "awards_spend": 1,
            "average_spend_per_visit": 1,
            "top_10_best_offers": [
                {
                    "offer_id": "034de72f-2006-4a80-ba49-13c4de5cc31b",
                    "offer_name": "Register to Sports channel and win 21 BDT",
                    "total_award_amount": 26.25
                }
            ],
            "total_purchase_amount": 1,
            "total_visits": 1,
            "most_visited_venues": "",
            "total_applications_usage": 1,
            "wallets_open_balance": 1,
            "wallets_commerse_balance": 1,
            "active_subscribers": 1,
            "inactive_subscribers": 1,
            "new_services": 1,
            "cancelled_services": 1,
            "regretted_services": 1,
            "upgraded_services": 1,
            "downgraded_services": true,
            "services_in_trial": 1,
            "deactivated_services": 1,
            "activated_services": 1,
            "paid_services_in_trial": 1,
            "cancelled_services_in_trial": 1,
            "new_subscribers": 1,
            "reactivated_subscriptions": 1,
            "removed_services_after_expiration": 1,
            "cancelled_services_in_contract": 1,
            "cancelled_services_not_in_contract": 1,
            "renewed_services": 1,
            "expired_services": 1,
            "subscriber_churn_rate": 1,
            "active_subscriptions_per_billing_period": 1,
            "active_services_per_month": 1
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Contact Analytics
GET /contacts/{id}/analytics

Get analytics for a contact

Path variables

id
string GUID required

The contact (identifier) of which analytics will be retrieved

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

Request parameters

metrics
string required

Filters based on which metrics will be retrieved (a list of metrics can be included in the request, comma separated - and at least one metric should be specified)

Enumeration:
USAGE
frequency
string required

Frequency denotes which metric will be applied for example get the daily or monthly metrics

Enumeration:
OVERALL
DAILY
WEEKLY
MONTHLY
QUARTERLY
HALF_YEARLY
YEARLY
Default:
OVERALL

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

Details about the contact

id
string GUID

The contact identifier

Example:
fa3360fa-a246-7d1e-1c41-eda3c093dcc9
name
string

The contact (full) name

Example:
John R. Doe
usage
Object

Details about contact’s usage

consumed_usage
number

The usage that is already consumed

Example:
20
remaining_usage
number

The remaining usage that can be consumed

Example:
80
usage_percentage
number

The percentage relation between consumed and allowed usage

Example:
20
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/contacts/babc8d45-50be-4259-b1bf-c85dee46642f/analytics?metrics=USAGE&frequency=OVERALL HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "contact": {
        "id": "fa3360fa-a246-7d1e-1c41-eda3c093dcc9",
        "name": "John R. Doe"
    },
    "usage": {
        "consumed_usage": 20,
        "remaining_usage": 80,
        "usage_percentage": 20
    }
}
Attachment Files & Media

Storing and managing attachment files and creative assets across modules

Attachment Files
POST /files
DELETE /files/{id}
GET /files/{id}
Upload File
POST /files

Create an upload signature for files

Notes

FILE UPLOAD FLOW

Integrating file upload for Service Requests should be based on the following APIs

  1. Upload File Signature
  2. Connect File to a “Module” Entity, such as Service Request Files

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

multipart/form-data
application/json
Object
file
string required

File contents provided via multipart/form-data

Example:
file object

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The file identifier that will be used for connecting the file with a module

Example:
7279fecf-b0a6-0aab-6bcd-37881fe8c10e
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/files HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "file": "file object"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "7279fecf-b0a6-0aab-6bcd-37881fe8c10e"
}
Delete File
DELETE /files/{id}

Delete an existing file

Path variables

id
string GUID required

The file (identifier) to be deleted

Example:
5f21680e-2ce4-7b4b-7221-42cc2a41bc05

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

204 No Content

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

425 Too Early

The server is unwilling to process a request because it may be replayed

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
DELETE https://sandbox.crm.com/backoffice/v2/files/5f21680e-2ce4-7b4b-7221-42cc2a41bc05 HTTP/1.1 

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

HTTP/1.1 200 OK 
Get File
GET /files/{id}

Retrieve a specific file

Path variables

id
string GUID required

The file (identifier) to be retrieved

Example:
5f21680e-2ce4-7b4b-7221-42cc2a41bc05

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

The request has succeeded

Body
Object
id
string GUID

The file identifier

Example:
3ae9d64a-8a3b-f1e1-eed6-05b307f926fb
content_url
string

The URL that can be used to access the actual content of the file

Example:
crm.com/file
mime
string

The mime type of the uploaded file

Enumeration:
csv
doc
docx
xls
xlsx
pdf
log
txt
png
jpg
jpeg
svg
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/files/5f21680e-2ce4-7b4b-7221-42cc2a41bc05 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "3ae9d64a-8a3b-f1e1-eed6-05b307f926fb",
    "content_url": "crm.com/file",
    "mime": "txt"
}
Media
POST /media_groups
POST /media
POST /signature
DELETE /media/{id}
Create Media Group
POST /media_groups

Create a new group for upcoming uploaded media

Notes

MEDIA UPLOAD

Uploading media for an entity requires the execution of the following APIs

  1. Create new Media Group
  2. Create “Module” Media Group, such as Product Media Groups
  3. Upload Media
  4. Perform Cloudinary Upload (where CRM will send all signature details)
  5. Cloudinary service calls back CRM media group (using an internal callback)

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 media group name

Example:
Marketing
description
string nullable

The media group description

Example:
Marketing Media Group for Creatives
external_id
string GUID required

The media group external identifier

Example:
747e5a96-24a2-7aca-7b28-da5e996ad54c

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The media group identifier

Example:
6778834c-f0c5-f4ec-953f-e1ed35d75918
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/media_groups HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Marketing",
    "description": "Marketing Media Group for Creatives",
    "external_id": "747e5a96-24a2-7aca-7b28-da5e996ad54c"
}

HTTP/1.1 200 OK 
Upload Media
POST /media

Create an upload media

Notes

MEDIA UPLOAD

Uploading media for an entity requires the execution of the following APIs

  1. Create new Media Group
  2. Create “Module” Media Group, such as Product Media Groups
  3. Upload Media
  4. Perform Cloudinary Upload (where CRM will send all signature details)
  5. Cloudinary service calls back CRM media group (using an internal callback)

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
media_group_external_id
string GUID required

The media group (identifier) to associate the media item with once uploaded (external id is based on the response of Create new Media Group)

Example:
e66896ba-db0a-41e2-8093-9aca2ae02f29
media_usage_type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
APPLE_LOCKSCREEN_ICON
APPLE_LOGO_IMAGE
APPLE_STRIP_IMAGE
GOOGLE_LOGO_IMAGE
GOOGLE_STRIP_IMAGE
LANDING_PAGE_LOGO_IMAGE
LANDING_PAGE_HEADER_IMAGE
LANDING_PAGE_BACKGROUND_IMAGE
HERO
LOGO
BACKGROUND
AVATAR
PARTNER_LOGO

Partner logos configurable by SO, applicable for Business, Merchant, Venue

DELIVERY_IMAGE

Applicable only for Applications

PICKUP_IMAGE

Applicable only for Applications

DIRECT_SALE_IMAGE

Applicable only for Applications

WALLET_IMAGE

Applicable only for Applications

LANDING_PAGE_IMAGE

Applicable only for Applications

APP_LOGO

Applicable only for Applications

folder
string required

The related Cloudinary folder (within CRM the folder is set as the media related organisation-id)

Example:
offers/hero
tracking_key
string GUID required

The key to track upload (random UUID)

Example:
26c32dfe-f8ea-9cf3-a5af-5096be4a164b

Responses

201 Created

The request has succeeded

Body
Object
api_key
string

The API key that is used for uploading media

Example:
698271538719998
cloud_name
string

The name of the cloudinary instance

Example:
crm-com
context
string

The uploaded signature context

Example:
uploadStrategy=MEDIA_UPLOAD|organisationId=8062c26a-c05f-47ca-81e4-566b3c279320|trackingKey=e3ffca89-902f-4bd6-b503-c7dcf59dd725|mediaGroupExternalId=1d7b73d2-a324-4cee-a97a-492050b101ef|usageType=ATTACHMENT
signature
string

The uploaded signature value

Example:
8f38472a40d8466f11852bd9d3a19c23bfe12f91
timestamp
integer epoch

The date/time on which such upload was made

Example:
1616056261
upload_options
Array

Details about the upload options

Object
folder
string GUID

The folder in which media will be uploaded (and located)

Example:
35d7d0a4-9846-73a7-8707-26d2507edc51
media_group_external_id
string GUID

The media group external identifier

Example:
35d7d0a4-9846-73a7-8707-26d2507edc51
media_usage_type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
APPLE_LOCKSCREEN_ICON
APPLE_LOGO_IMAGE
APPLE_STRIP_IMAGE
GOOGLE_LOGO_IMAGE
GOOGLE_STRIP_IMAGE
LANDING_PAGE_LOGO_IMAGE
LANDING_PAGE_HEADER_IMAGE
LANDING_PAGE_BACKGROUND_IMAGE
HERO
LOGO
BACKGROUND
AVATAR
PARTNER_LOGO

Partner logos configurable by SO, applicable for Business, Merchant, Venue

DELIVERY_IMAGE

Applicable only for Applications

PICKUP_IMAGE

Applicable only for Applications

DIRECT_SALE_IMAGE

Applicable only for Applications

WALLET_IMAGE

Applicable only for Applications

LANDING_PAGE_IMAGE

Applicable only for Applications

APP_LOGO

Applicable only for Applications

options
Object

Defines how media will be used

type
string

The option type (defaults to upload)

Example:
upload
needed_signature_options
Object

Details that will be used in the signature

folder
string GUID

The folder in which media will be uploaded (and located)

Example:
6ff2469c-e473-e370-c86e-16633434607a
type
string

Defines what action will be performed on the media (always is set to “upload”)

Example:
upload
tracking_key
string GUID

The key to track the current upload

Example:
6ff2469c-e473-e370-c86e-16633434607a
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/media HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "media_group_external_id": "e66896ba-db0a-41e2-8093-9aca2ae02f29",
    "media_usage_type": "LOGO",
    "folder": "offers/hero",
    "tracking_key": "26c32dfe-f8ea-9cf3-a5af-5096be4a164b"
}

HTTP/1.1 201 Created

Content-Type: application/json

{
    "api_key": "698271538719998",
    "cloud_name": "crm-com",
    "context": "uploadStrategy=MEDIA_UPLOAD|organisationId=8062c26a-c05f-47ca-81e4-566b3c279320|trackingKey=e3ffca89-902f-4bd6-b503-c7dcf59dd725|mediaGroupExternalId=1d7b73d2-a324-4cee-a97a-492050b101ef|usageType=ATTACHMENT",
    "signature": "8f38472a40d8466f11852bd9d3a19c23bfe12f91",
    "timestamp": 1616056261,
    "upload_options": [
        {
            "folder": "35d7d0a4-9846-73a7-8707-26d2507edc51",
            "media_group_external_id": "35d7d0a4-9846-73a7-8707-26d2507edc51",
            "media_usage_type": "MARKETING",
            "options": {
                "type": "upload"
            },
            "needed_signature_options": {
                "folder": "6ff2469c-e473-e370-c86e-16633434607a",
                "type": "upload"
            },
            "tracking_key": "6ff2469c-e473-e370-c86e-16633434607a"
        }
    ]
}
Upload Signature
POST /signature

Create an upload signature

Notes

Uploading media into CRM is made based on the following flow & API calls

  1. Create new Media Group
  2. Create “Module” Media Group, such as Product Media Groups
  3. Upload Media
  4. Perform Cloudinary Upload (where CRM will send all signature details)
  5. Cloudinary service calls back CRM media group (using an internal callback)

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
media_group_external_id
string GUID required

The media group (identifier) to associate the media item with once uploaded (external id is based on the response of Create new Media Group)

Example:
e66896ba-db0a-41e2-8093-9aca2ae02f29
media_usage_type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
APPLE_LOCKSCREEN_ICON
APPLE_LOGO_IMAGE
APPLE_STRIP_IMAGE
GOOGLE_LOGO_IMAGE
GOOGLE_STRIP_IMAGE
LANDING_PAGE_LOGO_IMAGE
LANDING_PAGE_HEADER_IMAGE
LANDING_PAGE_BACKGROUND_IMAGE
HERO
LOGO
BACKGROUND
AVATAR
PARTNER_LOGO

Partner logos configurable by SO, applicable for Business, Merchant, Venue

DELIVERY_IMAGE

Applicable only for Applications

PICKUP_IMAGE

Applicable only for Applications

DIRECT_SALE_IMAGE

Applicable only for Applications

WALLET_IMAGE

Applicable only for Applications

LANDING_PAGE_IMAGE

Applicable only for Applications

APP_LOGO

Applicable only for Applications

folder
string required

The related Cloudinary folder (within CRM the folder is set as the media related organisation-id)

Example:
offers/hero
tracking_key
string GUID required

The key to track upload (random UUID)

Example:
26c32dfe-f8ea-9cf3-a5af-5096be4a164b

Responses

201 Created

The request has succeeded

Body
Object
api_key
string

The API key that is used for uploading media

Example:
698271538719998
cloud_name
string

The name of the cloudinary instance

Example:
crm-com
context
string

The uploaded signature context

Example:
uploadStrategy=MEDIA_UPLOAD|organisationId=8062c26a-c05f-47ca-81e4-566b3c279320|trackingKey=e3ffca89-902f-4bd6-b503-c7dcf59dd725|mediaGroupExternalId=1d7b73d2-a324-4cee-a97a-492050b101ef|usageType=ATTACHMENT
signature
string

The uploaded signature value

Example:
8f38472a40d8466f11852bd9d3a19c23bfe12f91
timestamp
integer epoch

The date/time on which such upload was made

Example:
1616056261
upload_options
Array

Details about the upload options

Object
folder
string GUID

The folder in which media will be uploaded (and located)

Example:
35d7d0a4-9846-73a7-8707-26d2507edc51
media_group_external_id
string GUID

The media group external identifier

Example:
35d7d0a4-9846-73a7-8707-26d2507edc51
media_usage_type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
APPLE_LOCKSCREEN_ICON
APPLE_LOGO_IMAGE
APPLE_STRIP_IMAGE
GOOGLE_LOGO_IMAGE
GOOGLE_STRIP_IMAGE
LANDING_PAGE_LOGO_IMAGE
LANDING_PAGE_HEADER_IMAGE
LANDING_PAGE_BACKGROUND_IMAGE
HERO
LOGO
BACKGROUND
AVATAR
PARTNER_LOGO

Partner logos configurable by SO, applicable for Business, Merchant, Venue

DELIVERY_IMAGE

Applicable only for Applications

PICKUP_IMAGE

Applicable only for Applications

DIRECT_SALE_IMAGE

Applicable only for Applications

WALLET_IMAGE

Applicable only for Applications

LANDING_PAGE_IMAGE

Applicable only for Applications

APP_LOGO

Applicable only for Applications

options
Object
type
string

The option type

Example:
upload
needed_signature_options
Object
folder
string GUID
Example:
6ff2469c-e473-e370-c86e-16633434607a
type
string
Example:
upload
tracking_key
string GUID

The key to track the current upload

Example:
6ff2469c-e473-e370-c86e-16633434607a
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/signature HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
Content-Type: application/json

{
    "media_group_external_id": "e66896ba-db0a-41e2-8093-9aca2ae02f29",
    "media_usage_type": "APPLE_LOCKSCREEN_ICON",
    "folder": "offers/hero",
    "tracking_key": "26c32dfe-f8ea-9cf3-a5af-5096be4a164b"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "api_key": "698271538719998",
    "cloud_name": "crm-com",
    "context": "uploadStrategy=MEDIA_UPLOAD|organisationId=8062c26a-c05f-47ca-81e4-566b3c279320|trackingKey=e3ffca89-902f-4bd6-b503-c7dcf59dd725|mediaGroupExternalId=1d7b73d2-a324-4cee-a97a-492050b101ef|usageType=ATTACHMENT",
    "signature": "8f38472a40d8466f11852bd9d3a19c23bfe12f91",
    "timestamp": 1616056261,
    "upload_options": [
        {
            "folder": "35d7d0a4-9846-73a7-8707-26d2507edc51",
            "media_group_external_id": "35d7d0a4-9846-73a7-8707-26d2507edc51",
            "media_usage_type": "APPLE_LOCKSCREEN_ICON",
            "options": {
                "type": "upload"
            },
            "needed_signature_options": {
                "folder": "6ff2469c-e473-e370-c86e-16633434607a",
                "type": "upload"
            },
            "tracking_key": "6ff2469c-e473-e370-c86e-16633434607a"
        }
    ]
}
Delete Media
DELETE /media/{id}

Delete an existing media

Path variables

id
string GUID required

The media (identifier) that will be deleted

Example:
5f21680e-2ce4-7b4b-7221-42cc2a41bc05

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

204 No Content

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

425 Too Early

The server is unwilling to process a request because it may be replayed

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
DELETE https://sandbox.crm.com/backoffice/v2/media/5f21680e-2ce4-7b4b-7221-42cc2a41bc05 HTTP/1.1 

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

HTTP/1.1 204 No Content 
Approvals

Approval is a type of workflow which comprises a series of steps that an event must pass in order to be approved. A request for approval prevents a specific record from further amendment or process unless it is approved by a number of authorised user(s) or contact. Approval requests are created when an automation is triggered and can be processed (approved/rejected) by an authorised user or by a contact.

GET /approval_requests
PUT /approval_requests/{id}/actions
GET /approval_requests/{token}
GET /approval_requests/my_approvals
GET /approval_requests/my_requests
List Approval Requests
GET /approval_requests

Retrieve a list of approval requests based on search criteria (e.g. all pending approval requests)

Request parameters

search_value
string optional

Filter based on search value (case insensitive) across entity and entity reference

Example:
Bravo Brewery
state
string optional

Filter based on approval request state

Enumeration:
PENDING
APPROVED
REJECTED
automations
array of string optional

Filter based on automations that triggered such request (applicable only when org_requests is set to NETWORK_REQUESTS)

Collection format: csv
Unique items: YES
user_id
string GUID optional

Filter based on a single user that is authorised to approve/reject such request

Example:
cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0
contact_id
string GUID optional

Filter based on a single contact that is authorised to approve/reject such request

Example:
58c4a0c4-f60b-9930-c8da-89e9949a7850
authorised_type
string optional

Filter based on the condition type that are authorised to approve/reject such requests

Enumeration:
TEAM
USER
CONTACT
requested_by
string GUID optional

Filter based on the entity (contact/user) that requested such approval

Example:
b5582bc8-41ec-9c97-7446-2944e60b3ff8
entity_type
string optional

Filter based on the entity type that such requests are applied to

Enumeration:
ORGANISATION
REWARD_OFFER
ORDER
SERVICE_REQUEST
entity
string GUID optional

Filter based on entity record that such request is applied to

Example:
eebefada-399d-e892-0a20-d7963e9db19a
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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 approval request identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
state
string

The approval request state

Enumeration:
PENDING
APPROVED
REJECTED
entity
Object

Details about the entity that an approval request was applied to

id
string GUID

The entity identifier

Example:
cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0
type
string

The approval entity type

Enumeration:
ORGANISATION
REWARD_OFFER
ORDER
SERVICE_REQUEST
reference
string

The entity reference name/code/number

Example:
CO1234
automation
Object

Details about the automation

id
string GUID

The automation identifer

Example:
cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0
name
string

The automation name

Example:
Request approval on newly activated offers
responses
Array

Details about approval requests responses

Object
message
string

The authorised user/contact response message on this request

Example:
This is a response message
state
string

The response state

Enumeration:
APPROVED
REJECTED
authorised_by
Object

Details about the person (user/contact) who approved/rejected such request

id
string GUID

The authorised person identifier

Example:
23490b97-dd93-3eb4-c3bc-e6828e12e2c1
name
string

The authorised person full name

Example:
John Doe
type
string

The authorised type of person

Enumeration:
CONTACT
USER
authorised_on
integer GUID

The date/time when such request was approvded/rejected

Example:
1611930210
conditions
Array

Details about the authorised by type who can approve/reject such requests

Object
id
string GUID

The authorised condition identifier

Example:
18eb40c8-ba71-fa51-9de7-5b7017962ccf
name
string

The authorised condition name (e.g. contact full name, user role name)

Example:
Support
type
string

The authorised condition type

Enumeration:
TEAM
USER
CONTACT
created_date
integer epoch

The date that the approval was requested

Example:
1642508197
pending_requests
integer

Defines how many should approve/reject the approval

Example:
2
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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/approval_requests HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CEEE83D6E0804A30966F684B0269AD91",
            "state": "APPROVED",
            "description": "The award of the offer has been changed to 100% from what it was 50%",
            "response": "Approved",
            "authorised_by": {
                "id": "23490b97-dd93-3eb4-c3bc-e6828e12e2c1",
                "name": "John Doe",
                "type": "USER"
            },
            "authorised_on": 1611930210,
            "automations": {
                "id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
                "name": "Request approval on newly activated offers"
            },
            "entity": {
                "id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
                "type": "REWARD_OFFER",
                "reference": "5% discount"
            },
            "authorised_conditions": [
                {
                    "id": "18eb40c8-ba71-fa51-9de7-5b7017962ccf",
                    "name": "John Doe",
                    "type": "USER"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Approval Request Actions
PUT /approval_requests/{id}/actions

Perform actions on existing approval requests (e.g. approve a request)

Path variables

id
string GUID required

The approval request (identifier) that will be updated

Example:
23cf989a-47b5-6019-d0c9-b4a50a13f847

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
state
string required

The approval request state that will be changed to

Enumeration:
APPROVED
REJECTED
response
string nullable

The reason why the approval request was approved or rejected

Example:
Award cannot be 100%

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The approval request identifier

Example:
23cf989a-47b5-6019-d0c9-b4a50a13f847
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/approval_requests/23cf989a-47b5-6019-d0c9-b4a50a13f847/actions HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "state": "REJECTED",
    "response": "Award cannot be 100%"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "23cf989a-47b5-6019-d0c9-b4a50a13f847"
}
Approval Request (Approve/Reject) Respond
GET /approval_requests/{token}

Accept or reject a pending approval request (using an action link send via a communication)

Path variables

token
string required

The token that will verify that the client is trusted and will approve/reject the related request

Example:
2fa42de0-38a0-1e86-b813-d370c35b082c

Responses

200 OK

The request has succeeded

Body

An HTML based landing page is returned and rendered

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

List Approval Requests - My Approvals
GET /approval_requests/my_approvals

Retrieve a list of pending approval requests based on search criteria that the signed-in user is authorised to approve/reject (e.g. all pending reward offer approval requests)

Request parameters

search_value
string optional

Filter based on search value (case insensitive) across entity and entity reference

Example:
Bravo Brewery
entity_type
string optional

Filter based on entity type that such requests are applied to

Enumeration:
ORGANISATION
REWARD_OFFER
ORDER
SERVICE_REQUEST
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The approval request identifier

Example:
02df8a7b-6f0b-62bc-df70-b6f08694404f
created_date
integer epoch

The date that the approval was requested

Example:
1642508197
entity
Object

Details about the entity that an approval request was applied to

id
string GUID

The entity identifier

Example:
cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0
type
string

The approval entity type

Enumeration:
ORGANISATION
REWARD_OFFER
ORDER
SERVICE_REQUEST
reference
string

The entity reference name/code/number

Example:
CO1234
automations
Object

Details about the automation

id
string GUID

The automation identifer

Example:
cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0
name
string

The automation name

Example:
Request approval on newly activated offers
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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/approval_requests/my_pending_approvals HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CEEE83D6E0804A30966F684B0269AD91",
            "entity": {
                "id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
                "type": "SERVICE_REQUEST",
                "reference": "CO1234"
            },
            "automations": {
                "id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
                "name": "Request approval on newly activated offers"
            },
            "created_date": 1642508197
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
List Approval Requests - My Requested Approvals
GET /approval_requests/my_requests

Retrieve a list of approvals based on search criteria that were requested by the signed-in user (e.g. all pending approvals)

Request parameters

search_value
string optional

The value of the search (case insensitive) across entity and entity reference

Example:
Bravo Brewery
state
string optional

Filter based on approval request state

Enumeration:
PENDING
APPROVED
REJECTED
entity_type
string optional

Filter based on the entity type that such requests are applied to

Enumeration:
ORGANISATION
REWARD_OFFER
ORDER
SERVICE_REQUEST
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The approval request identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
state
string

The approval request state

Enumeration:
PENDING
APPROVED
REJECTED
created_date
integer epoch

The date that the approval was requested

Example:
1642508197
pending_requests
integer

Defines how many should approve/reject the approval

Example:
2
entity
Object

Details about the entity that an approval request was applied to

id
string GUID

The entity identifier

Example:
cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0
type
string

The approval entity type

Enumeration:
ORGANISATION
REWARD_OFFER
ORDER
SERVICE_REQUEST
reference
string

The entity reference name/code/number

Example:
CO1234
automation
Object

Details about the automation

id
string GUID

The automation identifer

Example:
cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0
name
string

The automation name

Example:
Request approval on newly activated offers
responses
Array

Details about approval requests responses

Example:
[
    {
        "message": "This is a response message",
        "state": "APPROVED",
        "authorised_by": {
            "id": "23490b97-dd93-3eb4-c3bc-e6828e12e2c1",
            "name": "John Doe",
            "type": "USER"
        },
        "authorised_on": 1611930210
    }
]
Object
message
string

The authorised user/contact response message on this request

Example:
This is a response message
state
string

The response state

Enumeration:
APPROVED
REJECTED
authorised_by
Object

Details about the person (user/contact) who approved/rejected such request

id
string GUID

The authorised person identifier

Example:
23490b97-dd93-3eb4-c3bc-e6828e12e2c1
name
string

The authorised person full name

Example:
John Doe
type
string

The authorised type of person

Enumeration:
CONTACT
USER
authorised_on
integer GUID

The date/time when such request was approvded/rejected

Example:
1611930210
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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/approval_requests/my_requests HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CEEE83D6E0804A30966F684B0269AD91",
            "state": "APPROVED",
            "entity": {
                "id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
                "type": "ORDER",
                "reference": "CO1234"
            },
            "automations": {
                "id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
                "name": "Request approval on newly activated offers"
            },
            "responses": [
                {
                    "message": "This is a response message",
                    "state": "APPROVED",
                    "authorised_by": {
                        "id": "23490b97-dd93-3eb4-c3bc-e6828e12e2c1",
                        "name": "John Doe",
                        "type": "USER"
                    },
                    "authorised_on": 1611930210
                }
            ],
            "created_date": 1642508197,
            "pending_requests": 2
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Automations

An automation is a predefined sequence of steps that allow a business to automate repeatable tasks that are required to carry its operations. An automation starts with an event trigger (an action within CRM.COM, such as contact registration, award contact) and is completed with a series of actions via internal and/or external adaptors (e.g. send contacts an outbound email communication) executed in the sequential order defined.

Each adaptor is designed to carry out a specific business action (e.g. Mailchimp to send an email to a contact; or the CRM.COM assignment adaptor to fulfil an order by a venue).

POST /automations
PUT /automations/{id}
DELETE /automations/{id}
GET /automations
GET /automations/{id}
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:
Communicate contact on service request
description
string nullable

The automation description

Example:
actions on new service request
state
string nullable

The automation state

Enumeration:
ACTIVE
INACTIVE
Default:
INACTIVE
entity
string required

Defines the entity that its events will trigger this automation

Enumeration:
APPROVALS
ACTIVITIES
CONTACTS
CUSTOMER_EVENTS
FINANCIAL_TRANSACTIONS
ORDERS
ORGANISATIONS
PASSES
PRODUCTS
REWARDS
REWARD_OFFERS
REWARD_SCHEMES
SERVICE_REQUEST
SUBSCRIPTIONS
USAGE
USERS
event
string required

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

Enumeration:
APPROVE_ALL_REQUESTS

Approvals

REJECT_REQUESTS

Approvals

REGISTER_CONTACT

Contacts

UPDATE_CONTACT

Contacts

REFER_A_FRIEND

Contacts

REQUEST_ONE_TIME_PASSWORD

Contacts

REQUIRE_EMAIL_VERIFICATION

Contacts

REQUEST_PASSWORD_RESET

Contacts & Users

NEW_ORDER

Orders

ORDER_INITIATION

Orders

ORDER_COMPLETION

Orders

ORDER_CANCELLATION

Orders

GENERATE_PRINTED_PASSES

Passes

GENERATE_ELECTRONIC_PASSES

Passes

AWARD

Rewards

REDEEM

Rewards

SPEND

Rewards

ACTIVATE_REWARD_OFFER

Reward Offers

REQ_TO_JOIN_CLOSE_LOOP_SCHEME

Reward Schemes

NEW_SERVICE_REQUEST

Service Requests

REGISTER_ORGANISATION

Organisations

VALIDATE_REGISTER_ORGANISATION

Organisations

INVITE_USER

Users

INVITE_EXISTING_USER

Users

PRODUCT_SYNCHRONISATION

Products

NEW_REFUND

Financial Transactions

NEW_INVOICE

Financial Transactions

NEW_CREDIT_NOTE

Financial Transactions

NEW_PAYMENT

Financial Transactions

NEW_TOP_UP

Financial Transactions

NEW_PURCHASE

Customer Events

CANCEL_PURCHASE

Customer Events

AD_HOC_RETURN_PURCHASE

Customer Events

NEW_SUBSCRIPTION

Subscriptions

ADD_SUB_SERV

Subscriptions

CANCEL_SUB_SERV

Subscriptions

REGRET_SUB_SERV

Subscriptions

UPGRADE_SUB_SERV

Subscriptions

DOWNGRADE_SUB_SERV

Subscriptions

ACTIVATE_SUB_SERV

Subscriptions

DEACTIVATE_SUB_SERV

Subscriptions

PAUSE_SUB_SERV

Subscriptions

RESUME_SUB_SERV

Subscriptions

OPT_SUB_SERV_IN_AUTO_RENEW

Subscriptions

OPT_SUB_SERV_OUT_AUTO_RENEW

Subscriptions

EXTEND_SUB_SERV_TERM_PERIOD

Subscriptions

EXTEND_SUB_SERV_CONT_PERIOD

Subscriptions

RENEW_SUB_SERV_TERM_PERIOD

Subscriptions

RENEW_SUB_SERV_CONT_PERIOD

Subscriptions

ADD_ONE_TIME_SERVICE

Subscriptions

NEW_USAGE

Usage

REJECT_USAGE

Usage

APPROVAL_ON_CHANGE_ORDER_STATUS

Orders

UPDATE_ORDER

Orders

UPDATE_SERVICE_REQUEST

Service Requests

UPDATE_SERVICE_REQUEST_STATUS

Service Requests

REGRESS_SERVICE_REQUEST

Service Requests

CLOSE_SERVICE_REQUEST

Service Requests

NEW_SERVICE_REQUEST_NOTE

Service Requests

UPDATE_SERVICE_REQUEST_NOTE

Service Requests

APPROVAL_ON_CHANGE_SR_STATUS

Service Requests

SCHEDULE_ACTIVITY

Activities

UPDATE_ACTIVITY

Activities

COMPLETE_ACTIVITY

Activities

UPDATE_PRODUCT

Products

CREATE_PRODUCT

Products

NEW_TRANSFER

Financial Transactions

NEW_PAYOUT

Financial Transactions

UPDATE_ORDER_STAGE

Orders

PAYMENT_FAILURE

Financial Transactions

actions
Array required

The automation actions (adaptors and filters) that will be performed

Object

The automation action

order
integer required

The automation action order

Example:
1
adaptor
Object required nullable

Details about adaptor (and its action/parameters)

adaptor
string required

The automation adaptor

Enumeration:
ACTIVITY_SCHEDULING

Activity Provision

APPROVAL_REQUESTS

Approval Requests

AUTOMATIC_CONTENT_UPDATES

Automatic Content Updates

COMMUNICATIONS

Communications

CUSTOMER_EVENTS

Customer Event Provision

ORDER_PRINT

Order Provision

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

TWINSOFT_ORDER_PROVISIONING

Twinsoft Order Provision

action
string required

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

Enumeration:
USER_APPROVAL

Request User Appoval

CONTACT_APPROVAL

Request Contact Appoval

UPDATE_CONTENT

Update Content

COMMUNICATE_CUSTOMER

Communicate Contact

COMMUNICATE_USER

Communicate User

ASSIGN_SPECIFIC_USER

Assign to a specific user

FF_BY_SPECIFIC_ORGANISATION

Fulfilled By specific organisation

ASSIGN_SPECIFIC_TEAM

Assign to specific team adaptor)

FULFILLED_BY_NEAREST_LOCATION

Fulfilled by nearest location

FF_BASED_ON_POST_CODE_COVERAGE

Fulfilled based on postal code

POST_WEBHOOK

Post Webhook

PUT_WEBHOOK

Put Webhook

ASSIGN_USER_OF_SPECIFIC_TEAM

Assign to user of a specific team

ASSIGN_USER_OF_SPEC_USER_ROLE

Assign to user of a specific user role

FF_BY_USER_OF_SPEC_USER_ROLE

Fulfilled by a user of a specific user role

FULFILLED_BY_SPECIFIC_USER

Fulfilled by a specific user

PROV_ORDER_TO_SIMPHONY_POS

Provision (create) order to Simphony POS

PROV_ORDER_TO_ALOHA_POS

Provision (create) order to Aloha POS

VOID_ORDER_TO_ALOHA_POS

Provision (void) order to Aloha POS

POST_PURCHASE

Create a purchase event

CANCEL_PURCHASE

Cancel a purchase event

SEND_PASSES_DETAILS

Webhooks

SCHEDULE_ACTIVITY

Schedule an activity

PROV_ORDER_TO_TWINSOFT_POS

Provision (create) order to Twinsoft POS

PRINT_RECEIPT

Provision (print receipt) order to an external POS based on IP and port

POST_ACHIEVEMENT

Create an achievement event

parameters
Array nullable

Details about the adaptor’s actions parameters

Object
id
string GUID nullable

The parameter identifier

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

The parameter type

Enumeration:
DATE
INTEGER
NUMBER
STRING
group
string required

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

Example:
1
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
CUSTOMER_EVENT_CLASSIFICATION
WITHIN_ORGANISATIONS
from_value
string required

The parameter from value

Example:
123
to_value
string nullable

The parameter to value

Example:
1234
filters
Array required nullable

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

Object
attributes
Array required

Details about applicable filter 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_CLASSIFICATION
REWARD_OFFER_GOAL
REWARD_OFFER_TYPE
REWARD_OFFER_SPEND_METHOD("
REWARD_OFFER_AWARD_AMOUNT("
REWARD_OFFER_AWARD_PERCENTAGE
CONTACT_CUSTOM_FIELD
ENTITY_CUSTOM_FIELD
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 required nullable

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

string
Example:
lorem ipsum
custom_field_key
string nullable

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

Example:
contact_avg

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The automation identifier

Example:
c69b54fc-644b-1dc9-65b2-f0b3672cf46e
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/automations HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Communicate contact on service request",
    "description": "actions on new service request",
    "state": "INACTIVE",
    "entity": "ORGANISATIONS",
    "event": "NEW_ORDER",
    "actions": [
        {
            "order": 1,
            "adaptor": {
                "adaptor": "APPROVAL_REQUESTS",
                "action": "FF_BY_USER_OF_SPEC_USER_ROLE",
                "parameters": [
                    {
                        "id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
                        "type": "INTEGER",
                        "group": "1",
                        "key": "FULFILL_ORDER_DISTANCE",
                        "from_value": "123",
                        "to_value": "1234"
                    }
                ]
            }
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "c69b54fc-644b-1dc9-65b2-f0b3672cf46e"
}
Update Automation
PUT /automations/{id}

Update an existing automation

Path variables

id
string GUID required

The automation (identifier) that will be updated

Example:
c69b54fc-644b-1dc9-65b2-f0b3672cf46e

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
state
string nullable

The automation state

Enumeration:
ACTIVE
INACTIVE
Default:
INACTIVE
actions
Array nullable

The automation actions (adaptors and filters) that will be performed

Object

The automation action

order
integer required

The automation action order

Example:
1
adaptor
Object required nullable

Details about adaptor (and its action/parameters)

adaptor
string required

The automation adaptor

Enumeration:
ACTIVITY_SCHEDULING

Activity Provision

APPROVAL_REQUESTS

Approval Requests

AUTOMATIC_CONTENT_UPDATES

Automatic Content Updates

COMMUNICATIONS

Communications

CUSTOMER_EVENTS

Customer Event Provision

ORDER_PRINT

Order Provision

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

TWINSOFT_ORDER_PROVISIONING

Twinsoft Order Provision

action
string required

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

Enumeration:
USER_APPROVAL

Request User Appoval

CONTACT_APPROVAL

Request Contact Appoval

UPDATE_CONTENT

Update Content

COMMUNICATE_CUSTOMER

Communicate Contact

COMMUNICATE_USER

Communicate User

ASSIGN_SPECIFIC_USER

Assign to a specific user

FF_BY_SPECIFIC_ORGANISATION

Fulfilled By specific organisation

ASSIGN_SPECIFIC_TEAM

Assign to specific team adaptor)

FULFILLED_BY_NEAREST_LOCATION

Fulfilled by nearest location

FF_BASED_ON_POST_CODE_COVERAGE

Fulfilled based on postal code

POST_WEBHOOK

Post Webhook

PUT_WEBHOOK

Put Webhook

ASSIGN_USER_OF_SPECIFIC_TEAM

Assign to user of a specific team

ASSIGN_USER_OF_SPEC_USER_ROLE

Assign to user of a specific user role

FF_BY_USER_OF_SPEC_USER_ROLE

Fulfilled by a user of a specific user role

FULFILLED_BY_SPECIFIC_USER

Fulfilled by a specific user

PROV_ORDER_TO_SIMPHONY_POS

Provision (create) order to Simphony POS

PROV_ORDER_TO_ALOHA_POS

Provision (create) order to Aloha POS

VOID_ORDER_TO_ALOHA_POS

Provision (void) order to Aloha POS

POST_PURCHASE

Create a purchase event

CANCEL_PURCHASE

Cancel a purchase event

SEND_PASSES_DETAILS

Webhooks

SCHEDULE_ACTIVITY

Schedule an activity

PROV_ORDER_TO_TWINSOFT_POS

Provision (create) order to Twinsoft POS

PRINT_RECEIPT

Provision (print receipt) order to an external POS based on IP and port

POST_ACHIEVEMENT

Create an achievement event

parameters
Array nullable

Details about the adaptor’s actions parameters

Object
id
string GUID nullable

The parameter identifier

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

The parameter type

Enumeration:
DATE
INTEGER
NUMBER
STRING
group
string required

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

Example:
1
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
CUSTOMER_EVENT_CLASSIFICATION
WITHIN_ORGANISATIONS
from_value
string required

The parameter from value

Example:
123
to_value
string nullable

The parameter to value

Example:
1234
filters
Array required nullable

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

Object
attributes
Array required

Details about applicable filter 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_CLASSIFICATION
REWARD_OFFER_GOAL
REWARD_OFFER_TYPE
REWARD_OFFER_SPEND_METHOD("
REWARD_OFFER_AWARD_AMOUNT("
REWARD_OFFER_AWARD_PERCENTAGE
CONTACT_CUSTOM_FIELD
ENTITY_CUSTOM_FIELD
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 required nullable

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

string
Example:
lorem ipsum
custom_field_key
string nullable

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

Example:
contact_avg

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The automation identifier

Example:
c69b54fc-644b-1dc9-65b2-f0b3672cf46e
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/automations/c69b54fc-644b-1dc9-65b2-f0b3672cf46e HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Approve Offers",
    "description": "Require 4 approvals for an offer",
    "state": "INACTIVE",
    "actions": [
        {
            "order": 1,
            "adaptor": {
                "adaptor": "CUSTOMER_EVENTS",
                "action": "FULFILLED_BY_SPECIFIC_USER",
                "parameters": [
                    {
                        "id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
                        "type": "NUMBER",
                        "group": "1",
                        "key": "FULFILL_ORDER_POSTAL_CODE",
                        "from_value": "123",
                        "to_value": "1234"
                    }
                ]
            }
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c69b54fc-644b-1dc9-65b2-f0b3672cf46e"
}
Delete Automation
DELETE /automations/{id}

Delete an existing automation

Path variables

id
string GUID required

The automation (identifier) that will be deleted

Example:
3c72e7d1-e763-1db7-a776-6dd0295f728c

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

204 No Content

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
DELETE https://sandbox.crm.com/backoffice/v2/automations/3c72e7d1-e763-1db7-a776-6dd0295f728c HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Automations
GET /automations

Retrieve a list of automations based on search criteria (e.g. all active automations)

Request parameters

search_value
string optional

Filter based on search value (case insensitive) across name

Example:
Notify customers on award
name
string optional

Filter based on automation name

Example:
Notify customers on award
state
string optional

Filter based on automation state

Enumeration:
ACTIVE
INACTIVE
Default:
INACTIVE
entity
string optional

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

Enumeration:
APPROVALS
ACTIVITIES
CONTACTS
CUSTOMER_EVENTS
FINANCIAL_TRANSACTIONS
ORDERS
ORGANISATIONS
PASSES
PRODUCTS
REWARDS
REWARD_OFFERS
REWARD_SCHEMES
SERVICE_REQUEST
SUBSCRIPTIONS
USAGE
USERS
event
string optional

Filter based on the event that will trigger the automation

Enumeration:
APPROVE_ALL_REQUESTS

Approvals

REJECT_REQUESTS

Approvals

REGISTER_CONTACT

Contacts

UPDATE_CONTACT

Contacts

REFER_A_FRIEND

Contacts

REQUEST_ONE_TIME_PASSWORD

Contacts

REQUIRE_EMAIL_VERIFICATION

Contacts

REQUEST_PASSWORD_RESET

Contacts & Users

NEW_ORDER

Orders

ORDER_INITIATION

Orders

ORDER_COMPLETION

Orders

ORDER_CANCELLATION

Orders

GENERATE_PRINTED_PASSES

Passes

GENERATE_ELECTRONIC_PASSES

Passes

AWARD

Rewards

REDEEM

Rewards

SPEND

Rewards

ACTIVATE_REWARD_OFFER

Reward Offers

REQ_TO_JOIN_CLOSE_LOOP_SCHEME

Reward Schemes

NEW_SERVICE_REQUEST

Service Requests

REGISTER_ORGANISATION

Organisations

VALIDATE_REGISTER_ORGANISATION

Organisations

INVITE_USER

Users

INVITE_EXISTING_USER

Users

PRODUCT_SYNCHRONISATION

Products

NEW_REFUND

Financial Transactions

NEW_INVOICE

Financial Transactions

NEW_CREDIT_NOTE

Financial Transactions

NEW_PAYMENT

Financial Transactions

NEW_TOP_UP

Financial Transactions

NEW_PURCHASE

Customer Events

CANCEL_PURCHASE

Customer Events

AD_HOC_RETURN_PURCHASE

Customer Events

NEW_SUBSCRIPTION

Subscriptions

ADD_SUB_SERV

Subscriptions

CANCEL_SUB_SERV

Subscriptions

REGRET_SUB_SERV

Subscriptions

UPGRADE_SUB_SERV

Subscriptions

DOWNGRADE_SUB_SERV

Subscriptions

ACTIVATE_SUB_SERV

Subscriptions

DEACTIVATE_SUB_SERV

Subscriptions

PAUSE_SUB_SERV

Subscriptions

RESUME_SUB_SERV

Subscriptions

OPT_SUB_SERV_IN_AUTO_RENEW

Subscriptions

OPT_SUB_SERV_OUT_AUTO_RENEW

Subscriptions

EXTEND_SUB_SERV_TERM_PERIOD

Subscriptions

EXTEND_SUB_SERV_CONT_PERIOD

Subscriptions

RENEW_SUB_SERV_TERM_PERIOD

Subscriptions

RENEW_SUB_SERV_CONT_PERIOD

Subscriptions

ADD_ONE_TIME_SERVICE

Subscriptions

NEW_USAGE

Usage

REJECT_USAGE

Usage

APPROVAL_ON_CHANGE_ORDER_STATUS

Orders

UPDATE_ORDER

Orders

UPDATE_SERVICE_REQUEST

Service Requests

UPDATE_SERVICE_REQUEST_STATUS

Service Requests

REGRESS_SERVICE_REQUEST

Service Requests

CLOSE_SERVICE_REQUEST

Service Requests

NEW_SERVICE_REQUEST_NOTE

Service Requests

UPDATE_SERVICE_REQUEST_NOTE

Service Requests

APPROVAL_ON_CHANGE_SR_STATUS

Service Requests

SCHEDULE_ACTIVITY

Activities

UPDATE_ACTIVITY

Activities

COMPLETE_ACTIVITY

Activities

UPDATE_PRODUCT

Products

CREATE_PRODUCT

Products

NEW_TRANSFER

Financial Transactions

NEW_PAYOUT

Financial Transactions

UPDATE_ORDER_STAGE

Orders

PAYMENT_FAILURE

Financial Transactions

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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:
efc5389d-ae3f-9b94-73f9-5f916e8b350e
name
string

The automation name

Example:
Notify customers on award
description
string

The automation description

Example:
Lorem Ipsum
state
string

The automation state

Enumeration:
ACTIVE
INACTIVE
Default:
INACTIVE
entity
string

Defines the entity that its events will trigger this automation

Enumeration:
APPROVALS
ACTIVITIES
CONTACTS
CUSTOMER_EVENTS
FINANCIAL_TRANSACTIONS
ORDERS
ORGANISATIONS
PASSES
PRODUCTS
REWARDS
REWARD_OFFERS
REWARD_SCHEMES
SERVICE_REQUEST
SUBSCRIPTIONS
USAGE
USERS
event
string

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

Enumeration:
APPROVE_ALL_REQUESTS

Approvals

REJECT_REQUESTS

Approvals

REGISTER_CONTACT

Contacts

UPDATE_CONTACT

Contacts

REFER_A_FRIEND

Contacts

REQUEST_ONE_TIME_PASSWORD

Contacts

REQUIRE_EMAIL_VERIFICATION

Contacts

REQUEST_PASSWORD_RESET

Contacts & Users

NEW_ORDER

Orders

ORDER_INITIATION

Orders

ORDER_COMPLETION

Orders

ORDER_CANCELLATION

Orders

GENERATE_PRINTED_PASSES

Passes

GENERATE_ELECTRONIC_PASSES

Passes

AWARD

Rewards

REDEEM

Rewards

SPEND

Rewards

ACTIVATE_REWARD_OFFER

Reward Offers

REQ_TO_JOIN_CLOSE_LOOP_SCHEME

Reward Schemes

NEW_SERVICE_REQUEST

Service Requests

REGISTER_ORGANISATION

Organisations

VALIDATE_REGISTER_ORGANISATION

Organisations

INVITE_USER

Users

INVITE_EXISTING_USER

Users

PRODUCT_SYNCHRONISATION

Products

NEW_REFUND

Financial Transactions

NEW_INVOICE

Financial Transactions

NEW_CREDIT_NOTE

Financial Transactions

NEW_PAYMENT

Financial Transactions

NEW_TOP_UP

Financial Transactions

NEW_PURCHASE

Customer Events

CANCEL_PURCHASE

Customer Events

AD_HOC_RETURN_PURCHASE

Customer Events

NEW_SUBSCRIPTION

Subscriptions

ADD_SUB_SERV

Subscriptions

CANCEL_SUB_SERV

Subscriptions

REGRET_SUB_SERV

Subscriptions

UPGRADE_SUB_SERV

Subscriptions

DOWNGRADE_SUB_SERV

Subscriptions

ACTIVATE_SUB_SERV

Subscriptions

DEACTIVATE_SUB_SERV

Subscriptions

PAUSE_SUB_SERV

Subscriptions

RESUME_SUB_SERV

Subscriptions

OPT_SUB_SERV_IN_AUTO_RENEW

Subscriptions

OPT_SUB_SERV_OUT_AUTO_RENEW

Subscriptions

EXTEND_SUB_SERV_TERM_PERIOD

Subscriptions

EXTEND_SUB_SERV_CONT_PERIOD

Subscriptions

RENEW_SUB_SERV_TERM_PERIOD

Subscriptions

RENEW_SUB_SERV_CONT_PERIOD

Subscriptions

ADD_ONE_TIME_SERVICE

Subscriptions

NEW_USAGE

Usage

REJECT_USAGE

Usage

APPROVAL_ON_CHANGE_ORDER_STATUS

Orders

UPDATE_ORDER

Orders

UPDATE_SERVICE_REQUEST

Service Requests

UPDATE_SERVICE_REQUEST_STATUS

Service Requests

REGRESS_SERVICE_REQUEST

Service Requests

CLOSE_SERVICE_REQUEST

Service Requests

NEW_SERVICE_REQUEST_NOTE

Service Requests

UPDATE_SERVICE_REQUEST_NOTE

Service Requests

APPROVAL_ON_CHANGE_SR_STATUS

Service Requests

SCHEDULE_ACTIVITY

Activities

UPDATE_ACTIVITY

Activities

COMPLETE_ACTIVITY

Activities

UPDATE_PRODUCT

Products

CREATE_PRODUCT

Products

NEW_TRANSFER

Financial Transactions

NEW_PAYOUT

Financial Transactions

UPDATE_ORDER_STAGE

Orders

PAYMENT_FAILURE

Financial Transactions

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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/automations HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "efc5389d-ae3f-9b94-73f9-5f916e8b350e",
            "name": "communicate contact",
            "description": "Lorem Ipsum",
            "state": "INACTIVE",
            "entity": "REWARD_OFFERS",
            "event": "INVITE_EXISTING_USER"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Automation
GET /automations/{id}

Retrieve detailed information for an automation

Path variables

id
string GUID required

The automation (identifier) that will be retrieved

Example:
37160c87-3c37-9a00-0716-4933fe6b76f4

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:
37160c87-3c37-9a00-0716-4933fe6b76f4
name
string

The automation name

Example:
communicate contact
description
string

The automation description

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

The automation state

Enumeration:
ACTIVE
INACTIVE
Default:
INACTIVE
entity
string

Defines the entity that its events will trigger this automation

Enumeration:
APPROVALS
ACTIVITIES
CONTACTS
CUSTOMER_EVENTS
FINANCIAL_TRANSACTIONS
ORDERS
ORGANISATIONS
PASSES
PRODUCTS
REWARDS
REWARD_OFFERS
REWARD_SCHEMES
SERVICE_REQUEST
SUBSCRIPTIONS
USAGE
USERS
event
string

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

Enumeration:
APPROVE_ALL_REQUESTS

Approvals

REJECT_REQUESTS

Approvals

REGISTER_CONTACT

Contacts

UPDATE_CONTACT

Contacts

REFER_A_FRIEND

Contacts

REQUEST_ONE_TIME_PASSWORD

Contacts

REQUIRE_EMAIL_VERIFICATION

Contacts

REQUEST_PASSWORD_RESET

Contacts & Users

NEW_ORDER

Orders

ORDER_INITIATION

Orders

ORDER_COMPLETION

Orders

ORDER_CANCELLATION

Orders

GENERATE_PRINTED_PASSES

Passes

GENERATE_ELECTRONIC_PASSES

Passes

AWARD

Rewards

REDEEM

Rewards

SPEND

Rewards

ACTIVATE_REWARD_OFFER

Reward Offers

REQ_TO_JOIN_CLOSE_LOOP_SCHEME

Reward Schemes

NEW_SERVICE_REQUEST

Service Requests

REGISTER_ORGANISATION

Organisations

VALIDATE_REGISTER_ORGANISATION

Organisations

INVITE_USER

Users

INVITE_EXISTING_USER

Users

PRODUCT_SYNCHRONISATION

Products

NEW_REFUND

Financial Transactions

NEW_INVOICE

Financial Transactions

NEW_CREDIT_NOTE

Financial Transactions

NEW_PAYMENT

Financial Transactions

NEW_TOP_UP

Financial Transactions

NEW_PURCHASE

Customer Events

CANCEL_PURCHASE

Customer Events

AD_HOC_RETURN_PURCHASE

Customer Events

NEW_SUBSCRIPTION

Subscriptions

ADD_SUB_SERV

Subscriptions

CANCEL_SUB_SERV

Subscriptions

REGRET_SUB_SERV

Subscriptions

UPGRADE_SUB_SERV

Subscriptions

DOWNGRADE_SUB_SERV

Subscriptions

ACTIVATE_SUB_SERV

Subscriptions

DEACTIVATE_SUB_SERV

Subscriptions

PAUSE_SUB_SERV

Subscriptions

RESUME_SUB_SERV

Subscriptions

OPT_SUB_SERV_IN_AUTO_RENEW

Subscriptions

OPT_SUB_SERV_OUT_AUTO_RENEW

Subscriptions

EXTEND_SUB_SERV_TERM_PERIOD

Subscriptions

EXTEND_SUB_SERV_CONT_PERIOD

Subscriptions

RENEW_SUB_SERV_TERM_PERIOD

Subscriptions

RENEW_SUB_SERV_CONT_PERIOD

Subscriptions

ADD_ONE_TIME_SERVICE

Subscriptions

NEW_USAGE

Usage

REJECT_USAGE

Usage

APPROVAL_ON_CHANGE_ORDER_STATUS

Orders

UPDATE_ORDER

Orders

UPDATE_SERVICE_REQUEST

Service Requests

UPDATE_SERVICE_REQUEST_STATUS

Service Requests

REGRESS_SERVICE_REQUEST

Service Requests

CLOSE_SERVICE_REQUEST

Service Requests

NEW_SERVICE_REQUEST_NOTE

Service Requests

UPDATE_SERVICE_REQUEST_NOTE

Service Requests

APPROVAL_ON_CHANGE_SR_STATUS

Service Requests

SCHEDULE_ACTIVITY

Activities

UPDATE_ACTIVITY

Activities

COMPLETE_ACTIVITY

Activities

UPDATE_PRODUCT

Products

CREATE_PRODUCT

Products

NEW_TRANSFER

Financial Transactions

NEW_PAYOUT

Financial Transactions

UPDATE_ORDER_STAGE

Orders

PAYMENT_FAILURE

Financial Transactions

actions
Array

The automation actions (adaptors and filters) that will be performed

Object
order
integer

Defines the sequence’s action

Example:
1
adaptor
Object

Details about adaptor (and its action/parameters)

adaptor
string

The automation adaptor

Enumeration:
ACTIVITY_SCHEDULING

Activity Provision

APPROVAL_REQUESTS

Approval Requests

AUTOMATIC_CONTENT_UPDATES

Automatic Content Updates

COMMUNICATIONS

Communications

CUSTOMER_EVENTS

Customer Event Provision

ORDER_PRINT

Order Provision

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

TWINSOFT_ORDER_PROVISIONING

Twinsoft Order Provision

action
string

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

Enumeration:
USER_APPROVAL

Request User Appoval

CONTACT_APPROVAL

Request Contact Appoval

UPDATE_CONTENT

Update Content

COMMUNICATE_CUSTOMER

Communicate Contact

COMMUNICATE_USER

Communicate User

ASSIGN_SPECIFIC_USER

Assign to a specific user

FF_BY_SPECIFIC_ORGANISATION

Fulfilled By specific organisation

ASSIGN_SPECIFIC_TEAM

Assign to specific team adaptor)

FULFILLED_BY_NEAREST_LOCATION

Fulfilled by nearest location

FF_BASED_ON_POST_CODE_COVERAGE

Fulfilled based on postal code

POST_WEBHOOK

Post Webhook

PUT_WEBHOOK

Put Webhook

ASSIGN_USER_OF_SPECIFIC_TEAM

Assign to user of a specific team

ASSIGN_USER_OF_SPEC_USER_ROLE

Assign to user of a specific user role

FF_BY_USER_OF_SPEC_USER_ROLE

Fulfilled by a user of a specific user role

FULFILLED_BY_SPECIFIC_USER

Fulfilled by a specific user

PROV_ORDER_TO_SIMPHONY_POS

Provision (create) order to Simphony POS

PROV_ORDER_TO_ALOHA_POS

Provision (create) order to Aloha POS

VOID_ORDER_TO_ALOHA_POS

Provision (void) order to Aloha POS

POST_PURCHASE

Create a purchase event

CANCEL_PURCHASE

Cancel a purchase event

SEND_PASSES_DETAILS

Webhooks

SCHEDULE_ACTIVITY

Schedule an activity

PROV_ORDER_TO_TWINSOFT_POS

Provision (create) order to Twinsoft POS

PRINT_RECEIPT

Provision (print receipt) order to an external POS based on IP and port

POST_ACHIEVEMENT

Create an achievement event

parameters
Array

Details about the adaptor’s actions parameters

Object
id
string GUID

The parameter identifier

Example:
4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55
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
CUSTOMER_EVENT_CLASSIFICATION
WITHIN_ORGANISATIONS
from_value
string

The parameter from value

Example:
123
to_value
string

The parameter to value

Example:
1234
type
string

The parameter type

Enumeration:
DATE
INTEGER
NUMBER
STRING
group
string

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

Example:
1
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
attributes
Array

Details about applicable filter 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_CLASSIFICATION
REWARD_OFFER_GOAL
REWARD_OFFER_TYPE
REWARD_OFFER_SPEND_METHOD("
REWARD_OFFER_AWARD_AMOUNT("
REWARD_OFFER_AWARD_PERCENTAGE
CONTACT_CUSTOM_FIELD
ENTITY_CUSTOM_FIELD
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

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

string
Example:
lorem ipsum
custom_field_key
string

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

Example:
contact_avg
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/automations/37160c87-3c37-9a00-0716-4933fe6b76f4 HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "37160c87-3c37-9a00-0716-4933fe6b76f4",
    "name": "communicate contact",
    "description": "On customer award an outbound email communication will be triggered",
    "state": "INACTIVE",
    "entity": "PASSES",
    "event": "APPROVE_ALL_REQUESTS",
    "actions": [
        {
            "order": 1,
            "adaptor": {
                "adaptor": "CUSTOMER_EVENTS",
                "action": "ASSIGN_USER_OF_SPECIFIC_TEAM",
                "parameters": [
                    {
                        "id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
                        "key": "FULFILL_ORDER_POSTAL_CODE",
                        "from_value": "123",
                        "to_value": "1234",
                        "type": "DATE",
                        "group": "1"
                    }
                ]
            }
        }
    ]
}
Bulk Data Operations

Bulk Data Operations is a usefull utility tool that enables the ability to import and export a sizeable volumes of data, such as contacts and products, into and out of CRM.COM.

Import Data
GET /imports/preview
POST /imports
GET /imports
PUT /imports/{id}/actions
Import Preview
GET /imports/preview

Preview the content of a file that will be imported

Notes

IMPORT DATA FLOW

Importing Data should be made based on the following API order

  1. Upload File Signature
  2. Optionally, preview the content of the uploaded file via Import Preview
  3. Submit a request to import the content of the uploaded file, including a couple behavorial options via Import Data

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
file_id
string GUID required

The file (identiifer) that will be previewed

Example:
f56f9cd8-9cb2-bbe6-d4d9-ae14bb1f0399
preview_rows
integer nullable

Defines the number of rows that will be previewed (header row is excluded)

Default:
10
Example:
5
exclude_header
boolean required

Defines whether the header row values will be excluded from import or not

Example:
false
data_mapping
Array required

Defines the mapping between the imported file attribures and system attributes

Object
import_key
string required

The imported file attribute that will be mapped to the system’s one

Example:
contact first name
attribute_key
string required

The system attribute that will be mapped to the imported file’s one

Example:
first_name
is_custom
boolean required

Defines whether the system attribute key is a custom one or not

Example:
false

Responses

200 OK

The request has succeeded

Body
Object
content
Array

Details about the file preview per row

Object
header
string

The header attribute of the specific row

Example:
Organisation Name
values
Array

The previewed values of the specific row

Example:
[
    "CRM", "CRMI"
]
string
Example:
CRM
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/imports/preview HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "file_id": "f56f9cd8-9cb2-bbe6-d4d9-ae14bb1f0399",
    "preview_rows": 5,
    "exclude_header": "false",
    "data_mapping": [
        {
            "import_key": "contact first name",
            "attribute_key": "first_name",
            "is_custom": "false"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "header": "Organisation Name",
            "values": [
                "CRM"
            ]
        }
    ]
}
Import Data
POST /imports

Submit a request for importing data along with processing options

Notes

IMPORT DATA FLOW

Importing Data should be made based on the following API order

  1. Upload File Signature
  2. Optionally, preview the content of the uploaded file via Import Preview
  3. Submit a request to import the content of the uploaded file, including a couple behavorial options via Import Data

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
file_id
string GUID required

The file (identifier) that will be used for importing data

Example:
1e347d4d-ab96-6957-fdb6-35e72b3d9185
type
string required

The type of the entity that data will be imported

Enumeration:
CONTACTS
DEVICES
PRODUCTS
exclude_header
boolean nullable

Defines whether the header row values will be excluded from import or not

Default:
true
Example:
true
update_data
boolean nullable

Defines whether existing records will be updated or not

Default:
false
Example:
false
auto_generate_config
boolean nullable

Defines whether missing attributes will be created automatically

Default:
false
Example:
true
data_mapping
Array required

Defines the mapping between the imported file attribures and system attributes

Object
import_key
string required

The imported file attribute that will be mapped to the system’s one

Example:
contact first name
attribute_key
string required

The system attribute that will be mapped to the imported file’s one

Example:
first_name
is_custom
boolean required

Defines whether the system attribute key is a custom one or not

Example:
false

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The import definition identifier

Example:
1e347d4d-ab96-6957-fdb6-35e72b3d9185
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/imports HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "file_id": "1e347d4d-ab96-6957-fdb6-35e72b3d9185",
    "type": "DEVICES",
    "exclude_header": true,
    "update_data": "false",
    "auto_generate_config": true,
    "data_mapping": [
        {
            "import_key": "contact first name",
            "attribute_key": "first_name",
            "is_custom": "false"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "1e347d4d-ab96-6957-fdb6-35e72b3d9185"
}
List Imports
GET /imports

Retrieve a list of import data definitions based on search criteria (e.g. all completed imports)

Request parameters

state
string optional

Filter imports based on state

Enumeration:
PENDING

Import is queued to be processed

IN_PROGRESS

Import is currently processing

COMPLETED

Import is completed

FAILED

Import is failed

type
string optional

Filter imports based on imported record type

Enumeration:
CONTACTS
DEVICES
PRODUCTS
imported_on
string optional

Filter based on the imported date, which may fall within a given date range. The value can be a string with a date in epoch format. Each option must also include an operator. Use up to two options based on the required search (e.g. imported_on[gte]=1618395497&imported_on[lt]=1618395497).

Enumeration:
imported_on[gt]

Returns results where the imported date is greater than this value

imported_on[gte]

Returns results where the imported date is greater than or equal to this value

imported_on[lt]

Returns results where the imported date is less than this value

imported_on[lte]

Returns results where the imported date is less then or equal to this value

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The import definition identifier

Example:
507c17d2-3976-d1e5-ccf5-cf3c1334acc7
state
string

The export definition status

Enumeration:
PENDING

Import is queued to be processed

IN_PROGRESS

Import is currently processing

COMPLETED

Import is completed

FAILED

Import is failed

type
string

The type of the entity that data will be imported

Enumeration:
CONTACTS
DEVICES
PRODUCTS
imported_on
integer epoch

The date that such import was made

Example:
1623677135
options
Object

Details how the import file content will be processed

exclude_header
boolean

Defines whether the header row values will be excluded from import or not

Example:
true
update_data
boolean

Defines whether existing records will be updated or not

Example:
true
auto_generate_config
boolean

Defines whether missing attributes will be created automatically

Example:
false
file
Object

Details about the uploaded file that was used for import

id
string GUID

The file identifier

Example:
507c17d2-3976-d1e5-ccf5-cf3c1334acc7
name
string

The file name

Example:
contacts.csv
error_file
Object

Details about the file that contain all failed imported data

id
string GUID

The file identifier

Example:
507c17d2-3976-d1e5-ccf5-cf3c1334acc7
name
string

The file name

Example:
contacts_errors.csv
processed_results
Object

Details about the processed data

new
integer

The records that were created successfully

Example:
19
updated
integer

The records that were updated successfully

Example:
4
unchanged
integer

The records that were not changed

Example:
4
errors
integer

The records that were failed to be processed

Example:
1
total
integer

The total number of records that were imported

Example:
28
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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/imports HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "507c17d2-3976-d1e5-ccf5-cf3c1334acc7",
            "status": "FAILED",
            "type": "DEVICES",
            "imported_on": 1623677135,
            "options": {
                "exclude_header": true,
                "update_data": true,
                "auto_generate_config": "false"
            },
            "file": {
                "id": "507c17d2-3976-d1e5-ccf5-cf3c1334acc7",
                "name": "contacts.csv"
            },
            "error_file": {
                "id": "507c17d2-3976-d1e5-ccf5-cf3c1334acc7",
                "name": "contacts_errors.csv"
            },
            "processed_results": {
                "new": 19,
                "updated": 4,
                "unchanged": 4,
                "errors": 1,
                "total": 28
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Import Actions
PUT /imports/{id}/actions

Perform actions on existing import definition (e.g. re-submit a failed import)

Path variables

id
string GUID required

The import definition (identifier) on which an action will be performed

Example:
0e2e1e37-b118-7bbc-db46-6cd954e01a89

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 required

The type of action that will be performed

Enumeration:
REPLAY

Re-submit an import with FAILED state

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The import definition identifier

Example:
0e2e1e37-b118-7bbc-db46-6cd954e01a89
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/imports/0e2e1e37-b118-7bbc-db46-6cd954e01a89/actions HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "action": "REPLAY"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "0e2e1e37-b118-7bbc-db46-6cd954e01a89"
}
Business Network

Business Network is a group of participating entities, collaborating to accomplish a business operation and provide a service to the end customer. The Business Network is configured as a hierarchical structure with varying levels of ownership, privileges and permissions depending on the level of hierarchy.

POST /organisations/register
POST /organisations
PUT /organisations/{id}
DELETE /organisations/{id}
GET /organisations/{id}/network
GET /organisations/{id}
GET /organisations/{id}/activity_feed
POST /organisations/{id}/switch
POST /organisations/{id}/masquerade
POST /organisations/{id}/actions
GET /organisations/{id}/statement
GET /organisations/{id}/statement_details
POST /organisations/{id}/export_statement
Register Organisation
POST /organisations/register

Creates a business semantic parent as the primary business.

Request headers

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 organisation name

Example:
Delicious Food Group
type
string required

The organisation type

Enumeration:
BUSINESS
MERCHANT
organisation_id
string GUID nullable

The parent organisation (identifier) that the newly registered organisation belongs to (applicable only when type is merchant)

Example:
4bd55b60-2c2a-d588-7a94-0890ced7e0ba
owner
Object required

Information about the owner (admin user) of the organisation

first_name
string required

The user’s first name

Example:
John
last_name
string required

The user’s last name

Example:
Doe
email_address
string nullable

The user’s email address

Example:
john@crm.com
phone
Object nullable
country_code
string required

The phone country code (based on ISO 3 char code)

Example:
CYP
number
string required

The phone number

Example:
99123456
identity
Object nullable

The user’s identity

type
string required

The provider of the identity

Enumeration:
EMAIL
PHONE
challenge
string required

The identity challenge

Example:
jd@crm.com
value
string nullable

The identity value (e.g. password) - applicable only for EMAIL based identities

Example:
Crm.comPassword1234
currency_code
string nullable

The organisation’s base currency (applicable only for business)

Default:
EUR
Example:
EUR
timezone
string nullable

The organisation timezone (applicable only for business)

Example:
EUROPE/ATHENS
custom_fields
Array nullable
Object
key
string

The custom field’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
ae5cf529-83e5-8b6b-06f0-54dee9d38b20
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/organisations/register HTTP/1.1 

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

{
    "name": "Delicious Food Group",
    "type": "MERCHANT",
    "organisation_id": "4bd55b60-2c2a-d588-7a94-0890ced7e0ba",
    "owner": {
        "first_name": "John",
        "last_name": "Doe",
        "email_address": "john@crm.com",
        "identity": {
            "type": "PHONE",
            "challenge": "jd@crm.com",
            "value": "Crm.comPassword1234"
        }
    },
    "currency_code": "EUR",
    "timezone": "EUROPE/ATHENS",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "ae5cf529-83e5-8b6b-06f0-54dee9d38b20"
}
Expand Business Network
POST /organisations

Create a new organisation, expanding the current business network

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
name
string required

The organisation name

Example:
Delicious Food Group
type
string

The type of the organisation

Enumeration:
TRANSACTION_PROCESSOR
SERVICE_OWNER
BUSINESS
MERCHANT
VENUE
description
string nullable

The organisation description

Example:
Lorem Ipsum
country_agreement
string nullable

The organisation’s country of agreement code (applicable only for service owner/business)

Example:
CYP
groups
Array nullable

The group that such organisation will belong to (only Merchant/Service Provider and Venue/Service Point can be grouped)

Unique items: YES
string GUID
Example:
7d699221-b38a-6484-f739-b7670c1973c6
contact_info
Array nullable

The organisation’s contact (email/phone) details

Unique items: YES
Object

Information about the owner (admin user) of the organisation

name
string nullable

The name of the contact information

Example:
Main Office
type
string

The type of the organisation’s contact detail

Enumeration:
EMAIL
PHONE
value
string required

The contact information value

Example:
johndoe@deliciousfood.com
country_code
string nullable

The country code of the related contact detail of type phone

Example:
CYP
addresses
Array nullable

The organisation address(es)

Unique items: YES
Object

Information about the organisation’s location

name
string nullable

The name of the location

Example:
Head Office
address_line_1
string required

The address of the location

Example:
Elia Papakyriakou 21
address_line_2
string nullable

Additional address information about the location

Example:
7 Tower Stars
state_province_county
string nullable

The state/province/county of the location

Example:
Egkomi
town_city
string required

The town/city of the location

Example:
Nicosia
postal_code
string required

The postal code of the location

Example:
2415
country_code
string required

The country code of the location

Example:
CY
care_of
string nullable

The care of information of the location

Example:
c/o Company
lat
number nullable

The latitude of the location

Example:
35.157115
lon
number nullable

The longitude of the location

Example:
33.313719
google_place_id
string nullable

The Google textual identifier that uniquely identifies a location

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
organisation_id
string GUID required

The parent organisation (identifier) that this organisation belongs to

Example:
e7251be4-89f2-8cea-7a4a-65b679cf6131
cloud_name
string required nullable

The name that the organisation will have on the cloud (applicable for Service Owner organisations; special characters not allowed)

Example:
crmdotcom
contact_registry
boolean nullable

Defines whether organisation will support contact registry or not (applicable for Service Owner and Business)

Example:
true
service_organisations
Array nullable

The organisations (service owners) that the organisation (transaction processor) serves (applicable only for Transaction Processors)

Unique items: YES
string GUID
Example:
7c56cc02-48cf-9832-e412-a4ae022cd547
inherit_from_parent
boolean nullable

Defines whether the new organisation will have the same industry, industry sectors and business activities as its parent organisation (applicable only for Venues)

Example:
false
industry_id
string GUID nullable

The organisation industry

Example:
b7fae8bd-018a-796f-e509-34c39e478a3f
industry_sectors
Array nullable

The organisation industry sectors

Unique items: YES
string GUID
Example:
d22cf1fb-5b47-1da9-7be7-c6a70a4f0ed3
business_activities
Array nullable

The organisation business activities

Unique items: YES
string GUID
Example:
331d2da8-4a41-2b58-f58d-936296c13aaf
wifi_platform
Object nullable

Details about provisioning an organisation over to WiFi

integration_id
string GUID required

The integration identifier that organisation will be provisioned for WiFi

Example:
88165da9-58a9-74cd-3da5-593b901fc0ec
site_id
string required

The site identifier that will be used to identify the organisation over to WiFi platform

Example:
88quh2m6
custom_fields
Array nullable
Object
key
string

The custom field’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345
owner
Object nullable

Information about the owner (admin user) of the organisation

first_name
string required

The user’s first name

Example:
John
last_name
string required

The user’s last name

Example:
Doe
email_address
string nullable

The user’s email address

Example:
john@crm.com
phone
Object nullable
country_code
string required

The phone country code (based on ISO 3 char code)

Example:
CYP
number
string required

The phone number

Example:
99123456
identity
Object nullable

The user’s identity

type
string required

The provider of the identity

Enumeration:
EMAIL
PHONE
challenge
string required

The identity challenge

Example:
jd@crm.com
value
string nullable

The identity value (e.g. password) - applicable only for EMAIL based identities

Example:
Crm.comPassword1234

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
bd92a0b2-1a8d-026b-e01e-41212b105f0f
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/organisations HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Delicious Food Group",
    "type": "SERVICE_OWNER",
    "description": "Lorem Ipsum",
    "country_agreement": "CYP",
    "groups": [
        "7d699221-b38a-6484-f739-b7670c1973c6"
    ],
    "contact_info": [
        {
            "name": "Main Office",
            "type": "EMAIL",
            "value": "johndoe@deliciousfood.com",
            "country_code": "CYP"
        }
    ],
    "addresses": [
        {
            "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",
            "care_of": "c/o Company",
            "lat": 35.157115,
            "lon": 33.313719,
            "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
        }
    ],
    "organisation_id": "e7251be4-89f2-8cea-7a4a-65b679cf6131",
    "cloud_name": "crmdotcom",
    "contact_registry": "true",
    "service_organisations": [
        "7c56cc02-48cf-9832-e412-a4ae022cd547"
    ],
    "inherit_from_parent": "false",
    "industry_id": "b7fae8bd-018a-796f-e509-34c39e478a3f",
    "industry_sectors": [
        "d22cf1fb-5b47-1da9-7be7-c6a70a4f0ed3"
    ],
    "business_activities": [
        "331d2da8-4a41-2b58-f58d-936296c13aaf"
    ],
    "wifi_platform": {
        "integration_id": "88165da9-58a9-74cd-3da5-593b901fc0ec",
        "site_id": "88quh2m6"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "bd92a0b2-1a8d-026b-e01e-41212b105f0f"
}
Update Organisation
PUT /organisations/{id}

Update a single organisation

Path variables

id
string GUID required

The organisation (identifier) that will be updated

Example:
ccaf4dcc-c38c-1f46-3763-0edc376af054

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
name
string nullable

The organisation name

Example:
Delicious Food Group
description
string nullable

The organisation description

Example:
Lorem Ipsum
contact_info
Array nullable

The organisation’s contact (email/phone) details

Unique items: YES
Object

Information about the owner (admin user) of the organisation

id
string GUID required

The organisation’s contact information identifier

Example:
33ced220-37a8-b3c7-3ddd-eb7de8ac8d6c
name
string nullable

The organisation’s contact information name

Example:
Main Office
type
string required

The type of the organisation’s contact detail

Enumeration:
EMAIL
PHONE
value
string required

The organisation’s contact information value

Example:
johndoe@deliciousfood.com
country_code
string required nullable

The organisation’s contact information country code (applicable for phones)

Example:
CYP
industry_id
string GUID nullable

The organisation industry

Example:
5bc522c2-f335-7d53-b41b-5bf2bc227c05
industry_sectors
Array nullable

The organisation industry sectors

Unique items: YES
string GUID
Example:
7e61297c-5196-269a-a55c-14a18590af05
business_activities
Array nullable

The organisation business activities

Unique items: YES
string GUID
Example:
17df1e50-4bc0-abed-90df-92178fe2ae32
groups
Array nullable

The organisation groups (applicable only for Merchant/Service Provider and Venue/Service Point)

Unique items: YES
string GUID
Example:
6b9177e5-aa89-c552-4c54-a74606f33cf3
inherit_from_parent
boolean nullable

Defines whether the new organisation will have the same industry, industry sectors, business activities and reward tags as its parent organisation (applicable only for Venue/Service Point)

Example:
false
organisation_profile
Object nullable

The organisation profile infromation (applicable only for Business)

registration_number
string nullable

The organisation’s registration number

Example:
1234
tax_reference_number
string nullable

The organisation’s TAX reference number

Example:
TAX1234
vat_reference_number
string nullable

The organisation’s VAT reference number

Example:
VAT1234
registration_country
string nullable

The company’s registrationc country code

Example:
CYP
cloud_name
string nullable

The name (special characters not allowed) that the organisation will have on the cloud (applicable for Service Owner)

Example:
crmdotcom
service_organisations
Array GUID nullable

The organisations (service owners) that the organisation (transaction processor) serves (applicable only for Transaction Processors)

Unique items: YES
Example:
1daf80b1-134b-36eb-7146-76dec04e6c5d
string GUID
Example:
1daf80b1-134b-36eb-7146-76dec04e6c5d
contact_registry
boolean nullable

Defines whether organisation supports contact registry or not (applicable for Service Owner and Business)

Example:
true
addresses
Object nullable

Information about the organisation’s location

id
string GUID nullable

The location identifier that will be updated

Example:
a6cc4f88-cab1-4ab2-98d3-4655789277e2
name
string nullable

The name of the location

Example:
Head Office
address_line_1
string required

The address of the location

Example:
Elia Papakyriakou 21
address_line_2
string nullable

Additional address information about the location

Example:
7 Tower Stars
state_province_county
string nullable

The state/province/county of the location

Example:
Egkomi
town_city
string required

The town/city of the location

Example:
Nicosia
postal_code
string required

The postal code of the location

Example:
2415
country_code
string required

The country code of the location

Example:
CY
care_of
string nullable

The care of information of the location

lat
number nullable

The latitude of the location

Example:
35.157115
lon
number nullable

The longitude of the location

Example:
33.313719
google_place_id
string nullable

The Google textual identifier that uniquely identifies a location

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
custom_fields
Array nullable
Object
key
string

The custom field’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345
partners
Array nullable

Defines the partners (their logos will appear on the backend) assigned on this organisation by the service owner. (applicable only for Business)

Object
id
string GUID required

The partner identifier

Example:
43f394c0-ece1-43a5-ab7d-b54ce9065fe7
subscription
Object nullable

The organisation subscription details

organisation_id
string GUID required

The (business) organisation (identifier) that the organisation will be charged from

Example:
30e57aa3-e139-f289-218f-cb22731563aa
service_id
string GUID required

The default service (identifier) that the organisation subscribed to

Example:
6b55e802-d88c-335a-1505-29eecbae7e21

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
ccaf4dcc-c38c-1f46-3763-0edc376af054
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v1/organisations/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Content-Type: application/json

{
    "name": "Delicious Food Group",
    "description": "Lorem Ipsum",
    "contact_info": [
        {
            "id": "CK1234567890123456789012345678",
            "type": "PHONE",
            "value": "info@crm.com",
            "name": "Head Office"
        }
    ],
    "industry_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "industry_sectors": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "business_activities": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "groups": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "inherit_from_parent": "false",
    "organisation_profile": {
        "registration_number": "1234",
        "tax_reference_number": "TAX1234",
        "vat_reference_number": "VAT1234",
        "registration_country": "CYP"
    },
    "cloud_name": "crmdotcom",
    "organisation_tags": [
        "Accounting"
    ],
    "service_organisations": [
        "1daf80b1-134b-36eb-7146-76dec04e6c5d"
    ],
    "contact_registry": "true",
    "locations": {
        "id": "a6cc4f88-cab1-4ab2-98d3-4655789277e2",
        "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",
        "care_of": "",
        "lat": 35.157115,
        "lon": 33.313719,
        "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "partners": [
        {
            "id": "43f394c0-ece1-43a5-ab7d-b54ce9065fe7"
        }
    ]
}
Delete Organisation
DELETE /organisations/{id}

Delete an organisation

Path variables

id
string GUID required

The organisation (identifier) that will be deleted

Example:
bf2fd7b1-5454-a38e-23ad-88498dc4fb25

Notes

ORGANISATION DELETION

Only Business organisations can be deleted and as a result of such action the entire network (e.g. merchants and venues) of such business is deleted as well

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

204 No Content

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

425 Too Early

The server is unwilling to process a request because it may be replayed

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
DELETE https://sandbox.crm.com/backoffice/v2/organisations/bf2fd7b1-5454-a38e-23ad-88498dc4fb25 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Organisations in Network
GET /organisations/{id}/network

Retrieve a list of organisations based on search criteria (e.g. all merchants under business)

Path variables

id
string GUID required

Parent organisation (identifier) whose child organisations will be retrieved

Example:
d332dd8a-254e-47c9-ba1f-3f369877a9b3

Request parameters

name
string optional

Filter based on the organisation’s name (behaves as like)

Example:
Fantastic Dining
type
string optional

Filter based on the organisation’s relationship

Enumeration:
TRANSACTION_PROCESSOR
SERVICE_OWNER
BUSINESS
MERCHANT
VENUE
search_value
string optional

Defines the free text search parameter based on the provided type (e.g. name)

search_type
string optional

Defines the entitiy type that the search will be applied

Enumeration:
ORGANISATION
BUSINESS
MERCHANT
VENUE
BUSINESS_ACTIVITY
ORGANISATION_GROUP
INDUSTRY
INUDSTRY_SECTOR
COUNTRY
AREA
groups
array of string GUID optional

Filter based on the organisation group(s)

Collection format: csv
Unique items: YES
industries
array of string GUID optional

Filter based on the organisation industry(ies)

Collection format: csv
industry_sectors
array of string GUID optional

Filter based on the organisation industry sector(s)

Collection format: csv
business_activities
array of string GUID optional

Filter based on the organisation business activity(ies)

Collection format: csv
tags
array of string optional

Filter based on (organisation) tags

Collection format: csv
areas
array of string optional

Filter based on the organisation (address) area(s)

Collection format: csv
countries
array of string optional

Filter based on the organisation (address) country(ies)

Collection format: csv
towns_cities
array of string optional

Filter based on the organisation (address) town(s)/city(ies)

Collection format: csv
include_child_count
boolean optional

Defines whether child organisations total number should be returned

Example:
true
include_creatives
boolean optional

Defines whether organisations creatives should be returned

Example:
true
include_groups
boolean optional

Defines whether the organisation group should be returned as part of the response

Example:
true
include_operation_details
boolean optional

Defines whether the operation details of such organisations should be retrieved or not

Example:
true
include_custom_fields
boolean optional

Defines whether custom fields should be retrieved or not (via List/Get APIs)

Default:
false
Example:
true
custom_fields
string optional

Filters based on custom fields (key/value set should be semicolon separated)

Example:
key;value
state
string optional

Filter based on organisation state

Enumeration:
ACTIVE
INACTIVE
SUSPEND
tap_code
string optional

Filter based on TAP code

Example:
01-23-45-67-89-AB
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The organisation identifier

Example:
8265f357-9399-2536-8bb1-4a8343d7d554
name
string

The organisatio name

Example:
CRM.COM Cyprus
description
string

The organisation description

Example:
Lorem Ipsum
child_organisations
Array

Information about the child organisations

Unique items: YES
Object
type
string

The type of the organisation

Enumeration:
TRANSACTION_PROCESSOR
SERVICE_OWNER
BUSINESS
MERCHANT
VENUE
count
integer

The total number of child organisations

Example:
21
groups
Array

The organisation groups

Unique items: YES
Object
id
string GUID

The organisation group identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation group name

Example:
Seasonal
addresses
Array

The organisation addresses

Unique items: YES
Object

Information about the organisation’s location

id
string GUID

The location identifier

Example:
LOC123456234567345674567895678IK
name
string

The name of the location

Example:
Head Office
address_line_1
string

The address of the location

Example:
Elia Papakyriakou 21
address_line_2
string

Additional address information about the location

Example:
7 Tower Stars
state_province_county
string

The state/province/county of the location

Example:
Egkomi
town_city
string

The town/city of the location

Example:
Nicosia
postal_code
string

The postal code of the location

Example:
2415
country_code
string

The country code of the location

Example:
CY
care_of
string

The care of information of the location

Example:
c/o Company
lat
number

The latitude of the location

Example:
35.157115
lon
number

The longitude of the location

Example:
33.313719
google_place_id
string

The Google textual identifier that uniquely identifies a location

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
creatives
Array
Object
id
string GUID

The creative identifier

Example:
3caf8388-b9c6-6679-1e9b-94a6fda92a41
usage_type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
APPLE_LOCKSCREEN_ICON
APPLE_LOGO_IMAGE
APPLE_STRIP_IMAGE
GOOGLE_LOGO_IMAGE
GOOGLE_STRIP_IMAGE
LANDING_PAGE_LOGO_IMAGE
LANDING_PAGE_HEADER_IMAGE
LANDING_PAGE_BACKGROUND_IMAGE
HERO
LOGO
BACKGROUND
AVATAR
PARTNER_LOGO

Partner logos configurable by SO, applicable for Business, Merchant, Venue

DELIVERY_IMAGE

Applicable only for Applications

PICKUP_IMAGE

Applicable only for Applications

DIRECT_SALE_IMAGE

Applicable only for Applications

WALLET_IMAGE

Applicable only for Applications

LANDING_PAGE_IMAGE

Applicable only for Applications

APP_LOGO

Applicable only for Applications

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

Information about the organisation’s industry

id
string GUID

The industry identifier

Example:
59106518-092e-8a08-7769-29f40dced0d1
name
string

The industry name

Example:
Restaurant
industry_sectors
Array

The organisation industry sectors

Unique items: YES
Object

Information about the industry sectors

id
string GUID

The industry sector identifier

Example:
9a857635-5ef3-aa4c-bd2c-90434070cb5a
name
string

The industry sector name

Example:
Bar
business_activities
Array

The organisation business activities

Unique items: YES
Object

Information about the business activity

id
string GUID

The business activity identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The business activity name

Example:
Bar & Grill
operation_details
Object

The organisation operation details

opening_hours
Array

Details about the organisation’s working hours

Object
day_of_week
string

The day of the week that the organisation is open

Example:
MONDAY
open
string

The time that the organisation opens

Example:
09:00
close
string

The time that the organisation closes

Example:
20:00
operation
string

The opening hours for each organisation’s operation type

Enumeration:
DELIVERY
PICK_UP
ANY
short_term_operations
Array

Details about the organisation’s availability to offer its services

Object
operation
string

The organisation’s operation type

Enumeration:
DELIVERY
PICK_UP
is_closed
boolean

Defines whether the organisation is temporary closed for offering its services

Example:
false
contact_registry
boolean

Defines whether organisation supports contact registry

Example:
true
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
state
string

The status of the organisation

Enumeration:
ACTIVE
INACTIVE
SUSPEND
created_date
integer

The date that such organisation was created

Example:
1663841080
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 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/organisations/d332dd8a-254e-47c9-ba1f-3f369877a9b3/network HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "8265f357-9399-2536-8bb1-4a8343d7d554",
            "name": "CRM.COM Cyprus",
            "description": "Lorem Ipsum",
            "child_organisations": [
                {
                    "type": "BUSINESS",
                    "count": 21
                }
            ],
            "groups": [
                {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "name": "Seasonal"
                }
            ],
            "addresses": [
                {
                    "id": "LOC123456234567345674567895678IK",
                    "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",
                    "care_of": "c/o Company",
                    "lat": 35.157115,
                    "lon": 33.313719,
                    "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
                }
            ],
            "creatives": [
                {
                    "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                    "usage_type": "LANDING_PAGE_IMAGE",
                    "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"
                        }
                    ]
                }
            ],
            "industry": {
                "id": "59106518-092e-8a08-7769-29f40dced0d1",
                "name": "Restaurant"
            },
            "industry_sectors": [
                {
                    "id": "9a857635-5ef3-aa4c-bd2c-90434070cb5a",
                    "name": "Bar"
                }
            ],
            "business_activities": [
                {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "name": "Bar & Grill"
                }
            ],
            "operation_details": {
                "opening_hours": [
                    {
                        "day_of_week": "MONDAY",
                        "opens": "09:00",
                        "closes": "20:00",
                        "operation": "DELIVERY"
                    }
                ],
                "short_term_operations": [
                    {
                        "operation": "DELIVERY",
                        "is_closed": "false"
                    }
                ]
            },
            "contact_registry": "true",
            "custom_fields": [
                {
                    "key": "back_office",
                    "value": "0001-12345"
                }
            ],
            "state": "INACTIVE",
            "created_date": 1663841080
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Organisation
GET /organisations/{id}

Retrieve detailed information for an organisation

Path variables

id
string GUID required

The organisation (identifier) that will be retrieved

Example:
9866964d-6892-6700-5f39-09492c9e714e

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

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
9866964d-6892-6700-5f39-09492c9e714e
name
string

The organisation name

Example:
Delicious Bite
description
string

The organisation description

Example:
Lorem Ipsum
type
string

The type of the organisation

Enumeration:
TRANSACTION_PROCESSOR
SERVICE_OWNER
BUSINESS
MERCHANT
VENUE
groups
Array

The organisation groups

Unique items: YES
Object
id
string GUID

The organisation group identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation group name

Example:
Seasonal
contact_info
Array

The organisation contact (email/phone) details

Unique items: YES
Object

Information about the owner (admin user) of the organisation

id
string GUId

The contact detail identifier

Example:
CON123456234567345674567895678IK
name
string

The name of the contact information

Example:
Main Office
type
string

The type of the contact information

Enumeration:
EMAIL
PHONE
value
string

The value of the specific contact information

Example:
johndoe@deliciousfood.com
country_code
string

The country code related to the contact detail of type phone

Example:
CYP
addresses
Array

The organisation addresses

Unique items: YES
Object

Information about the organisation’s location

id
string GUID

The location identifier

Example:
LOC123456234567345674567895678IK
name
string

The name of the location

Example:
Head Office
address_line_1
string

The address of the location

Example:
Elia Papakyriakou 21
address_line_2
string

Additional address information about the location

Example:
7 Tower Stars
state_province_county
string

The state/province/county of the location

Example:
Egkomi
town_city
string

The town/city of the location

Example:
Nicosia
postal_code
string

The postal code of the location

Example:
2415
country_code
string

The country code of the location

Example:
CY
care_of
string

The care of information of the location

Example:
c/o Company
lat
number

The latitude of the location

Example:
35.157115
lon
number

The longitude of the location

Example:
33.313719
google_place_id
string

The Google textual identifier that uniquely identifies a location

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
industry
Object

Information about the organisation’s industry

id
string GUID

The industry identifier

Example:
59106518-092e-8a08-7769-29f40dced0d1
name
string

The industry name

Example:
Restaurant
industry_sectors
Array

The organisation industry sectors

Unique items: YES
Object

Information about the industry sectors

id
string GUID

The industry sector identifier

Example:
9a857635-5ef3-aa4c-bd2c-90434070cb5a
name
string

The industry sector name

Example:
Bar
business_activities
Array

The organisation business activities

Unique items: YES
Object

Information about the business activity

id
string GUID

The business activity identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The business activity name

Example:
Bar & Grill
inherit_from_parent
boolean

Defines whether the organisation has the same industry, industry sectors and business activities as its parent organisation

Example:
false
organisation_id
string GUID

The parent organisation identifier that this organisation belongs to

Example:
7e8e39de-2f80-d2fe-b1f9-25b0cf4b2fbf
cloud_name
string

The name that the organisation will have on the cloud (applicable for Service Owner organisations; special characters not allowed)

Example:
crmdotcom
service_organisations
Array

The organisations (service owners) that the organisation (transaction processor) serves

Object

Details about the organisation from where such event was posted

id
string GUID

The organisation identifier

Example:
4248fab3-67d5-2eb1-eaf6-079ce18cd2ed
name
string

The organisation name

Example:
Bravo Coffee
creatives
Array
Object
id
string GUID

The creative identifier

Example:
3caf8388-b9c6-6679-1e9b-94a6fda92a41
usage_type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
APPLE_LOCKSCREEN_ICON
APPLE_LOGO_IMAGE
APPLE_STRIP_IMAGE
GOOGLE_LOGO_IMAGE
GOOGLE_STRIP_IMAGE
LANDING_PAGE_LOGO_IMAGE
LANDING_PAGE_HEADER_IMAGE
LANDING_PAGE_BACKGROUND_IMAGE
HERO
LOGO
BACKGROUND
AVATAR
PARTNER_LOGO

Partner logos configurable by SO, applicable for Business, Merchant, Venue

DELIVERY_IMAGE

Applicable only for Applications

PICKUP_IMAGE

Applicable only for Applications

DIRECT_SALE_IMAGE

Applicable only for Applications

WALLET_IMAGE

Applicable only for Applications

LANDING_PAGE_IMAGE

Applicable only for Applications

APP_LOGO

Applicable only for Applications

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
contact_registry
boolean

Defines whether the organisation supports contact registry

Example:
true
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
state
string

The status of the organisation

Enumeration:
ACTIVE
INACTIVE
SUSPEND
partners
Array

Defines the partners that are assigned to this organisation and their logos will be shown on the back-end SPA. Applicable only for organisations of type Business, where Service Owners will be responsible for assigning such information

Object
id
string GUID

The partner identifier

Example:
f4942b1d-efe2-258e-ebc2-6be805ce8b7c
name
string

The partner name

Example:
Best Partner
created_date
integer epoch

The date that such entity was created

subscription
Object

The organisation subscription details

organisation
Object

The billing (businesS) organisation

id
string GUID

The organisation identifier

Example:
8f2b27a5-b7c4-5b73-564c-4c5b4530ba96
name
string

The organisation name

Example:
CRM
service
Object

The default service assigned to the organisation

id
string GUID

The product identifier

Example:
26684853-42d4-44d2-601a-48a6e6990ef8
name
string

The product name

Example:
Enterprise
sku
string

The product SKU

Example:
ES00323
organisation_profile
Object

The organisation profile infromation (applicable only for Business)

registration_number
string

The organisation’s registration number

Example:
1234
tax_reference_number
string

The organisation’s TAX reference number

Example:
TAX1234
vat_reference_number
string

The organisation’s VAT reference number

Example:
VAT1234
registration_country
string

The company’s registrationc country code

Example:
CYP
mrr
Object

The organisation’s MRR metrics

total
number

The organisation’s total MRR

Example:
1.76
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/organisations/9866964d-6892-6700-5f39-09492c9e714e HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9866964d-6892-6700-5f39-09492c9e714e",
    "name": "Delicious Bite",
    "description": "Lorem Ipsum",
    "type": "BUSINESS",
    "groups": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Seasonal"
        }
    ],
    "contact_info": [
        {
            "id": "CON123456234567345674567895678IK",
            "name": "Main Office",
            "type": "PHONE",
            "value": "johndoe@deliciousfood.com",
            "country_code": "CYP"
        }
    ],
    "addresses": [
        {
            "id": "LOC123456234567345674567895678IK",
            "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",
            "care_of": "c/o Company",
            "lat": 35.157115,
            "lon": 33.313719,
            "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
        }
    ],
    "industry": {
        "id": "59106518-092e-8a08-7769-29f40dced0d1",
        "name": "Restaurant"
    },
    "industry_sectors": [
        {
            "id": "9a857635-5ef3-aa4c-bd2c-90434070cb5a",
            "name": "Bar"
        }
    ],
    "business_activities": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Bar & Grill"
        }
    ],
    "inherit_from_parent": "false",
    "organisation_id": "7e8e39de-2f80-d2fe-b1f9-25b0cf4b2fbf",
    "cloud_name": "crmdotcom",
    "service_organisations": [
        {
            "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
            "name": "Bravo Coffee"
        }
    ],
    "creatives": [
        {
            "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
            "usage_type": "HERO",
            "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"
                }
            ]
        }
    ],
    "contact_registry": "true",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "state": "INACTIVE",
    "partners": [
        {
            "id": "f4942b1d-efe2-258e-ebc2-6be805ce8b7c",
            "name": "Best Partner"
        }
    ],
    "created_date": 1,
    "subscription": {
        "organisation": {
            "id": "8f2b27a5-b7c4-5b73-564c-4c5b4530ba96",
            "name": "CRM"
        },
        "service": {
            "id": "26684853-42d4-44d2-601a-48a6e6990ef8",
            "name": "Enterprise",
            "sku": "ES00323"
        }
    },
    "organisation_profile": {
        "registration_number": "1234",
        "tax_reference_number": "TAX1234",
        "vat_reference_number": "VAT1234",
        "registration_country": "CYP"
    }
}
Get Organisation Activity Feed
GET /organisations/{id}/activity_feed

Get the activity feed of a single organisation

Path variables

id
string GUID required

The organisation (identifier) whose activity will be retrieved

Example:
33c11c8a-60a9-159a-c25c-ada7a9e2edbd

Request parameters

type
string optional

Filter based on activity type

Enumeration:
INVOICE
PAYMENT
CREDIT_NOTE
REFUND
TOP_UP
performed_on
string optional

Filter based on the performed date, which may fall within a given date range. The value can be a string with a date in epoch format. Each option must also include an operator. Use up to two options based on the required search (e.g. performed_on[gte]=1618395497&performed_on[lt]=1618395497).

Enumeration:
performed_on[gt]

Returns results where the performed date is greater than this value

performed_on[gte]

Returns results where the performed date is greater than or equal to this value

performed_on[lt]

Returns results where the performed date is less than this value

performed_on[lte]

Returns results where the performed date is less then or equal to this value

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The activity (feed) identifier

Example:
cb6ad302-e27c-5a1a-3092-396b2fd40682
type
string

The entity’s type name

Example:
INVOICE
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 state

Example:
POSTED
created_date
integer epoch

The entity’s created date

Example:
1576486645
due_date
integer epoch

The entity’s due date in case of Invoices

Example:
1576486645
direction
string

The activity (feed) direction

Example:
OUTGOING
notes
string

The activity (feed) notes

Example:
This Invoice is created for November 2019
total_amount
integer

The entity’s total amount

Example:
200
currency_code
string

The currency (code) of such amount

Example:
EUR
top_up
Object

The associated topup

id
string GUID

The top up identifier

Example:
018482c9-3af3-2076-5285-c51092ff30b9
number
string

The top up number

Example:
AC00123 John Johnson
type
string

The top up entity type

Example:
ACCOUNT
order
Object

The associated order

queue
Object

The order queue

id
string GUID

The order queue identifier

Example:
359652c2-8152-ea3e-0c52-a13adfff1566
name
string

The order queue name

Example:
Up-Front Orders
stage
Object

The order stage

id
string GUID

The order stage identifier

Example:
ad4c71f9-9964-f445-3104-e5f0a3526c4a
name
string

The order stage name

Example:
In Progress
subject
string

The entity’s subject

Example:
Invoice Sent
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 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/organisations/33c11c8a-60a9-159a-c25c-ada7a9e2edbd/activity_feed HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "cb6ad302-e27c-5a1a-3092-396b2fd40682",
            "type": "INVOICE",
            "number": "I10003",
            "reference_number": "Ref12345678",
            "code": "123456789ABE2364",
            "state": "POSTED",
            "created_date": 1576486645,
            "due_date": 1576486645,
            "direction": "OUTGOING",
            "notes": "This Invoice is created for November 2019",
            "total_amount": 200,
            "currency_code": "EUR",
            "top_up": {
                "id": "018482c9-3af3-2076-5285-c51092ff30b9",
                "number": "AC00123 John Johnson",
                "type": "ACCOUNT"
            },
            "order": {
                "queue": {
                    "id": "359652c2-8152-ea3e-0c52-a13adfff1566",
                    "name": "Up-Front Orders"
                },
                "stage": {
                    "id": "ad4c71f9-9964-f445-3104-e5f0a3526c4a",
                    "name": "In Progress"
                }
            },
            "subject": "Invoice Sent"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Switch Organisations
POST /organisations/{id}/switch

Switch the user to another organisation

Path variables

id
string GUID required

The organisation (identifier) that will be switched to

Example:
9f70eae6-8465-8add-8702-6871a36a85de

Notes

As part of “changing organisations that a user belongs to” flow, the user will have a different role as assigned when such user was invited to the organisation that switched to

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

The request has succeeded

Body
Object

Authentication information provided for an admin user

access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhY2U5ZDRkMi0wYjhkLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJ0eXBlIjoiYWNjZXNzIiwicHJpbWFyeU9yZ2FuaXNhdGlvbiI6IjhkY2MzNjgwLTBiOGEtMTFlYS05NTE4LTQyMDEwYTlhMDAwMyIsImN1cnJlbnRPcmdhbmlzYXRpb24iOiI4ZGNjMzY4MC0wYjhhLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJzY29wZSI6WyJjdXN0b21lci13cml0ZSIsIm9yZGVyLXJlYWQiXSwicHJlZmVycmVkX3VzZXJuYW1lIjoiamQiLCJlbWFpbCI6ImpkQGNybS5jb20iLCJleHAiOjE1Nzk4ODA2Mjl9.-uJyEW-Y_QgHb1q-WHBBMew3J_TnUfvqy-NDFmIzFhbS3gkerE5QAqp4cgNMr5BiGcyt174UVhYGXp2Fg7BKcw
refresh_token
string

The token that can be used to generate a new access token (when previous is expired)

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhY2U5ZDRkMi0wYjhkLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJ0eXBlIjoicmVmcmVzaCIsInByaW1hcnlPcmdhbmlzYXRpb24iOiI4ZGNjMzY4MC0wYjhhLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJjdXJyZW50T3JnYW5pc2F0aW9uIjoiOGRjYzM2ODAtMGI4YS0xMWVhLTk1MTgtNDIwMTBhOWEwMDAzIiwic2NvcGUiOlsiY3VzdG9tZXItd3JpdGUiLCJvcmRlci1yZWFkIl0sInByZWZlcnJlZF91c2VybmFtZSI6ImpkIiwiZW1haWwiOiJqZEBjcm0uY29tIiwiZXhwIjoxNTc5ODgwNjI5fQ.cW_g6ozy2OaP5Tx3l2QuzNeRBSXnNrP1AN6QoOqf6s95eVoUrld6bHRUdBt3H74CZyrxhp7Rs_uXtv17GhVz5w
expiration_date
integer epoch

The token expiration date

Example:
1579880629
user
Object

The authenticated user details

Example:
{
    "first_name": "John",
    "last_name": "Doe",
    "email": "johndoe@crm.com"
}
first_name
string

The first name

Example:
John
last_name
string

The last name

Example:
Doe
email
string

The email address

Example:
johndoe@crm.com
mode
string

The organisation mode

Enumeration:
TRIAL

Organisation was not live enabled

TEST

Organisation is in test mode (therefore User is signed in test mode)

LIVE

Organisation supports live mode (therefore User is signed in live mode)

organisations
Array

The organisations that the user is a member at

Object
id
string GUID

The organisation identifier

Example:
b907f6f0-5f3c-9b67-bcf1-9ee13d747294
type
string

The type of the organisation

Enumeration:
CLOUD_OPERATOR
SERVICE_OWNER
TRANSACTION_PROCESSOR
BUSINESS
MERCHANT
name
string

The organisation name

Example:
CRM.COM
status
string

The organisation status

Enumeration:
ACTIVE
INACTIVE
SUSPEND
progress
Object

The organisation progress status

invite_user
boolean

Defines whether a user (other than the owner) is invited

Example:
true
create_contact
boolean

Defines whether a contact is created (applicable only for business)

Example:
false
create_scheme
boolean

Defines whether a reward scheme is created (applicable only for business)

Example:
true
create_offer
boolean

Defines whether a reward offer is created

Example:
false
create_merchant
boolean

Defines whether a merchant is created (applicable only for business)

Example:
false
create_venue
boolean

Defines whether a venue is created

Example:
false
password_expired
boolean

Defines whether password has been expired or not

Example:
true
lockout_date
integer epoch

Defines the date on which the user’s lockout will be expired

Example:
1615897181
two_factor_required
boolean

Defines whether two factor authentication is required or not (true only for authentication API, false to all others)

Example:
true
two_factor_methods
Object

The two-factor method that is used and all user’s (configured) two-factor methods

send_method
Object

The method that is used for the two-factor authentication

method
string

Defines the type of the user 2FA method

Enumeration:
TOTP
value
string

The two-factor method obfuscated value (applicable only for email and phone based two-factor methods)

Example:
jo****@crm.com
options
Array

The user’s (configured) two-factor methods

Object

The user’s (configured) two-factor methods

method
string

Defines the type of the user 2FA method

Enumeration:
TOTP
value
string

The two-factor method obfuscated value (applicable only for email and phone based two-factor methods)

Example:
jo****@crm.com
password_notification
integer

Defines the number of days that are left until password is expired

Example:
12
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/organisations/9f70eae6-8465-8add-8702-6871a36a85de/switch HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhY2U5ZDRkMi0wYjhkLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJ0eXBlIjoiYWNjZXNzIiwicHJpbWFyeU9yZ2FuaXNhdGlvbiI6IjhkY2MzNjgwLTBiOGEtMTFlYS05NTE4LTQyMDEwYTlhMDAwMyIsImN1cnJlbnRPcmdhbmlzYXRpb24iOiI4ZGNjMzY4MC0wYjhhLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJzY29wZSI6WyJjdXN0b21lci13cml0ZSIsIm9yZGVyLXJlYWQiXSwicHJlZmVycmVkX3VzZXJuYW1lIjoiamQiLCJlbWFpbCI6ImpkQGNybS5jb20iLCJleHAiOjE1Nzk4ODA2Mjl9.-uJyEW-Y_QgHb1q-WHBBMew3J_TnUfvqy-NDFmIzFhbS3gkerE5QAqp4cgNMr5BiGcyt174UVhYGXp2Fg7BKcw",
    "refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhY2U5ZDRkMi0wYjhkLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJ0eXBlIjoicmVmcmVzaCIsInByaW1hcnlPcmdhbmlzYXRpb24iOiI4ZGNjMzY4MC0wYjhhLTExZWEtOTUxOC00MjAxMGE5YTAwMDMiLCJjdXJyZW50T3JnYW5pc2F0aW9uIjoiOGRjYzM2ODAtMGI4YS0xMWVhLTk1MTgtNDIwMTBhOWEwMDAzIiwic2NvcGUiOlsiY3VzdG9tZXItd3JpdGUiLCJvcmRlci1yZWFkIl0sInByZWZlcnJlZF91c2VybmFtZSI6ImpkIiwiZW1haWwiOiJqZEBjcm0uY29tIiwiZXhwIjoxNTc5ODgwNjI5fQ.cW_g6ozy2OaP5Tx3l2QuzNeRBSXnNrP1AN6QoOqf6s95eVoUrld6bHRUdBt3H74CZyrxhp7Rs_uXtv17GhVz5w",
    "expiration_date": 1579880629,
    "user": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@crm.com"
    },
    "mode": "TRIAL",
    "organisations": [
        {
            "id": "b907f6f0-5f3c-9b67-bcf1-9ee13d747294",
            "type": "TRANSACTION_PROCESSOR",
            "name": "CRM.COM"
        }
    ],
    "progress": {
        "invite_user": "true",
        "create_contact": "false",
        "create_scheme": "true",
        "create_offer": "false",
        "create_merchant": "false",
        "create_venue": "false"
    },
    "password_expired": true,
    "lockout_date": 1615897181,
    "two_factor_required": true,
    "two_factor_methods": {
        "send_method": {
            "method": "TOTP",
            "value": "jo****@crm.com"
        },
        "options": [
            {
                "method": "EMAIL",
                "value": "jo****@crm.com"
            }
        ]
    }
}
Masquerade Organisations
POST /organisations/{id}/masquerade

Switch the user to another organisation

Path variables

id
string GUID required

The organisation (identifier) that will be masqueraded to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Notes

MASQUERADED USER PEMISSIONS

As part of “masquerade” flow, the masqueraded user will have the same role as the one from the initial organisation that such user signed in.

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

The request has succeeded

Body
Object

Authentication information provided for an admin user

user
Object

The authenticated user details

first_name
string

The first name

Example:
John
last_name
string

The last name

Example:
Doe
two_factor_methods
Object

The two-factor method that is used and all user’s (configured) two-factor methods

send_method
Object

The method that is used for the two-factor authentication

method
string

Defines the type of the user 2FA method

Enumeration:
TOTP
value
string

The two-factor method obfuscated value (applicable only for email and phone based two-factor methods)

Example:
jo****@crm.com
options
Array

The user’s (configured) two-factor methods

Object

The user’s (configured) two-factor methods

method
string

Defines the type of the user 2FA method

Enumeration:
TOTP
value
string

The two-factor method obfuscated value (applicable only for email and phone based two-factor methods)

Example:
jo****@crm.com
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/organisations/CAD1E31269B76D7A65ACCE45B2E68DFD/masquerade HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "user": {
        "first_name": "John",
        "last_name": "Doe"
    },
    "two_factor_methods": {
        "send_method": {
            "method": "EMAIL",
            "value": "jo****@crm.com"
        },
        "options": [
            {
                "method": "PHONE",
                "value": "jo****@crm.com"
            }
        ]
    }
}
Organisation Actions
POST /organisations/{id}/actions

Perform an action on an existing organisation

Path variables

id
string GUID required

The organisation (identifier) that an action will be applied on it

Example:
2513ff06-b55c-724f-048f-fb6bb16f5fb2

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
action
string required

The action that will be applied on the organisation

Enumeration:
MODE

Switch between test/live mode (if not already live, first time switch will set such organisation as live)

COPY

Copy a business and its business network (applicable only for Business)

ACTIVE

Set the organisation state to active

INACTIVE

Set the organisation state to inactive

SUSPEND

Set the organisation state to suspend

name
string nullable

The organisation name that will be set on the copied (new) organisation (applicable only on COPY action)

Example:
CRM

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
4872e81e-4866-2eb2-bbd3-8a5a8c276290
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/organisations/2513ff06-b55c-724f-048f-fb6bb16f5fb2/actions HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "action": "COPY",
    "name": "CRM"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4872e81e-4866-2eb2-bbd3-8a5a8c276290"
}
Get Organisation Statement
GET /organisations/{id}/statement

Retrieves all financial events of a Merchant or Service Provider based on an account and the selected period for the signed-in organisation. Used in conjunction with Get Account Statement Details to produce the Merchant or Service Provider complete statement.

Path variables

id
string GUID required

The organisation identifier to retrieve account balances for

Example:
76D7A65ACCE45B2E68DFDCAD1E31269B

Request parameters

account_id
string optional

Merchant or Service Provider’s account id to retrieve balance information for. If not specified, then use the primary account

Example:
da60dd8f-b124-439d-a7fe-e1bdbd484c71
currency_code
string optional

Specify the account currency for which the statement will be produced. Default is the primary account’s currency

Example:
EUR
from_month
integer optional

Starting statement period month

Example:
3
to_month
integer optional

Ending statement period month

Example:
3
from_year
integer optional

Starting statement period year

Example:
2022
to_year
integer optional

Ending statement period year

Example:
2022

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

Account unique identifier

Example:
c8079ee1-8081-4be1-ab09-5091f55b2d4e
number
string

Account number

Example:
A3900853
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
period
Object

Statement period

month
Object

Statement period months

from
integer

Starting month

Example:
3
to
integer

Ending month

Example:
3
year
Object

Statement period year

from
integer

Starting year

Example:
2022
to
integer

Ending year

Example:
2022
opening_balance
number

Opening balance for account

Example:
100.56
closing_balance
number

Closing balance for account

Example:
157.8
total_credits
number

Total credited amount for the selected period

Example:
84.05
total_debits
number

Total debited amount for the selected period

Example:
26.81
ageing_analysis
Object

The Account’s Ageing Analysis. The ageing balance is based on the selected Account but it

balance
number

The total aged balance of the account

Example:
99.99
buckets
Object

Aged balanc eof th eaccount, separated in 5 buckets, each one having a 30 days duration.

121
number

Aged balance over 121 days

Example:
96.03
1_30
number

Balance aged by up to 30 days

Example:
0.99
31_60
number

Aged balanc eby 31 to 60 days

Example:
0.99
61_90
number

Aged balanc eby 61 to 90 days

Example:
0.99
91_120
number

Aged balanc eby 91 to 120 days

Example:
0.99
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/organisations/76D7A65ACCE45B2E68DFDCAD1E31269B/statement HTTP/1.1 
Get Organisation Statement Details
GET /organisations/{id}/statement_details

Retrieves all the statement detail lines for a single Merchant or Service Provider, for the given period, used in conjunction with Get Accounts Statement API to create a Merchant or Service Provider statement

Path variables

id
string GUID required

The organisation identifier for which to retrieve account journals for

Example:
76D7A65ACCE45B2E68DFDCAD1E31269B

Request parameters

account_id
string optional

Merchant or Service Provider’s account id to retrieve balance information for

Example:
da60dd8f-b124-439d-a7fe-e1bdbd484c71
currency_code
string optional

Specify the 3-char account currency for which the statement will be produced

Example:
EUR
from_month
integer optional

Starting statement period month

Example:
3
to_month
integer optional

Ending statement period month

Example:
3
from_year
integer optional

Starting statement period year

Example:
2022
to_year
integer optional

Ending statement period year

Example:
2022

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

Statement detail lines

Object
id
string

Account unique idetifier

Example:
d2ea1d75-0805-4d8c-b212-f31064ee3bff
date
string epoch

Transaction date

Example:
2343342445
type
string

Type of financial transaction

Enumeration:
CREDIT
DEBIT
Example:
CREDIT
amount
number

Transaction amount

Example:
3.59
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
activity
Object

Financial activity information

type
string
Enumeration:
SETTLEMENT_PROCESS
PAYMENT
INVOICE
CREDIT_NOTE
REFUND
TOP_UP
TRANSFER
PASS_REDEMPTON
AD_HOC_RETURN
SPEND
AWARD
PURCHASE_CANCELLATION
WALLET_FEE
USE_WALLET_FUNDS
ACHIEVEMENT_CANCELLATION
MANUAL_JOURNAL
number
string

The reference number of the transaction if available (e.g. reference number of a payment or a transfer)

Example:
90508992
id
string GUID

The activity entity unique id number (e.g. id of an invoice)

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244
details
string

Transaction details

Example:
Sally's Flower Shop
running_balance
number

Running balance of account right after the financial event was performed.

Example:
14.99
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/organisations/76D7A65ACCE45B2E68DFDCAD1E31269B/statement_details HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "d2ea1d75-0805-4d8c-b212-f31064ee3bff",
            "date": "2343342445",
            "type": "CREDIT",
            "amount": 3.59,
            "currency_code": "EUR",
            "activity": {
                "type": "PASS_REDEMPTON",
                "number": "90508992",
                "id": "61c943c8-dfeb-4c09-a25c-b054f48bf244"
            },
            "details": "Sally's Flower Shop",
            "running_balance": 14.99
        }
    ]
}
Export Organisation Statement
POST /organisations/{id}/export_statement

Use this API to export the Merchant or Service Provider statement in PDF or CSV format to the user’s email, or send to the contact’s email address

Path variables

id
string required

The organisation’s id to export statement for

Example:
da60dd8f-b124-439d-a7fe-e1bdbd484c71

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
account_id
string

The identifier of the account for which the export will be performed

Example:
da60dd8f-b124-439d-a7fe-e1bdbd484c71
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
from_month
integer

Statement period starting month

Example:
3
from_year
integer

Statement period starting year

Example:
2022
to_month
integer

Statement period ending month

Example:
3
to_year
integer

Statement period ending year

Example:
2022
format
string

How the statement will be sent

Enumeration:
PDF

Sent to user’s email

CSV

Sent to user’s email

EMAIL

Sent to the Contact’s email address

PRINT
Example:
PDF

Responses

400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

204 No Content

The request has succeeded

Example 1
POST https://sandbox.crm.com/backoffice/v2/contacts/da60dd8f-b124-439d-a7fe-e1bdbd484c71/export_statement HTTP/1.1 

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

{
    "account_id": "da60dd8f-b124-439d-a7fe-e1bdbd484c71",
    "currency_code": "EUR",
    "from_month": 3,
    "from_year": 2022,
    "to_month": 3,
    "to_year": 2022,
    "format": "PDF"
}
Billing Relationship
GET /organisations/{id}/billing
Get Billing Relationship
GET /organisations/{id}/billing

Retrieves a relationship between an organisation as the billing business and a contact

Path variables

id
string GUID required

The organisation (identifier) that billing relationship will be retrieved

Example:
db560dec-4097-655e-25b3-d0fe95698bd0

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

The request has succeeded

Body
Object
organisation
Object

The organisation that performs the billing

id
string GUID

The organisation identifier

Example:
db560dec-4097-655e-25b3-d0fe95698bd0
name
string

The organisation name

Example:
CRM billing
api_key
string

The billing organisation’s public API key

Example:
5bd2fd1d-3f49-3f51-fddc-76bb419880c7
contact
Object

The billing contact (contact information and authentication details) that will be billed due to its billing relation to the billing organisation

access_token
string

The jwt token associated to the contact of the billing organisation that can be used for subsequent API requests

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
refresh_token
string

The refresh token that can be used to issue a new access token, after the previous one is expired

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
expiration_date
integer epoch

The access token expiration date

Example:
11664276644
contact
Object

The billing contact details

id
string GUID

The contact identifier

Example:
4f87056c-9fba-2902-779f-f47e4c833a4f
name
string

The contact (full) name

Example:
CRM.COM Media Group Ltd
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/organisations/db560dec-4097-655e-25b3-d0fe95698bd0/billing HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "organisation": {
        "id": "db560dec-4097-655e-25b3-d0fe95698bd0",
        "name": "CRM billing",
        "api_key": "5bd2fd1d-3f49-3f51-fddc-76bb419880c7"
    },
    "contact": {
        "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
        "refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
        "expiration_date": 11664276644,
        "contact": {
            "id": "4f87056c-9fba-2902-779f-f47e4c833a4f",
            "name": "CRM.COM Media Group Ltd"
        }
    }
}
Financial Operations

Set of operations that allow setting up and managing an Organisation’s Account. Businesses, Merchants/Service Providers can have an Account as Contacts do. Merchants/Service Providers can place Orders and the Business is delivering the rdered items to them.

POST /organisations/{id}/accounts
GET /organisations/{id}/accounts
PUT /organisations/{id}/accounts/{account_id}/actions
Create Organisation Account
POST /organisations/{id}/accounts

Create an account for a specific organisation. An account can only be created for a Business or a Merchant/Service Provider. Once created, the account will be set in Active state. Only one account per supported currency can be created per organisation.

Path variables

id
string GUID required

The organisation (identifier) that an account will be created

Example:
c6e6bcc8-ef76-45a9-a7c1-b45efaa6fdb4

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 account name (if not specified, defaults to account name rules)

Example:
Good Burgers Main Account
currency_code
string required
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
classification_id
string GUID nullable

The account classification (identifier)

Example:
bacffd55-e3d8-ded4-30dc-99375312302e
billing_address_id
string GUID nullable

The billing address (identifier)

Example:
bf91070e-1f23-a8ec-31b5-be1e62638180
is_primary
boolean nullable

Defines whether the account is the primary one (if it’s the first one, defaults to primary)

Example:
true

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The organisation account identifier

Example:
c6e6bcc8-ef76-45a9-a7c1-b45efaa6fdb4
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/organisations/c6e6bcc8-ef76-45a9-a7c1-b45efaa6fdb4/accounts HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Good Burgers Main Account",
    "currency_code": "EUR",
    "classification_id": "bacffd55-e3d8-ded4-30dc-99375312302e",
    "billing_address_id": "bf91070e-1f23-a8ec-31b5-be1e62638180"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "c6e6bcc8-ef76-45a9-a7c1-b45efaa6fdb4"
}
List Organisation Accounts
GET /organisations/{id}/accounts

Get a list of accounts for a specific organisation. Normally an organisation will have a single account, but multiple accounts can be used to service different currencies. All accounts of the organisation are retrieved by default, regardless of their state

Path variables

id
string GUID required

The organisation (identifier) which accounts wil be retrieved

Example:
c6e6bcc8-ef76-45a9-a7c1-b45efaa6fdb4

Request parameters

is_primary
boolean optional

Retrieve only the primary account of the organisation

Example:
true
states
array of string optional

Filter account based on state(s)

Collection format: csv
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The account identifier

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

Defines whether the account is the primary one

Example:
true
name
string

The account name

Example:
Default
number
string

The account number

Example:
AC123456
state
string

The account state

Enumeration:
ACTIVE
SUSPENDED
TERMINATED
Example:
ACTIVE
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
classification
Object

The account classification

id
string GUID

The classification identifier

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

The classification name

Example:
VIP
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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/organisations/c6e6bcc8-ef76-45a9-a7c1-b45efaa6fdb4/accounts HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "is_primary": true,
            "name": "Default",
            "number": "AC123456",
            "state": "ACTIVE",
            "currency_code": "EUR",
            "classification": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "VIP"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Organisation Account Actions
PUT /organisations/{id}/accounts/{account_id}/actions

Perform actions on an existing organisation account (e.g. suspend account)

Path variables

id
string GUID required

The organisation (identifier) on which the account will be updated

Example:
1eaa809f-ed91-4b68-b912-5bd6064d3400
account_id
string GUID required

The account (identifier) on which the action is performed

Example:
18e0e170-a19c-4448-a9c6-b5737ad238e8

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
state
string required
Enumeration:
ACTIVE

Contact is able to perform transactions

SUSPENDED

Contact blocked from ordering/purchases but still allowed to make Payments

TERMINATED

Contact can no longer perform any kind of transactions using this account(financial, ordering, rewards etc)

Example:
ACTIVE

Responses

200 200

Successful Request

Body
Object
id
string GUID

The organisation account identifier

Example:
18e0e170-a19c-4448-a9c6-b5737ad238e8
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/organisations/1eaa809f-ed91-4b68-b912-5bd6064d3400/accounts/18e0e170-a19c-4448-a9c6-b5737ad238e8/actions HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "state": "ACTIVE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "18e0e170-a19c-4448-a9c6-b5737ad238e8"
}
Media Group
POST /organisations/{id}/media_groups
Organisation Media Groups
POST /organisations/{id}/media_groups

Link an organisation with one or many media groups

Path variables

id
string GUID required

The organisation (identifier) that media groups will be set

Example:
sdfsfsdf-32-fwef-wef-wefwef23

Notes

MEDIA UPLOAD

Uploading media for an organisation requires the execution of the following APIs

  1. Create new Media Group
  2. Create Organisation Media Groups
  3. Upload Media
  4. Perform Cloudinary Upload (where CRM will send all signature details)
  5. Cloudinary service calls back CRM media group (using an internal callback)

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

Array
Object
media_group_id
string GUID required

The media group identifier

Example:
3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb

Responses

204 No Content

The request has succeeded

400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/organisations/sdfsfsdf-32-fwef-wef-wefwef23/media_groups HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

[
    {
        "media_group_id": "3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb"
    }
]

HTTP/1.1 204 No Content 
Operation Details
PUT /organisations/{id}/operation_details
GET /organisations/{id}/operation_details
Set Operation Details
PUT /organisations/{id}/operation_details

Update an organisation’s operational details (e.g. opening hours)

Path variables

id
string GUID required

The organisation (identifier) of which operation details will be updated

Example:
711f82b5-0728-bee7-5f8b-a2d1fcb1cd7c

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
opening_hours
Array nullable

Details about the organisation’s working hours

Object
day_of_week
string required

The day of the week that the organisation is open

Example:
SUNDAY
open
string required

The time that the organisation opens

Example:
09:00
close
string required

The time that the organisation closes

Example:
20:00
operation
string required

The opening hours for each organisation’s operation type

Enumeration:
DELIVERY
PICK_UP
ANY
short_term_operations
Array nullable

Details about the organisation’s availability to offer its services

Object
operation
string required

The organisation’s operation

Enumeration:
DELIVERY
PICK_UP
ANY
is_closed
boolean nullable

Defines whether the organisation is temporary closed for offering its services

Example:
false

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
711f82b5-0728-bee7-5f8b-a2d1fcb1cd7c
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/organisations/711f82b5-0728-bee7-5f8b-a2d1fcb1cd7c/operation_details HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "opening_hours": [
        {
            "day_of_week": "SUNDAY",
            "open": "09:00",
            "close": "20:00",
            "operation": "PICK_UP"
        }
    ],
    "short_term_operations": [
        {
            "operation": "PICK_UP",
            "is_closed": "false"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "711f82b5-0728-bee7-5f8b-a2d1fcb1cd7c"
}
Get Operation Details
GET /organisations/{id}/operation_details

Retrieve an organisation’s operational details (e.g. opening hours)

Path variables

id
string GUID required

The organisation (identifier) whose operation details will be retrieved

Example:
a6de4887-a701-02d8-dd5f-237689d8b8f7

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

The request has succeeded

Body
Object
opening_hours
Array

Details about the organisation’s working hours

Object
day_of_week
string

The day of the week that the organisation is open

Example:
MONDAY
open
string

The time that the organisation opens

Example:
09:00
close
string

The time that the organisation closes

Example:
20:00
operation
string

The opening hours for each organisation’s operation type

Enumeration:
DELIVERY
PICK_UP
ANY
short_term_operations
Array

Details about the organisation’s availability to offer its services

Object
operation
string

The organisation’s operation type

Enumeration:
DELIVERY
PICK_UP
is_closed
boolean

Defines whether the organisation is temporary closed for offering its services

Example:
false
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/organisations/CAD1E31269B76D7A65ACCE45B2E68DFD/operation_details HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "opening_hours": [
        {
            "day_of_week": "MONDAY",
            "open": "09:00",
            "close": "20:00",
            "operation": "DELIVERY"
        }
    ],
    "short_term_operations": [
        {
            "operation": "DELIVERY",
            "is_closed": "false"
        }
    ]
}
Organisation Locations
POST /organisations/{id}/addresses
PUT /organisations/{id}/addresses/{address_id}
DELETE /organisations/{id}/addresses/{address_id}
GET /organisations/{id}/addresses
Add Organisation Address
POST /organisations/{id}/addresses

Add a new location for an existing Organisation

Path variables

id
string GUID required

The organisation (identifier) whose locations will be updated

Example:
53420b7f-b114-690b-0513-bc15a8904d34

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 name of the address

Example:
Head Office
address_line_1
string required

The address line 1 of the address

Example:
Elia Papakyriakou 21
address_line_2
string nullable

The address line 2 of the address

Example:
7 Tower Stars
state_province_county
string nullable

The state/province/county of the address

Example:
Egkomi
town_city
string required

The town/city of the address

Example:
Nicosia
postal_code
string required

The postal code of the address

Example:
2415
country_code
string required

The country of the address

Example:
CY
care_of
string nullable

The care of information of the address

lat
number nullable

The latitude of the address

Example:
33.313719
lon
number nullable

The longitude of the address

Example:
33.313719
google_place_id
string nullable

The Google textual identifier that uniquely identifies a address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The organisation’s address identifier

Example:
ff8f8be9-db79-cd8f-1bae-4a81c007f856
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v2/organisations/53420b7f-b114-690b-0513-bc15a8904d34/addresses HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "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",
    "care_of": "",
    "lat": 33.313719,
    "lon": 33.313719,
    "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "ff8f8be9-db79-cd8f-1bae-4a81c007f856"
}
Update Organisation Address
PUT /organisations/{id}/addresses/{address_id}

Update an existing address for an organisation

Path variables

id
string GUID required

The organisation (identifier) of which address will be updated

Example:
53a399c8-58ed-77bd-ca8f-265072b028d7
address_id
string GUID required

The organisation’s address (identifier) that will be updated

Example:
a044a3f9-7e3c-4229-6ec5-0fbac9b27fda

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 name of the address

Example:
Head Office
address_line_1
string nullable

The address line 1 of the address

Example:
Elia Papakyriakou 21
address_line_2
string nullable

The address line 2 of the address

Example:
7 Tower Stars
state_province_county
string nullable

The state/province/county of the address

Example:
Egkomi
town_city
string nullable

The town/city of the address

Example:
Nicosia
postal_code
string nullable

The postal code of the address

Example:
2415
country_code
string nullable

The country of the address

Example:
CY
care_of
string nullable

The care of information of the address

lat
number nullable

The latitude of the address

Example:
35.157115
lon
number nullable

The longitude of the address

Example:
33.313719
google_place_id
string nullable

The Google textual identifier that uniquely identifies a address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation’s address identifier

Example:
a044a3f9-7e3c-4229-6ec5-0fbac9b27fda
400 Bad Request

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

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v2/organisations/53a399c8-58ed-77bd-ca8f-265072b028d7/addresses/a044a3f9-7e3c-4229-6ec5-0fbac9b27fda HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "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",
    "care_of": "",
    "lat": 35.157115,
    "lon": 33.313719,
    "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a044a3f9-7e3c-4229-6ec5-0fbac9b27fda"
}
Delete Organisation Address
DELETE /organisations/{id}/addresses/{address_id}

Delete an address from an organisation

Path variables

id
string GUID required

The organisation (identifier) whose address will be removed

Example:
9ef933f3-976f-32f7-6746-12faf9e41964
address_id
string GUID required

The organisation’s address (identifier) that will be deleted

Example:
a6f6506f-a3b7-da53-f34d-33fc749e5a9f

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

204 No Content
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
DELETE https://sandbox.crm.com/backoffice/v2/organisations/9ef933f3-976f-32f7-6746-12faf9e41964/addresses/a6f6506f-a3b7-da53-f34d-33fc749e5a9f HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Organisation Addresses
GET /organisations/{id}/addresses

Retrieves all addresses associated with a single organisation

Path variables

id
string GUID required

The organisation (identifier) which addresses will be retrieved

Example:
83e1563f-cb0c-08cc-535e-10f8e8619e63

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
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

Information about the organisation’s location

id
string GUID

The location identifier

Example:
LOC123456234567345674567895678IK
name
string

The name of the location

Example:
Head Office
address_line_1
string

The address of the location

Example:
Elia Papakyriakou 21
address_line_2
string

Additional address information about the location

Example:
7 Tower Stars
state_province_county
string

The state/province/county of the location

Example:
Egkomi
town_city
string

The town/city of the location

Example:
Nicosia
postal_code
string

The postal code of the location

Example:
2415
country_code
string

The country code of the location

Example:
CY
care_of
string

The care of information of the location

Example:
c/o Company
lat
number

The latitude of the location

Example:
35.157115
lon
number

The longitude of the location

Example:
33.313719
google_place_id
string

The Google textual identifier that uniquely identifies a location

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
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 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v2/organisations/83e1563f-cb0c-08cc-535e-10f8e8619e63/addresses HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "LOC123456234567345674567895678IK",
            "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",
            "care_of": "c/o Company",
            "lat": 35.157115,
            "lon": 33.313719,
            "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Organisation Payment Methods
POST /organisations/{id}/payment_methods
PUT /organisations/{id}/payment_methods/{payment_method_id}
DELETE /organisations/{id}/payment_methods/{payment_method_id}
GET /organisations/{id}/payment_methods
Add Payment Methods
POST /organisations/{id}/payment_methods

Add a new payment method for an organisation

Path variables

id
string GUID required

The organisation (identifier) that a payment method will be created

Example:
4db61210-49b0-0267-6de6-82ca63a35903

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

The name of the payment method

Example:
Primary payment method
type
string required

The payment method’s type

Enumeration:
CARD
ACCOUNT_DEBIT
SETTLEMENT_ACCOUNT
WALLET
Example:
SETTLEMENT_ACCOUNT
is_primary
boolean nullable

Marks the payment method as the organisation’s primary one

Example:
true
is_backup
boolean nullable

Marks the payment method as the backup

Example:
false
notes
string nullable

Notes related to te payment method

Example:
some notes
settlement_account
Object required nullable

The account’s main information. Required and applicable if the payment method type is ACCOUNT

name
string nullable

The account name

Example:
Primary Account
payment_gateway
Object required

Information regarding the account’s payment gateway

gateway
string

The payment gateway related to the payment method

Enumeration:
JCC_MERCHANT
gateway_identifier
string required

The identifier used on payment gateway

Example:
0000257
account_debit
Object nullable

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

account_name
string
account_number
string nullable

The bank account number.

Example:
001002001
iban
string required nullable

The IBAN code.

Example:
0143240434320434
bank
string nullable

The name of the customer’s bank

Example:
Barclays
bank_code
string nullable

Institution number of the customer’s bank.

Example:
0032933-1123
branch
string nullable

The identifier of the bank branch

Example:
Ascot
swift
string nullable

The bank account swift number

Example:
12345678
sort_code
string nullable

The sort code

Example:
20-02-53
mandate
Object
reference
string
sign_date
integer
termination_date
integer
type
string

The mandate (sequence) type

Enumeration:
FIRST
FINAL
RECURRING
ONEOFF
account_type
string

The type of the event

Enumeration:
SAVINGS
CHECKING
BUSINESS_CHECKING
Example:
SAVINGS
integration_id
string

The payment gateway’s integration identifier

account_holder_details
Object
account_holder_name
string
address_line_1
string
address_line_2
string
address_state
string
address_city
string
address_zip
string
address_coutry
string
use_billing_address
boolean
country
string

The country the bank account is located in.

Example:
CY
currency
string
Example:
EUR
card
Object nullable

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

name
string

The card’s name

Example:
Default Card
brand
string

The card’s brand

Example:
VISA
first6
string

The card’s first 6 digits

Example:
424242
last4
string

The card’s lat 4 digits

Example:
4242
expiration_month
integer

The card’s expiration month

Example:
1
expiration_year
integer

The card’s expiration year

Example:
2020
country_of_issue
string

The card’s coutry of issue (3 code based)

Example:
CYP
card_holder_details
Object

Details about the cardholder owner

card_holder_name
string

The name of the card holder

Example:
John 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:
7 Tower Star
address_city
string

The city related to the card

Example:
Nicosia
address_zip
string

The zip code related to the card

Example:
2415
address_state
string

The state related to the card

Example:
Nicosia
address_country
string

The country related to the card

Example:
CYP
gateway_token
Array

Details about the gateway that a card related token was issued

Object
gateway
string nullable

Defines the gateway that issued such token

Enumeration:
JCC
SETTLE
integration_id
string GUID nullable

The gateway integration (identifier)

Example:
bce504a4-f712-5262-183c-f58218a7a0ed
token
string required

The card related token

Example:
Xt5EWLLDS7FJjR1c

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The payment method identifier

Example:
5a56dec4-144c-0d73-f749-9030879280ca
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/backoffice/v1/organisations/4db61210-49b0-0267-6de6-82ca63a35903/payment_methods HTTP/1.1 

Content-Type: application/json

{
    "name": "Primary payment method",
    "type": "SETTLEMENT_ACCOUNT",
    "is_primary": "true",
    "is_backup": "false",
    "notes": "some notes", 
    "settlement_account": {
        "name": "Primary Account",
        "payment_gateway": {
            "gateway": "JCC_MERCHANT",
            "gateway_identifier": "0000257"
        }
    },
    "account_debit": {
        "account_name": "",
        "account_number": "001002001",
        "iban": "0143240434320434",
        "bank": "Barclays",
        "bank_code": "0032933-1123",
        "branch": "Ascot",
        "swift": "12345678",
        "sort_code": "20-02-53",
        "mandate": {
            "reference": "",
            "sign_date": 1
        },
        "account_type": "SAVINGS",
        "integration_id": ""
    },
    "card": {
        "name": "Default Card",
        "brand": "VISA",
        "first6": "424242",
        "last4": "4242",
        "expiration_month": 1,
        "expiration_year": 2020,
        "country_of_issue": "CYP",
        "card_holder_details": {
            "card_holder_name": "John Doe",
            "address_line_1": "Elia Papakyriakou",
            "address_line_2": "7 Tower Star",
            "address_city": "Nicosia",
            "address_zip": "2415",
            "address_state": "Nicosia",
            "address_country": "CYP"
        },
        "gateway_token": [
            {
                "gateway": "SETTLE",
                "integration_id": "bce504a4-f712-5262-183c-f58218a7a0ed",
                "token": "Xt5EWLLDS7FJjR1c"
            }
        ]
    }
}
Update Payment Method
PUT /organisations/{id}/payment_methods/{payment_method_id}

Update an existing payment method for an organisation

Path variables

id
string GUID required

The organisation (identifier) whose paymeny method will be updated

Example:
2b2460d3-9753-148e-2f5b-f30c0562f5a5
payment_method_id
string GUID required

The payment method (identifier) that will be updated

Example:
5a56dec4-144c-0d73-f749-9030879280ca

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
is_primary
boolean nullable

Marks the payment method as the organisation’s primary one

Example:
true
is_backup
boolean nullable

Marks the payment method as the backup

Example:
false
notes
string nullable

The payment method notes

Example:
some notes
settlement_account
Object nullable

The account’s main information. Required and applicable if the payment method type is ACCOUNT

name
string nullable

The account name

Example:
Primary Account
payment_gateway
Object required

Information regarding the account’s payment gateway

gateway
string

The payment gateway related to the payment method

Enumeration:
JCC_MERCHANT
gateway_identifier
string required

The identifier used on payment gateway

Example:
0000257
account_debit
Object nullable

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

account_name
string
account_number
string nullable

The bank account number.

Example:
001002001
iban
string required nullable

The IBAN code.

Example:
0143240434320434
bank
string nullable

The name of the customer’s bank

Example:
Barclays
bank_code
string nullable

Institution number of the customer’s bank.

Example:
0032933-1123
branch
string nullable

The identifier of the bank branch

Example:
Ascot
swift
string nullable

The bank account swift number

Example:
12345678
sort_code
string nullable

The sort code

Example:
20-02-53
mandate
Object
reference
string
sign_date
integer
termination_date
integer
type
string

The mandate (sequence) type

Enumeration:
FIRST
FINAL
RECURRING
ONEOFF
account_type
string

The type of the event

Enumeration:
SAVINGS
CHECKING
BUSINESS_CHECKING
Example:
SAVINGS
integration_id
string

The payment gateway’s integration identifier

account_holder_details
Object
account_holder_name
string
address_line_1
string
address_line_2
string
address_state
string
address_city
string
address_zip
string
address_coutry
string
use_billing_address
boolean
country
string

The country the bank account is located in.

Example:
CY
currency
string
Example:
EUR

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The payment method identifier

Example:
5a56dec4-144c-0d73-f749-9030879280ca
400 Bad Request

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

401 Unauthorized

The client request has not been completed because it lacks valid authentication credentials for the requested resource

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/backoffice/v1/organisations/2b2460d3-9753-148e-2f5b-f30c0562f5a5/payment_methods/5a56dec4-144c-0d73-f749-9030879280ca HTTP/1.1 

Content-Type: application/json

{
    "name": "",
    "is_primary": "true",
    "is_backup": "false",
    "notes": "some notes",
    "settlement_account": {
        "name": "Primary Account",
        "payment_gateway": {
            "gateway": "JCC_MERCHANT",
            "gateway_identifier": "0000257"
        }
    },
    "account_debit": {
        "account_name": "",
        "account_number": "001002001",
        "iban": "0143240434320434",
        "bank": "Barclays",
        "bank_code": "0032933-1123",
        "branch": "Ascot",
        "swift": "12345678",
        "sort_code": "20-02-53",
        "mandate": {
            "reference": "",
            "sign_date": 1
        },
        "account_type": "SAVINGS",
        "integration_id": ""
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "5a56dec4-144c-0d73-f749-9030879280ca"
}
Remove Payment Method
DELETE /organisations/{id}/payment_methods/{payment_method_id}

Remove a payment method from an organisation

Path variables

id
string GUID required

The organisation (identifier) whose payment method will be removed

Example:
1c7eb6f5-b11e-ee69-0bdd-e4d2b3a93c0c
payment_method_id
string GUID required

The payment method (identifier) that will be removed

Example:
5a56dec4-144c-0d73-f749-9030879280ca

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

204 No Content

The request has succeeded

400 Bad Request