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

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://staging.crm.com/backoffice/v1/organisations/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

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

Retrieve a list of payment methods for an organisation

Path variables

id
string GUID required

The organisation (identifier) whose payment methods will be retrieved

Example:
ff27b927-d346-4369-aba3-4478de764816

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
type
string optional

Filter based on payment method type

Enumeration:
CARD
ACCOUNT_DEBIT
SETTLEMENT_ACCOUNT
WALLET
Example:
SETTLEMENT_ACCOUNT
is_primary
boolean optional
is_backup
boolean optional

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

The payment method identifier

Object
id
string GUID

The payment method identifier

Example:
ff27b927-d346-4369-aba3-4478de764816
name
string
payment_method_type
string

The payment method type

Enumeration:
CARD
ACCOUNT_DEBIT
SETTLEMEN_ACCOUNT
WALLET
ELECTRONIC_TRANSFER
is_primary
boolean

Indicates which payment mehod is the organisation’s primary one

Example:
true
is_backup
boolean

Indicates which payment mehod is the organistaion’s backup one

Example:
false
notes
string

Notes related to the payment method

Example:
Payment Method Notes
settlement_account
Array

The account details (applicable if the payment method is set to ACCOUNT)

Object
name
string

The account name

Example:
Primary Account
payment_gateway
Object

Information regarding the account’s payment gateway

gateway
string

The payment gateway related to the payment method

Enumeration:
JCC_MERCHANT
gateway_identifier
string

The identifier used on payment gateway

Example:
1245
account_debit
Object

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

account_name
string
account_number
string

The bank account number.

Example:
001002001
iban
string

The IBAN code.

Example:
0143240434320434
bank
string

The name of the customer’s bank

Example:
Barclays
bank_code
string

Institution number of the customer’s bank.

Example:
0032933-1123
branch
string

The identifier of the bank branch

Example:
Ascot
swift
string

The bank account swift number

Example:
12345678
sort_code
string

The sort code

Example:
20-02-53
country
string

The country the bank account is located in.

Example:
CY
currency
string
Example:
EUR
account_type
string

The type of the event

Enumeration:
SAVINGS
CHECKING
BUSINESS_CHECKING
Example:
SAVINGS
mandate
Object
reference
string
sign_date
integer
termination_date
integer
type
string

The mandate (sequence) type

Enumeration:
FIRST
FINAL
RECURRING
ONEOFF
account_holder_details
Object
account_holder_name
string
address_line_1
string
address_line_2
string
address_city
string
address_state
string
address_zip
string
address_country
string
gateway_token
Array
Object
token
string
gateway
string nullable
Enumeration:
JCC
JCC_MERCHANT
SETTLE
integration
Object nullable
id
string
name
string
card
Object

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
funding_type
string

The type of the event

Enumeration:
CREDIT
DEBIT
PREPAID
Example:
CREDIT
first6
string

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

last4
string

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

expiration_month
integer

The card expiration month

Example:
1
expiration_year
integer

The card expiration year

Example:
2020
country_of_issue
string

The card issue country (3 char country code)

Example:
CYP
cvc
string
card_holder_details
Object

Information about the card holder

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
Object
token
string
gateway
string nullable
Enumeration:
JCC
JCC_MERCHANT
SETTLE
integration
Object nullable
id
string
name
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
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/organisations/ff27b927-d346-4369-aba3-4478de764816/payment_methods HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "ff27b927-d346-4369-aba3-4478de764816",
            "name": "",
            "payment_method_type": "CARD",
            "is_primary": "true",
            "is_backup": "false",
            "notes": "Payment Method Notes",
            "settlement_account": [
                {
                    "name": "Primary Account",
                    "payment_gateway": {
                        "gateway": "JCC_MERCHANT",
                        "gateway_identifier": "1245"
                    }
                }
            ],
            "account_debit": {
                "account_name": "",
                "account_number": "001002001",
                "iban": "0143240434320434",
                "bank": "Barclays",
                "bank_code": "0032933-1123",
                "branch": "Ascot",
                "swift": "12345678",
                "sort_code": "20-02-53",
                "account_type": "SAVINGS",
                "mandate": {
                    "reference": "",
                    "sign_date": 1
                },
                "gateway_token": [
                    {
                        "token": "",
                        "gateway": "JCC",
                        "integration": {
                            "id": "",
                            "name": ""
                        }
                    }
                ]
            },
            "card": {
                "name": "Default Card",
                "brand": "VISA",
                "funding_type": "CREDIT",
                "first6": "",
                "last4": "",
                "expiration_month": 1,
                "expiration_year": 2020,
                "country_of_issue": "CYP",
                "cvc": "",
                "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": [
                    {
                        "token": "",
                        "gateway": "JCC_MERCHANT",
                        "integration": {
                            "id": "",
                            "name": ""
                        }
                    }
                ]
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Organisation Products

Disable Enable Products for an Organisation

GET /organisations/{id}/products
Get Products Availability
GET /organisations/{id}/products

Retrieve all products which are temporarily not available for sale for the specified organisation

Path variables

id
string GUID required

The organisation (identifier) whose product availability will be retrieved

Example:
52ed5363-e747-4f41-b91f-e6c5b5e32376

Request parameters

search_value
string optional

Filter products based on product SKU, name or description

Example:
iced latte
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
product
Object

The product of which availability is set

id
string GUID

The product identifier

Example:
c4301882-573a-f04c-7884-5228e7844981
sku
string

The product SKU

Example:
FE1234
name
string

The product name

Example:
Freddo Espresso
availability
string

Defines whether the product is available or not

Enumeration:
ENABLED
DISABLED
supply_method
Array

The supported supply method for the product

string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
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/52ed5363-e747-4f41-b91f-e6c5b5e32376/products HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "product": {
                "id": "c4301882-573a-f04c-7884-5228e7844981",
                "sku": "FE1234",
                "name": "Freddo Espresso"
            },
            "availability": "ENABLED",
            "supply_method": [
                "DELIVERY"
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Reward Commercial Terms
PUT /organisations/{id}/reward_terms
GET /organisations/{id}/reward_terms
Update Reward Terms
PUT /organisations/{id}/reward_terms

Update the reward commercial terms for a specific organisation

Path variables

id
string GUID required

The organisation (identifier) that will be updated

Example:
7cc1b26a-459f-4b47-a09f-6b121ae947da

Notes

CORE BEHAVIOR

Reward Commercial Terms can be assigned only on Business and Merchant/Service Provider organisations.

Only business users can amend Reward Commercial Terms related to their Business and Merchants/Service Providers.

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 nullable

Defines whether the organisation can contribute to the customers awards/spends

Enumeration:
BLOCKED
NOT_BLOCKED
reward_schemes
Array nullable

Defines the reward schemes that the organisation can contribute to contacts rewards

Unique items: YES
string GUID
Example:
7fdd1338-7064-4fe6-8f4f-0a02324d45c5
settlement
Object nullable

Details about settlement settings

method
string nullable

Defines how the organisation will be settled

Enumeration:
ON_AWARD
ON_SPEND
Default:
ON_AWARD
contributions
Object nullable

Details about (award) contribution settings

default
number nullable

Defines the contribution that the organisation will cover on each award

Default:
100
Example:
72.91
explicit
Array nullable

Details abouht explicit contributions that will overwrite the default one

Object
type
string required

On which type the contribution will be applied

Enumeration:
REWARD_OFFER
id
string GUID required

The entity (identifier) on which the contribution will be applied

Example:
ba0b20d4-f8aa-ab5d-552f-66f813b02f75
contribution
number required

The explicit defined contribution

Example:
1.22
purchase_restrictions
Object nullable

Details about contact self-service purchase settings

max_purchases
integer nullable

The maximum number of purchase events that a contact can submit in a day

Example:
12
max_amount
number nullable

The maximum purchase event amount that a contact can submit

Example:
199.99

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
7cc1b26a-459f-4b47-a09f-6b121ae947da
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/7cc1b26a-459f-4b47-a09f-6b121ae947da/reward_terms HTTP/1.1 

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

{
    "state": "NOT_BLOCKED",
    "reward_schemes": [
        "7fdd1338-7064-4fe6-8f4f-0a02324d45c5"
    ],
    "settlement": {
        "method": "ON_AWARD",
        "contributions": {
            "default": 72.91,
            "explicit": [
                {
                    "type": "REWARD_OFFER",
                    "id": "ba0b20d4-f8aa-ab5d-552f-66f813b02f75",
                    "contribution": 1.22
                }
            ]
        }
    },
    "purchase_restrictions": {
        "max_purchases": 12,
        "max_amount": 199.99
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "7cc1b26a-459f-4b47-a09f-6b121ae947da"
}
Get Reward Terms
GET /organisations/{id}/reward_terms

Retrieve the reward commercial terms of an organisation

Path variables

id
string GUID required

The organisation (identifier) whose reward terms will be retrieved

Example:
7cc1b26a-459f-4b47-a09f-6b121ae947da

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

Details about terms state changes

state
string

Defines whether the organisation can contribute to the customers awards/spends

Enumeration:
BLOCKED
NOT_BLOCKED
date
integer epoch

The date that the state has changed

Example:
1593607273
user
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
reward_schemes
Array

Defines the reward schemes that the organisation can contribute to contacts rewards

Object

The reward scheme that the offer belongs to

id
string GUID

The reward scheme identifier

Example:
622175bf-03b0-4e9e-9df9-adf85080a889
name
string

The reward scheme name

Example:
Coffee Scheme
settlement
Object

Details about settlement settings

method
string

Defines how the organisation will be settled

Enumeration:
ON_AWARD
ON_SPEND
Default:
ON_AWARD
contributions
Object

Details about (award) contribution settings

default
number

Defines the contribution that the organisation will cover on each award

Example:
82.91
explicit
Array

Details abouht explicit contributions that will overwrite the default one

Object
type
string

On which type the contribution will be applied

Enumeration:
REWARD_OFFER
id
string GUID

The entity (identifier) on which the contribution will be applied

Example:
58ffb072-1088-b729-5280-1849fd3969d0
name
string

The entity name that the contribution will be applied

Example:
1% cashback
contribution
number

The explicit defined contribution

Example:
12.11
purchase_restrictions
Object

Details about contact self-service purchase settings

max_purchases
integer

The maximum number of purchase events that a contact can submit in a day

Example:
1
max_amount
number

The maximum purchase event amount that a contact can submit

Example:
9.01
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/7cc1b26a-459f-4b47-a09f-6b121ae947da/reward_terms HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "state_details": {
        "state": "BLOCKED",
        "date": 1593607273,
        "user": {
            "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
            "name": "John Smith"
        }
    },
    "reward_schemes": [
        {
            "id": "622175bf-03b0-4e9e-9df9-adf85080a889",
            "name": "Coffee Scheme"
        }
    ],
    "settlement": {
        "method": "ON_AWARD",
        "contributions": {
            "default": 82.91,
            "explicit": [
                {
                    "type": "REWARD_OFFER",
                    "id": "58ffb072-1088-b729-5280-1849fd3969d0",
                    "name": "1% cashback",
                    "contribution": 12.11
                }
            ]
        }
    },
    "purchase_restrictions": {
        "max_purchases": 1,
        "max_amount": 9.01
    }
}
Tags
PUT /organisations/{id}/tags
GET /organisations/{id}/tags
Update Organisation Tags
PUT /organisations/{id}/tags

Update the tags associated with the organisation

Path variables

id
string GUID required

The organisation (identifier) on which tags will be updated

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 organisation 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/organisations/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 Organisation Tags
GET /organisations/{id}/tags

Retrieve a list of tags that are associated with the organisation

Path variables

id
string GUID required

The organisation (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/organisations/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"
        }
    ]
}
Transaction Acquiring Points
POST /organisations/{id}/taps
PUT /organisations/{org_id}/taps/{tap_id}
DELETE /organisations/{org_id}/taps/{tap_id}
GET /organisations/{org_id}/taps
GET /organisations/{org_id}/taps/{tap_id}
Create Transaction Acquiring Point
POST /organisations/{id}/taps

Create a transaction acquiring point for an existing organisation

Path variables

id
string GUID required

The organisation (identifier) for which a tap will be created

Example:
c564e3ef-91f5-3aff-bfc9-263eb5954893

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

Information about the organisation’s external references

name
string required

The transaction acquiring point name

Example:
POS
code
string nullable

The transaction acquiring point code

Example:
02451
is_active
boolean nullable

Defines whether the transaction acquiring point is active or not

Default:
true
Example:
true
description
string nullable

The transaction acquiring point description

Example:
pos system
external_ip
string nullable

IP address of External Device

Example:
82.102.93.164
external_port
string nullable

Port of the External IP

Example:
9100
type
string required

The transaction acquiring point type

Enumeration:
EXTERNAL_REF
POS
PRINTER_RECEIPT
CARD_TERMINAL
external_type
string nullable

Optional specification of external reference

Enumeration:
JCC
TWINSOFT
ALOHA
WIFI_PLATFORM

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The transaction acquiring point identifier

Example:
c564e3ef-91f5-3aff-bfc9-263eb5954893
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/c564e3ef-91f5-3aff-bfc9-263eb5954893/taps HTTP/1.1 

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

{
    "name": "POS",
    "code": "02451",
    "is_active": "true",
    "description": "pos system",
    "external_ip": "82.102.93.164",
    "external_port": "9100",
    "tap_type": "EXTERNAL_REF",
    "external_type": "ALOHA"
}

HTTP/1.1 201 Created 
Update Transaction Acquiring Point
PUT /organisations/{org_id}/taps/{tap_id}

Update a transaction acquiring point for an existing organisation

Path variables

org_id
string GUID required

The organisation (identifier) of which tap that will be updated

Example:
eff2bcf5-702d-ed03-ca12-f1ba8ac692a2
tap_id
string GUID required

The transaction acquiring point (identifier) that will be updated

Example:
c564e3ef-91f5-3aff-bfc9-263eb5954893

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

The transaction acquiring point code

Example:
123456789
is_active
boolean nullable

Determines whether the transaction acquiring point is active or not

Example:
true
description
string nullable

The transaction acquiring point description

Example:
pos system
external_ip
string nullable

IP address of External Device

Example:
82.102.93.164
external_port
string nullable

Port of the External IP

Example:
9100
type
string nullable

The transaction acquiring point type

Enumeration:
EXTERNAL_REF
POS
PRINTER_RECEIPT
CARD_TERMINAL
external_type
string nullable

Optional specification of external reference

Enumeration:
JCC
TWINSOFT
ALOHA
WIFI_PLATFORM

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The transaction acquiring point identifier

Example:
c564e3ef-91f5-3aff-bfc9-263eb5954893
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/eff2bcf5-702d-ed03-ca12-f1ba8ac692a2/taps/c564e3ef-91f5-3aff-bfc9-263eb5954893 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "code": "123456789",
    "is_active": "true",
    "description": "pos system",
    "external_ip": "82.102.93.164",
    "external_port": "9100",
    "tap_type": "EXTERNAL_REF",
    "external_type": "TWINSOFT"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c564e3ef-91f5-3aff-bfc9-263eb5954893"
}
Delete Transaction Acquiring Point
DELETE /organisations/{org_id}/taps/{tap_id}

Delete a transaction acquiring point for an existing organisation

Path variables

org_id
string GUID required

The organisation (identifier) whose tap will be deleted

Example:
eff2bcf5-702d-ed03-ca12-f1ba8ac692a2
tap_id
string GUID required

The transaction acquiring point (identifier) that will be deleted

Example:
c564e3ef-91f5-3aff-bfc9-263eb5954893

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/eff2bcf5-702d-ed03-ca12-f1ba8ac692a2/taps/c564e3ef-91f5-3aff-bfc9-263eb5954893 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Transaction Acquiring Points
GET /organisations/{org_id}/taps

Retrieve a list of transaction acquiring points for an organisation based on search criteria (e.g. all active transaction acquiring points)

Path variables

org_id
string GUID required

The organisation (identifier) whose taps will be retrieved

Example:
eff2bcf5-702d-ed03-ca12-f1ba8ac692a2

Request parameters

search_value
string optional

The value of the search (case insensitive) across name and code

Example:
1234345356543423234234
name
string optional

Filter based on tap name

Example:
POS
code
string optional

Filter based on tap code

Example:
P01
type
string optional

Filter based on type

Enumeration:
EXTERNAL_REF
POS
PRINTER_RECEIPT
CARD_TERMINAL
external_type
string optional

Filter based on external type

Enumeration:
JCC
TWINSOFT
ALOHA
WIFI_PLATFORM
is_active
boolean optional

Filter based on whether taps are active or not

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 succeeded

Body
Object
content
Array
Object

Information about the organisation’s external references

id
string GUID

The tap identifier

Example:
09b10d6d-1cca-9319-c4c0-09223f45a9a8
name
string

The tap name

Example:
ePOS
code
string

The tap code

Example:
EP12
is_active
boolean

Defines whether the tap is active or not

Example:
true
description
string

The tap description

Example:
electronic POS
type
string

The transaction acquiring point type

Enumeration:
EXTERNAL_REF
POS
PRINTER_RECEIPT
CARD_TERMINAL
external_type
string

Optional specification of external reference

Enumeration:
JCC
TWINSOFT
ALOHA
WIFI_PLATFORM
external_ip
string

The tap external IP address

Example:
82.102.93.164
external_port
string

The tap external port

Example:
9100
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/eff2bcf5-702d-ed03-ca12-f1ba8ac692a2/taps HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "09b10d6d-1cca-9319-c4c0-09223f45a9a8",
            "name": "ePOS",
            "code": "EP12",
            "is_active": "true",
            "description": "electronic POS",
            "type": "POS",
            "external_type": "TWINSOFT",
            "external_ip": "82.102.93.164",
            "external_port": "9100"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Transaction Acquiring Point
GET /organisations/{org_id}/taps/{tap_id}

Retrieve detailed information for a transaction acquiring point (tap)

Path variables

org_id
string GUID required

The organisation (identifier) whose transaction acquiring point will be retrieved

Example:
eff2bcf5-702d-ed03-ca12-f1ba8ac692a2
tap_id
string GUID required

The transaction acquiring point (identifier) that will be retrieved

Example:
c564e3ef-91f5-3aff-bfc9-263eb5954893

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

Information about the organisation’s external references

id
string GUID

The tap identifier

Example:
09b10d6d-1cca-9319-c4c0-09223f45a9a8
name
string

The tap name

Example:
ePOS
code
string

The tap code

Example:
EP12
is_active
boolean

Defines whether the tap is active or not

Example:
true
description
string

The tap description

Example:
electronic POS
type
string

The transaction acquiring point type

Enumeration:
EXTERNAL_REF
POS
PRINTER_RECEIPT
CARD_TERMINAL
external_type
string

Optional specification of external reference

Enumeration:
JCC
TWINSOFT
ALOHA
WIFI_PLATFORM
external_ip
string

The tap external IP address

Example:
82.102.93.164
external_port
string

The tap external port

Example:
9100
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/eff2bcf5-702d-ed03-ca12-f1ba8ac692a2/tapsc564e3ef-91f5-3aff-bfc9-263eb5954893 HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c564e3ef-91f5-3aff-bfc9-263eb5954893",
    "name": "ePOS",
    "code": "EP12",
    "is_active": "true",
    "description": "electronic printer",
    "type": "PRINTER_RECEIPT",
    "external_ip": "82.102.93.164",
    "external_port": "9100"
}
WiFi Network
POST /organisations/{id}/wifi/sites
GET /organisations/{id}/wifi/sites
POST /organisations/{id}/wifi/import
PUT /organisations/{id}/wifi/sites/{s_id}/networks
GET /organisations/{id}/wifi/sites/{s_id}/networks
PUT /organisations/{id}/wifi/sites/{s_id}/guest_control
GET /organisations/{id}/wifi/sites/{s_id}/guest_control
GET /organisations/{id}/wifi/sites/{s_id}/devices
Create WiFi Site
POST /organisations/{id}/wifi/sites

Create a new WiFi site for the organisation. An organisation can have multiple WiFi site and each one represents the available (& supported) WiFi networks

Path variables

id
string GUID required

The organisation (identifier) where a site will be created

Example:
35b9bc9c-466b-de7a-f23b-ed7a227e309f

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

The WiFi platform integration

Example:
c6932bcf-b7e8-4fcc-b168-85ea400fb8ed
site_id
string required

The organisation site identifier as provided from WiFi platform

Example:
88quh2m6

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The organisation network site identifier

Example:
0633ab11-9090-001c-5998-936ae44ff5e0
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/35b9bc9c-466b-de7a-f23b-ed7a227e309f/wifi/sites HTTP/1.1 

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

{
    "integration_id": "c6932bcf-b7e8-4fcc-b168-85ea400fb8ed",
    "site_id": "88quh2m6"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "0633ab11-9090-001c-5998-936ae44ff5e0"
}
List WiFi Sites
GET /organisations/{id}/wifi/sites

Retrieve all WiFi sites for an organisation

Path variables

id
string GUID required

The organisation (identifier) whose sites will be retrieved

Example:
35b9bc9c-466b-de7a-f23b-ed7a227e309f

Request parameters

integration_id
string GUID optional

Filter based on integration

Example:
f649fe38-bd59-246a-2322-60fa4f1a1c3d

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 site identifier

Example:
21f8a49e-b0c3-0334-b708-b2ef9cac8adb
integration
Object

Details about the integration

id
string GUID

The integration identifier

Example:
81ed6bcd-39ec-214c-5124-9e5ac6cb5dc4
name
string

The integration name

Example:
UniFi
site_id
string

The WiFi platform site id

Example:
88quh2m6
guest_control
Object

Details about the guest control settings

redirect_url
string

Defines the redirection URL (landing page) that contacts will access when joining a guest wifi network

Example:
https://crm.com/landing-page
wifi_networks
Array

Details about the wifi networks related to the site

Object
id
string

The network identifier

Example:
619387ec31d36b2cf6f9d8af
name
string

the network name

Example:
CRM-Nicosia
is_enabled
boolean

Defines whether the network is enabled or not

Example:
true
is_guest_enabled
boolean

Defines whether the guest access is enabled or not

Example:
true
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/organisations/35b9bc9c-466b-de7a-f23b-ed7a227e309f/wifi/sites HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "21f8a49e-b0c3-0334-b708-b2ef9cac8adb",
            "integration": {
                "id": "81ed6bcd-39ec-214c-5124-9e5ac6cb5dc4",
                "name": "UniFi"
            },
            "site_id": "88quh2m6"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Import WiFi Data
POST /organisations/{id}/wifi/import

Retrieve WiFi data for a specific organisation from a WiFi platform

Path variables

id
string GUID required

The organisation (identifier) that WiFi data will be imported

Example:
5e4f4825-b378-d856-c393-1cf3fde458dd

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

The external reference of the organisation over to the WiFi platform

Example:
wer232rw
type
string required

Defines which data should be imported

Enumeration:
DEVICES
WIFI_NETWORKS
GUEST_CONTROL

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

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/5e4f4825-b378-d856-c393-1cf3fde458dd/wifi/import HTTP/1.1 

Content-Type: application/json

{
    "site_id": "wer232rw",
    "type": "DEVICES"
}

HTTP/1.1 204 No Content
Update WiFi Networks
PUT /organisations/{id}/wifi/sites/{s_id}/networks

Update a WiFi network for an organisation

Path variables

id
string GUID required

The organisation (identifier) whose networks will be updated

Example:
add25d0e-54fc-c005-ca5e-60f167c35578
s_id
string GUID required

The site (identifier) of which networks will be updated

Example:
02b80141-8b0a-9803-0762-b76e50d34e9e

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

The network (identifier) that will be updated

Example:
fecbacb3-0a03-219a-b86c-6a3b31032410
name
string

The network name that will be updated

Example:
ARRIS012
is_enabled
boolean

Defines whether the network is enabled or not

Example:
true
is_guest_enabled
boolean

Defines whether the network has enabled the guest access or not

Example:
false

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
add25d0e-54fc-c005-ca5e-60f167c35578
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/add25d0e-54fc-c005-ca5e-60f167c35578/wifi/sites/02b80141-8b0a-9803-0762-b76e50d34e9e/networks HTTP/1.1 

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

[
    {
        "network_id": "fecbacb3-0a03-219a-b86c-6a3b31032410",
        "is_enabled": "true",
        "is_guest_enabled": "false"
    }
]

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "add25d0e-54fc-c005-ca5e-60f167c35578"
}
Get WiFi Networks
GET /organisations/{id}/wifi/sites/{s_id}/networks

Retrieve a list of an organisation’s wifi networks based on search criteria (e.g. all enabled wifi networks)

Path variables

id
string GUID required

The organisation (identifier) of which networks will be retrieved

Example:
35b9bc9c-466b-de7a-f23b-ed7a227e309f
s_id
string GUID required

The site (identifier) of which networks will be retrieved

Example:
02b80141-8b0a-9803-0762-b76e50d34e9e

Request parameters

is_enabled
boolean optional

Filters based on whether the network is enabled or not

Example:
true
is_guest_enabled
boolean optional

Filters based on whether the network has enabled the guest access or not

Example:
true

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

The network identifier

Example:
619387ec31d36b2cf6f9d8af
name
string

The network name

Example:
CRM-Nicosia
is_enabled
boolean

Defines whether the network is enabled or not

Example:
true
is_guest_enabled
boolean

Defines whether the network has enabled the guest access or not

Example:
false
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/organisations/35b9bc9c-466b-de7a-f23b-ed7a227e309f/wifi/sites/02b80141-8b0a-9803-0762-b76e50d34e9e/networks HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "619387ec31d36b2cf6f9d8af",
            "name": "CRM-Nicosia",
            "is_enabled": "true",
            "is_guest_enabled": "false"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Guest Control
PUT /organisations/{id}/wifi/sites/{s_id}/guest_control

Update an organisation’s guest control settings

Path variables

id
string GUID required

The organisation (identifier) whose guest control will be updated

Example:
35b9bc9c-466b-de7a-f23b-ed7a227e309f
s_id
string GUID required

The site (identifier) of which guest control will be updated

Example:
85b8181b-a1f2-8642-2400-3f9476bfc031

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

Defines the redirection URL (landing page) that contacts will access when joining a guest wifi network

Example:
https://crm.com/;anding-page

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation network site identifier

Example:
0633ab11-9090-001c-5998-936ae44ff5e0
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/35b9bc9c-466b-de7a-f23b-ed7a227e309f/wifi/sites/85b8181b-a1f2-8642-2400-3f9476bfc031/guest_control HTTP/1.1 

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

{
    "redirect_url": "https://crm.com/;anding-page"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "0633ab11-9090-001c-5998-936ae44ff5e0"
}
Get WiFi Guest Control
GET /organisations/{id}/wifi/sites/{s_id}/guest_control

Retrieve guest control settings for an organisation

Path variables

id
string GUID required

The organisation (identifier) of which guest control will be retrieved

Example:
35b9bc9c-466b-de7a-f23b-ed7a227e309f
s_id
string GUID required

The site (identifier) of which guest control will be retrieved

Example:
5464d7c1-8bb4-357c-33de-3e0059c6b984

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
redirect_url
string

Defines the redirection URL (landing page) that contacts will access when joining a guest wifi network

Example:
https://crm.com/landing-page
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/35b9bc9c-466b-de7a-f23b-ed7a227e309f/wifi/sites/5464d7c1-8bb4-357c-33de-3e0059c6b984/guest_control HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "redirect_url": "https://crm.com/landing-page"
}
Get WiFi Devices
GET /organisations/{id}/wifi/sites/{s_id}/devices

Retrieve a list of devices (access points) for an organisation’s wifi network

Path variables

id
string GUID required

The organisation (identifier) of which devices will be retrieved

Example:
35b9bc9c-466b-de7a-f23b-ed7a227e309f
s_id
string GUID required

The site (identifier) of which devices will be retrieved

Example:
7ae2d47f-39ca-377f-66c1-4f707795b7e3

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

The organisation identifier

Object
name
string

The device name

Example:
CRM-Nicosia
mac-address
string

The device mac address

Example:
00:00:5e:00:53:af
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/35b9bc9c-466b-de7a-f23b-ed7a227e309f/wifi/sites/7ae2d47f-39ca-377f-66c1-4f707795b7e3/devices HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "name": "CRM-Nicosia",
            "mac-address": "00:00:5e:00:53:af"
        }
    ]
}
Commerce Pools

A pool of common commercial terms that awarded cashback can be redeemed for (e.g. any coffee SKU on weekdays between 3pm to 6pm)

POST /commerce_pools
PUT /commerce_pools/{id}
GET /commerce_pools
GET /commerce_pools/{id}
Create Commerce Pool
POST /commerce_pools

Create a commerce pool

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 commerce pool name

Example:
Spend on CRM for a specific SKU
description
string nullable

The commerce pool description

Example:
Ability to redeem on any organisation/day/product
organisations
Array nullable

The organisation conditions on which commerce balance can be redeemed at

Unique items: YES
string GUID
Example:
c98b829b-30d9-393c-48cb-a96f1ff860d3
products
Array nullable

The product conditions on which commerce balance can be redeemed

Object
type
string required

Defines which type will be used as a condition

Enumeration:
PRODUCT
TYPE
BRAND
FAMILY
id
string GUID required

The unique identifier of the selected type

Example:
0b473e83-ebcc-e5a4-8602-70af7769f6c2
timings
Array nullable

The time conditions on which commerce balance can be redeemed

Example:
[
    {
        "month": 1,
        "day": "WEDNESDAY",
        "start_time": "10:00",
        "end_time": "11:00"
    }
]
Object
month
integer

The month as a condition (1-12)

Example:
1
day
integer

The day as a condition (1-7)

Example:
1
start_time
string

The time that condition will be valid from

Example:
10:00
end_time
string

The time that condition will be valid up to

Example:
11:00
validity
Object required

Validity (from) condition

type
string required

The award validity type

Enumeration:
SPECIFIC_DATE

Amount will be available to be spend from a specific date

PERIOD

Amount will be available to be spend from a specific period

NEXT_PURCHASE

Amount will be available to be spend from the next purchase

specific_date
integer epoch nullable

The valid from date (applicable for specific date validity type)

Example:
1590474228
period
integer nullable

The validity from period (applicable for period validity type)

Example:
2
uot
string nullable

The award validity period unit (applicable for period validity type)

Enumeration:
HOUR
DAY
MONTH
YEAR
expiration
Object required

Expiration (valid to) condition

type
string required

The award expiration type

Enumeration:
NEVER
SPECIFIC_DATE
PERIOD
MONTH_END
YEAR_END
specific_date
integer epoch nullable

The date that the amount expires (applicable for specific expiration type)

Example:
1590474228
period
integer nullable

The expiration period (applicable for period expiration type)

Example:
1
uot
string nullable

The award validity period unit (applicable for period validity type)

Enumeration:
HOUR
DAY
MONTH
YEAR

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The commerce pool 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
POST https://sandbox.crm.com/backoffice/v2/commerce_pools HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Spend on CRM for a specific SKU",
    "organisations": [
        "c98b829b-30d9-393c-48cb-a96f1ff860d3"
    ],
    "products": [
        {
            "type": "PRODUCT",
            "id": "b1a980fd-5a7a-0dcd-1443-930b38bcaab7"
        }
    ],
    "timings": [
        {
            "day": "MONDAY"
        }
    ],
    "validity": {
        "validity_type": "NEXT_PURCHASE"
    },
    "expiration": {
        "expiration_type": "YEAR_END"
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05"
}
Update Commerce Pools
PUT /commerce_pools/{id}

Update an existing commerce pool

Path variables

id
string GUID required

The commerce pool (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 commerce pool name

Example:
Spend on CRM for a specific SKU
description
string nullable

The commerce pool description

Example:
Ability to redeem on any organisation/day/product
organisations
Array nullable

The organisation conditions on which commerce balance can be redeemed at

Unique items: YES
string GUID
Example:
c98b829b-30d9-393c-48cb-a96f1ff860d3
products
Array nullable

The product conditions on which commerce balance can be redeemed

Object
type
string required

Defines which type will be used as a condition

Enumeration:
PRODUCT
TYPE
BRAND
FAMILY
id
string GUID required

The unique identifier of the selected type

Example:
0b473e83-ebcc-e5a4-8602-70af7769f6c2
timings
Array nullable

The time conditions on which commerce balance can be redeemed

Object
month
integer

The month as a condition (1-12)

Example:
1
day
integer

The day as a condition (1-7)

Example:
1
start_time
string

The time that condition will be valid from

Example:
10:00
end_time
string

The time that condition will be valid up to

Example:
11:00
validity
Object nullable

Validity (from) condition

type
string required

The award validity type

Enumeration:
SPECIFIC_DATE

Amount will be available to be spend from a specific date

PERIOD

Amount will be available to be spend from a specific period

NEXT_PURCHASE

Amount will be available to be spend from the next purchase

specific_date
integer epoch nullable

The valid from date (applicable for specific date validity type)

Example:
1590474228
period
integer nullable

The validity from period (applicable for period validity type)

Example:
2
uot
string nullable

The award validity period unit (applicable for period validity type)

Enumeration:
HOUR
DAY
MONTH
YEAR
expiration
Object nullable

Expiration (valid to) condition

type
string required

The award expiration type

Enumeration:
NEVER
SPECIFIC_DATE
PERIOD
MONTH_END
YEAR_END
specific_date
integer epoch nullable

The date that the amount expires (applicable for specific expiration type)

Example:
1590474228
period
integer nullable

The expiration period (applicable for period expiration type)

Example:
1
uot
string nullable

The award validity period unit (applicable for period validity type)

Enumeration:
HOUR
DAY
MONTH
YEAR

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The commerce pool 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/v2/commerce_pools/c0d4712e-6688-4604-b3d6-d084e4d2dc05 HTTP/1.1 

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

{
    "name": "Spend on CRM for a specific SKU",
    "organisations": [
        "c98b829b-30d9-393c-48cb-a96f1ff860d3"
    ],
    "products": [
        {
            "type": "PRODUCT",
            "id": "b1a980fd-5a7a-0dcd-1443-930b38bcaab7"
        }
    ],
    "timings": [
        {
            "day": "MONDAY"
        }
    ],
    "validity": {
        "validity_type": "NEXT_PURCHASE"
    },
    "expiration": {
        "expiration_type": "YEAR_END"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05"
}
List Commerce Pools
GET /commerce_pools

Retrieves the available commerce pools

Request parameters

search_value
string optional

The value of the search (case insensitive) across name

Example:
Instant Spend
name
string optional

Filter based on name

Example:
Instant Spend
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

Details about spend condition

id
string GUID

The commerce pool identifier

Example:
dc01f65b-a482-48f1-9fda-c163df72f28f
name
string

The commerce pool name

Example:
Redeem Anywhere
description
string

The commerce pool description

Example:
Ability to redeem on any organisation/day/product
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/commerce_pools HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "dc01f65b-a482-48f1-9fda-c163df72f28f",
            "name": "Spend Anywhere"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Commerce Pool
GET /commerce_pools/{id}

Retrieve detailed information for a specific commerce pool

Path variables

id
string GUID required

The commerce pool (identifer) to 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

The request has succeeded

Body
Object
id
string GUID

The commerce pool identifier

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

The commerce pool name

Example:
Happy Hour
description
string

The commerce pool description

Example:
Ability to redeem on any organisation/day/product
organisations
Array

The organisation conditions on which commerce balance can be redeemed at

Object
id
string GUID

The organisation identifier

Example:
308ad557-90de-b56c-fe96-0819cdf8e4d8
name
string

The organisation name

Example:
X-CAFE
type
string

The organisation type

Enumeration:
BUSINESS
MERCHANT
VENUE
locations
Array

The organisation location (address)

Object

Information about the organisation’s location

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
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
products
Array
Object
item_type
string required

Which product piece of information will be used as a condition; the product itself, it type or brand or family?

Enumeration:
PRODUCT
TYPE
BRAND
FAMILY
Example:
PRODUCT
item_id
string GUID required

The unique identifier of the selected item type.

Example:
6A24D2B5E44F44B28451FE021FCAD51E
name
string

The name of the entity e.g the product name or product type name

Example:
Support Service
description
string

The descirption of the entity.

Example:
24/7 Support to all users
timings
Array

The time conditions on which commerce balance can be redeemed

Object
month
integer

The month as a condition (1-12)

Example:
1
day
integer

The day as a condition (1-7)

Example:
1
start_time
string

The time that condition will be valid from

Example:
10:00
end_time
string

The time that condition will be valid up to

Example:
11:00
validity
Object

Valid (from) condition

type
string

The award validity type

Enumeration:
SPECIFIC_DATE

Amount will be available to be spend from a specific date

PERIOD

Amount will be available to be spend from a specific period

NEXT_PURCHASE

Amount will be available to be spend from the next purchase

specific_date
integer epoch

The date that the amount will be valid (applicable for specific validity type)

Example:
1590474228
period
integer

The specific validity period (applicable for period validity type)

Example:
1
uot
string

The award validity period unit (applicable for period validity type)

Enumeration:
HOUR
DAY
MONTH
YEAR
expiration
Object

Valid (from) condition

type
string

The award validity type

Enumeration:
SPECIFIC_DATE

Amount will be available to be spend from a specific date

PERIOD

Amount will be available to be spend from a specific period

NEXT_PURCHASE

Amount will be available to be spend from the next purchase

specific_date
integer epoch

The date that the amount will be valid (applicable for specific validity type)

Example:
1590474228
period
integer

The specific validity period (applicable for period validity type)

Example:
1
uot
string

The award validity period unit (applicable for period validity type)

Enumeration:
HOUR
DAY
MONTH
YEAR
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/commerce_pools/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": "Happy Hour",
    "organisations": [
        {
            "id": "308ad557-90de-b56c-fe96-0819cdf8e4d8",
            "name": "X-CAFE",
            "type": "MERCHANT",
            "locations": [
                {
                    "name": "Head Office",
                    "address_line_1": "Elia Papakyriakou 21",
                    "address_line_2": "7 Tower Stars",
                    "state_province_county": "Egkomi",
                    "town_city": "Nicosia",
                    "postal_code": "2415",
                    "country_code": "CY",
                    "lat": 35.157115,
                    "lon": 33.313719,
                    "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
                }
            ]
        }
    ],
    "products": [
        {
            "item_type": "PRODUCT",
            "item_id": "6A24D2B5E44F44B28451FE021FCAD51E",
            "name": "Support Service",
            "description": "24/7 Support to all users"
        }
    ],
    "timings": [
        {
            "month": 1,
            "day": "THURSDAY",
            "start_time": "",
            "end_time": ""
        }
    ],
    "validity": {
        "validity_type": "SPECIFIC_DATE",
        "specific_date": 1590474228,
        "period": 1,
        "period_unit": "MONTH"
    },
    "expiration": {
        "expiration_type": "SPECIFIC_DATE",
        "specific_date": 1590474228,
        "period": 2,
        "period_unit": "YEAR"
    }
}
Communications
POST /communications
GET /communications/{id}
GET /communications
Create Communication
POST /communications

Creates a single communication for a speciifc Contact

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

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

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

Request body

application/json
Object
name
string

The name of the communication

Example:
Happy Birthday
contact_id
string GUID required

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

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
channel
string required

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
integration_id
string GUID required

The integration that will send the communication

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
language
string

The language of the communication

Example:
ENG
recipient
string

The recipient’s address or phone according to the channel

Example:
customer@crm.com
title
string

Title of push notification (applicable for INAPP channels)

Example:
New Festive Beverages
subtitle
string

Subtitle (iOS only) of push notification (applicable for INAPP channels)

Example:
20% discount for December
subject
string

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

Example:
New Rewards Offer
content
string

The actual content of the communication sent

ignore_preferences
boolean

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

Default:
false
Example:
true
in_app_image_url
string

Image for push notification

in_app_click_link_url
string

Push notification URL (deep linking)

message_type
string nullable

The message type that a provisioning provider will send (applicable and required only if the selected integrator is a provisioning provider)

Enumeration:
MAIL

Email Communication (send by provisioning provider)

OSD

On Screen Display Communication (send by provisioning provider)

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

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

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://stagingapi.crm.com/backoffice/v1/communications HTTP/1.1 

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

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

HTTP/1.1 200 OK 

Content-Type: application/json

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

Retrieve a specific communication

Path variables

id
string GUID required

The communication (identifier) to be retrieved

Example:
9c656a25-6711-f954-e1d8-4867f0771d75

Responses

200 200

The request has succeeded

Body
application/json
Object
name
string

The name of the communication

Example:
Happy Birthday
state
string

The state of the communication

Enumeration:
PENDING
COMPLETED
REJECTED
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
is_viewed
boolean

Has the recipient viewed the communication?

Example:
false
viewed_on
integer epoch

The datetime that the recipient viewed the communication

Example:
1583846861
is_archived
boolean

Has the recipient archived the communication?

Example:
true
clicked_on
integer epoch

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

Example:
1583846865
created_on
integer epoch

The date and time that the communication was created

Example:
1583846861
language
string

The language of the communication

Example:
ENG
sender
string

The default sender

Example:
dev@crm.com
recipient
string

The email or number of the recipient

Example:
jon@crm.com
title
string

Title of push notification (applicable for INAPP channels)

Example:
New Festive Beverages
subtitle
string

Subtitle (iOS only) of push notification (applicable for INAPP channels)

Example:
20% discount for December
subject
string

The actual subject of the communication sent (if applicable)

content
string

The actual content of the communication sent

in_app_image_url
string

Image for push notification

in_app_click_link_url
string

Push notification URL (deep linking)

contact
Object

The contact that the communication was delivered to

id
string GUID

The unique identifier of the contact

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
code
string

The unique code of the contact

Example:
C123
name
string

The full name of the contact

Example:
John Johnson
message_type
string

The message type that a provisioning provider will send (applicable and required only if the selected integrator is a provisioning provider)

Enumeration:
MAIL

Email Communication (send by provisioning provider)

OSD

On Screen Display Communication (send by provisioning provider)

initiated_by
Object
process
string
Enumeration:
AUTOMATION
COMMUNICATION_PLAN
USER
name
string

The process name or the User name

Example:
Registration email
id
string

User identifier if communoication was triggered manually be a user.

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

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/communications/9c656a25-6711-f954-e1d8-4867f0771d75 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "Happy Birthday",
    "state": "PENDING",
    "channel": "INAPP",
    "is_viewed": true,
    "viewed_on": 1583846861,
    "is_archived": true,
    "clicked_on": 1583846865,
    "created_on": 1583846861,
    "language": "ENG",
    "sender": "dev@crm.com",
    "recipient": "jon@crm.com",
    "title": "New Festive Beverages",
    "subtitle": "20% discount for December",
    "subject": "",
    "content": "",
    "in_app_image_url": "",
    "in_app_click_link_url": "",
    "contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "code": "C123",
        "name": "John Johnson"
    },
    "message_type": "MAIL",
    "initiated_by": {
        "process": "AUTOMATION",
        "name": "Registration email",
        "id": "AAD1E31269B76D7A65ACCE45B2E68DFD"
    }
}
List Communications
GET /communications

Retrieves all available communications

Request parameters

contact_id
string GUID optional

The contact ID for which the communications will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
state
string optional

The life cycle state of the communications to be retrieved

Enumeration:
PENDING
COMPLETED
REJECTED
channel
string optional

The channel of the communications to be retrieved

Enumeration:
SMS
EMAIL
DEVICE
INAPP
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_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
initiated_by_process
string optional

The process or action that initiated the communication

Enumeration:
COMMUNICAITON_PLAN
AUTOMATION
USER_INITIATED

Initiated manualy by a user

initiated_by_user_id
string optional

The user who initiated the communication

Example:
AAD1E31269B76D7A65ACCE45B2E68DFD
initiated_by_process_name
string optional

The transaction name to which the communication was triggered

Examples:
Registration emailContact statement
is_viewed
boolean optional

Has the recipient viewed the communication?

Example:
false
recipient
string optional

The email or number of the recipient

Example:
jon@crm.com

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

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

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

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array
Object
id
string GUID

The communication ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

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

Example:
Happy Birthday
state
string

The state of the communication

Enumeration:
PENDING
COMPLETED
REJECTED
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
is_viewed
boolean

Has the recipient viewed the communication?

Example:
false
viewed_on
integer epoch

The datetime that the recipient viewed the communication

Example:
1583846865
is_archived
boolean

Has the recipient archived the communication?

clicked_on
integer epoch

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

Example:
1583846865
created_on
integer epoch

The date and time that the communication was created

Example:
1583846865
language
string

The communication’s language

Example:
ENG
sender
string

The default sender

Example:
dev@crm.com
recipient
string

The email or number of the recipient

Example:
jon@crm.com
subject
string

The actual subject of the communication sent (if applicable)

Example:
Welcome to our company
content
string

The actual content of the communication sent

Example:
Dear sir/madam...
title
string

Title of push notification (applicable for INAPP channels)

Example:
New Festive Beverages
subtitle
string

Subtitle (iOS only) of push notification (applicable for INAPP channels)

Example:
20% discount for December
in_app_image_url
string

Image for push notification

in_app_click_link_url
string

Push notification URL (deep linking)

contact
Object

The contact that the communication was delivered to

id
string GUID

The unique identifier of the contact

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The full name of the contact

Example:
John Smith
code
string

The unique code of the contact

Example:
H8893M70
message_type
string

The message type that a provisioning provider will send (applicable and required only if the selected integrator is a provisioning provider)

Enumeration:
MAIL

Email Communication (send by provisioning provider)

OSD

On Screen Display Communication (send by provisioning provider)

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/communications HTTP/1.1 

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

HTTP/1.1 400 Bad Request 
Communication Templates
POST /communication_templates
PUT /communication_templates/{id}
GET /communication_templates
GET /communication_templates/{id}
DELETE /communication_templates/{id}
POST /printout
Create Communication Template
POST /communication_templates

Creates a communication template

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

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

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

Request body

application/json
Object
name
string required

The name of the communication template

Example:
New Rewards Offer Template
entity
string

Communication template related entity

Enumeration:
INVOICE
ORDERS
PAYMENT
CREDIT_NOTE
REFUND
PAYOUT
SERVICE_REQUEST
channel
string

Channel of communication - subject to integrations

Example:
SMTP
contents
Array
Object
language
string

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

Example:
ENG
title
string

Title - applicable if template is for push notifications

Example:
New Festive Beverages
subtitle
string

Subtitle - applicable if template is for push notifications

Example:
20% discount for December
subject
string

The subject of the communication of the rich content

rich_content
string

The content in rich format

plain_content
string

The content in plain format

in_app_image_url
string

Image for push notification

in_app_image_type
string

Type of image

Enumeration:
UPLOAD
URL
Example:
UPLOAD
in_app_click_link_url
string

Push notification URL (deep linking)

is_default
boolean required

Defines whether the communication template is the default one

Example:
true

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication template identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
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/v1/communication_templates HTTP/1.1 

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

{
    "name": "New Rewards Offer Template",
    "entity": "INVOICE",
    "channel": "SMTP",
    "contents": [
        {
            "language": "ENG",
            "title": "New Festive Beverages",
            "subtitle": "20% discount for December",
            "subject": "",
            "rich_content": "",
            "plain_content": "",
            "in_app_image_url": "",
            "in_app_image_type": "UPLOAD",
            "in_app_click_link_url": ""
        }
    ]
}
Update Communication Template
PUT /communication_templates/{id}

Update a communication template

Path variables

id
string required

The communication template identifier to be updated

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

Communication template unique id

Example:
e82c88c8-0c5a-4fc9-97fc-06bed0506578
name
string required

The name of the communication template

Example:
General invoice
contents
Array
Object
id
string required

Communication template content id

Example:
db56a528-fe5a-49d0-8424-87f76caee81a
language
string

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

Example:
ENG
title
string

Title - applicable if template is for push notifications

Example:
New Festive Beverages
subtitle
string

Subtitle - applicable if template is for push notifications

Example:
20% discount for December
subject
string

The subject of the communication of the rich content

rich_content
string

The content in rich format

plain_content
string

The content in plain format

in_app_image_url
string

Image for push notification

in_app_image_type
string

Type of image

Enumeration:
UPLOAD
URL
Example:
UPLOAD
in_app_click_link_url
string

Push notification URL (deep linking)

is_default
boolean

Defines whether the communication template is the default one

Example:
true

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication template identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
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/communication_templates/{id} HTTP/1.1 

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

{
    "id": "e82c88c8-0c5a-4fc9-97fc-06bed0506578",
    "name": "General invoice",
    "contents": [
        {
            "id": "db56a528-fe5a-49d0-8424-87f76caee81a",
            "language": "ENG",
            "title": "New Festive Beverages",
            "subtitle": "20% discount for December",
            "subject": "",
            "rich_content": "",
            "plain_content": "",
            "in_app_image_url": "",
            "in_app_image_type": "UPLOAD",
            "in_app_click_link_url": ""
        }
    ]
}
List Communication Templates
GET /communication_templates

Retrieves all available communication templates

Request parameters

entity
string optional

The communication template related entity

Enumeration:
INVOICE
ORDERS
PAYMENT
CREDIT_NOTE
REFUND
PAYOUT
SERVICE_REQUEST
channel
string optional

Channel of communication - subject to integrations

Enumeration:
EMAIL
SMS
INAPP
DEVICE
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
name
string optional

Retrieves the communication templates based on their names

Example:
New Rewards Offer Template

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

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

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

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array
Object
id
string

Unique id of communication template

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

The name of the communication template

Example:
New Rewards Offer Template
entity
string

Communication template related entity

Enumeration:
INVOICE
ORDERS
PAYMENT
CREDIT_NOTE
REFUND
PAYOUT
SERVICE_REQUEST
channel
string

Channel of communication

Example:
SMS
is_default
boolean

Defines whether the communication template is the default one

Example:
true
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/v1/communication_templates HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "New Rewards Offer Template",
            "entity": "INVOICE",
            "channel": "SMS"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Communication Template
GET /communication_templates/{id}

Retrieve a single communication template

Path variables

id
string GUID required

The communication template id

Example:
4AD9C84FA60F9FE407140E20F707726A

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

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

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

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string

Communication template unique id

Example:
e82c88c8-0c5a-4fc9-97fc-06bed0506578
name
string required

The name of the communication template

Example:
New Rewards Offer Template
entity
string

Communication template related entity

Enumeration:
INVOICE
ORDERS
PAYMENT
CREDIT_NOTE
REFUND
PAYOUT
SERVICE_REQUEST
channel
string

Channel of communication

Example:
EMAIL
contents
Array
Object
id
string

Communication template content id

Example:
db56a528-fe5a-49d0-8424-87f76caee81a
language
string

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

Example:
ENG
title
string

Title - provided if template is for push notifications

Example:
New Festive Beverages
subtitle
string

Subtitle (iOS only) - provided if template is for push notifications

Example:
20% discount for December
subject
string

The subject of the communication of the rich content

rich_content
string

The content in rich format

plain_content
string

The content in plain format

in_app_image_url
string

Image for push notification

in_app_image_type
string

Type of image

Enumeration:
UPLOAD
URL
Example:
UPLOAD
in_app_click_link_url
string

Push notification URL (deep linking)

is_default
boolean

Defines whether the communication template is the default one

Example:
true
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/v1/communication_templates/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "e82c88c8-0c5a-4fc9-97fc-06bed0506578",
    "name": "New Rewards Offer Template",
    "entity": "INVOICE",
    "channel": "EMAIL",
    "contents": [
        {
            "id": "db56a528-fe5a-49d0-8424-87f76caee81a",
            "language": "ENG",
            "title": "New Festive Beverages",
            "subtitle": "20% discount for December",
            "subject": "",
            "rich_content": "",
            "plain_content": "",
            "in_app_image_url": "",
            "in_app_image_type": "UPLOAD",
            "in_app_click_link_url": ""
        }
    ]
}
Delete Communication Template
DELETE /communication_templates/{id}

Delete a communication template

Path variables

id
string GUID required

The communication template id to be deleted

Example:
4AD9C84FA60F9FE407140E20F707726A

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

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

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

Responses

200 OK

The request has succeeded

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

Printout
POST /printout

Use this API to send a transaction as an email or view it as a web page (to print), the output is based on a configured communication template which must be specified.

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

Details of entity to be output

type
string

Output entity type

Enumeration:
INVOICE
CREDIT_NOTE
PAYMENT
REFUND
PAYOUT
ORDERS
SERVICE_REQUEST
id
string

Output entity id (e.g. invoice id)

Example:
007c08166f95-8c54d563-b991-4b76-8a83
template_id
string

Communication template id to be used for output

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

Output type

Enumeration:
EMAIL

Transaction is sent to the Contact’s email address

WEB_VIEW

Transaction is viewed as a web page (can be printed using web browser)

Responses

200 200

The request has succeeded

Body
application/json

An HTML based landing page is returned and rendered

Object
id
string GUID

The communication template identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
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/v1/printout HTTP/1.1 

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

{
    "entity": {
        "name": "INVOICE",
        "id": "007c08166f95-8c54d563-b991-4b76-8a83"
    },
    "template_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "action": "EMAIL"
}
Communication Plans
POST /communication_plans
PUT /communication_plans/{id}
DELETE /communication_plans/{id}
GET /communication_plans
GET /communication_plans/{id}
Create Communication Plan
POST /communication_plans

Creates a single communication plan

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string 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

The communication plan’s name

Example:
New Reward Offers
end_date
integer epoch

The datetime that the communication plan ends running

Example:
12345678
start_date
integer epoch required

The datetime that the communication plan will start running

Example:
12345678
segments
Array

A list of segments that the communications will be sent to

string GUID

the segment ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
contents
Array

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

Object

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

language
string

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

Example:
ENG
title
string

Title for INAPP push notifications

Example:
New Festive Beverages
subtitle
string

Subtitle for INAPP push notifications (iOS only)

Example:
20% discount for December
subject
string

The subject of the communication of the rich content (not for INAPP)

rich_content
string

The content in rich format

plain_content
string

The content in plain format

in_app_image_url
string

Image for push notification

in_app_image_type
string

Type of image

Enumeration:
UPLOAD
URL
in_app_click_link_url
string

Push notification URL (deep linking)

integrations
Array

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

string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
message_type
string required nullable

The message type that a provisioning provider will send (applicable and required only if the selected integrator is a provisioning provider)

Enumeration:
MAIL

Email Communication (send by provisioning provider)

OSD

On Screen Display Communication (send by provisioning provider)

frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
state
string

The life cycle state of the Communication Plan

Enumeration:
DRAFT
POSTED

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication plan identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 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/communication_plans HTTP/1.1 

Content-Type: application/json

{
    "name": "New Reward Offers",
    "end_date": 12345678,
    "start_date": 12345678,
    "segments": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "contents": [
        {
            "language": "ENG",
            "title": "New Festive Beverages",
            "subtitle": "20% discount for December",
            "subject": "",
            "rich_content": "",
            "plain_content": "",
            "in_app_image_url": "",
            "in_app_image_type": "UPLOAD",
            "in_app_click_link_url": ""
        }
    ],
    "integrations": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "message_type": "MAIL",
    "frequency": "0 0 12 * * ?",
    "state": "POSTED"
}

HTTP/1.1 200 OK 
Update Communication Plan
PUT /communication_plans/{id}

Updates an existing communication plan

Path variables

id
string GUID required

The ID of the communication plan to be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string 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 communication plan’s name

Example:
New Reward Offer
start_date
integer epoch required

The datetime that the communication plan will start running

Example:
112345678
end_date
integer epoch required

The datetime that the communication plan ends running

Example:
12345678
segments
Array

A list of segments that the communications will be sent to

string GUID

the segment ID

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
contents
Array

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

Object

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

language
string

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

Example:
ENG
title
string

Title for INAPP push notifications

Example:
New Festive Beverages
subtitle
string

Subtitle for INAPP push notifications (iOS only)

Example:
20% discount for December
subject
string

The subject of the communication of the rich content (not for INAPP)

rich_content
string

The content in rich format

plain_content
string

The content in plain format

in_app_image_url
string

Image for push notification

in_app_image_type
string

Image type

Enumeration:
UPLOAD
URL
Example:
UPLOAD
in_app_click_link_url
string

Push notification URL (deep linking)

integrations
Array

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

string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
message_type
string required nullable

The message type that a provisioning provider will send (applicable and required only if the selected integrator is a provisioning provider)

Enumeration:
MAIL

Email Communication (send by provisioning provider)

OSD

On Screen Display Communication (send by provisioning provider)

frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
state
string

The life cycle state of the Communication Plan

Enumeration:
DRAFT
POSTED

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication plan identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 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/communication_plans/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Content-Type: application/json

{
    "name": "New Reward Offer",
    "start_date": 112345678,
    "end_date": 12345678,
    "segments": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "contents": [
        {
            "language": "ENG",
            "title": "New Festive Beverages",
            "subtitle": "20% discount for December",
            "subject": "",
            "rich_content": "",
            "plain_content": "",
            "in_app_image_url": "",
            "in_app_image_type": "UPLOAD",
            "in_app_click_link_url": ""
        }
    ],
    "integrations": [
        "CAD1E31269B76D7A65ACCE45B2E68DFD"
    ],
    "message_type": "MAIL",
    "frequency": "0 0 12 * * ?",
    "state": "POSTED"
}
Delete Communication Plan
DELETE /communication_plans/{id}

Deletes a single communication plan

Path variables

id
string GUID required

The ID of the communication plan to be deleted

Example:
4AD9C84FA60F9FE407140E20F707726A

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string 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

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://devapi.crm.com/backoffice/v1/communication_plans/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1 

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

HTTP/1.1 200 OK 
List Communication Plans
GET /communication_plans

Retrieves all available communication plans

Request parameters

search_value
string optional

The value of the search across the plan name

Example:
New Offer
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_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
application/json
Object
content
Array
Object
id
string GUID

The communication plan identifier

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The communication plan name

Example:
New Reward Offers
start_date
integer epoch

The datetime that the communication plan will start running

Example:
12345678
end_date
integer epoch

The datetime that the communication plan ends running

Example:
12345678
state
string

The life cycle state of the Communication Plan

Enumeration:
DRAFT
POSTED
integrations
Object
id
string GUID

The integration identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the integration

Example:
Connection for Emails
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
owner
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
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/communication_plans HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "name": "New Reward Offers",
            "start_date": 12345678,
            "end_date": 12345678,
            "state": "POSTED",
            "integrations": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "Connection for Emails",
                "channel": "INAPP"
            },
            "owner": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Communication Plan
GET /communication_plans/{id}

Retrieves a specific communication plan

Path variables

id
string GUID required

The unique ID of the communication plan to be retrieved

Example:
4AD9C84FA60F9FE407140E20F707726A

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
application/json
Object
name
string

The name of the communication plan

Example:
New Rewards Offer
end_date
integer epoch

The datetime that the communication plan ends running

Example:
12345678
start_date
integer epoch required

The datetime that the communication plan will start running

Example:
12345678
segments
Array

A list of segments that the communications will be sent to

Object

the segment ID

id
string GUID

The ID of the segment

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The name of the segment

Example:
VIP Contacts
contents
Array

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

Object

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

language
string

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

Example:
ENG
title
string

Title for INAPP push notifications

Example:
New Festive Beverages
subtitle
string

Subtitle for INAPP push notifications (iOS only)

Example:
20% discount for December
subject
string

The subject of the communication of the rich content (not for INAPP)

rich_content
string

The content in rich format

plain_content
string

The content in plain format

in_app_image_url
string

Image for push notification

in_app_image_type
string

Type of image

Enumeration:
UPLOAD
URL
Example:
UPLOAD
in_app_click_link_url
string

Push notification URL (deep linking)

integrations
Array

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

Object
id
string GUID

The unique identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the integration

Example:
Connection for Emails
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
message_type
string

The message type that a provisioning provider will send (applicable and required only if the selected integrator is a provisioning provider)

Enumeration:
MAIL

Email Communication (send by provisioning provider)

OSD

On Screen Display Communication (send by provisioning provider)

state
string

The life cycle state of the Communication Plan

Enumeration:
DRAFT
POSTED
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/v1/communication_plans/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1 
Contacts

Contacts represent the customers of an organisation, and can either be a person (B2C), or a business (B2B). They are the centre point of CRM.COM, and the starting point of any business flow.

POST /contacts
PUT /contacts/{id}
GET /contacts/{id}
GET /contacts
DELETE /contacts/{id}
Create Contact
POST /contacts

Create a new contact of type ‘person’ or ‘company’

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
code
string nullable

A unique contact code, if one is not provided then it will be generated by the system. In the latter case a random, unique 16-digit code will be assigned.

Example:
8047448052702285
loyalty_identifier
string nullable

Optionally provide a contact loyalty identifier, also acts as a CIM (typically from an external system)

Example:
25145083077
type
string required

Type of contact support types include Person and Company.

Enumeration:
PERSON
COMPANY
person_name
Object
first_name
string required

Contact’s first name

Example:
Fernandes
middle_name
string

Contact’s middle name

Example:
Louis
last_name
string required

Contact’s surname

Example:
Kozior
company_name
string

The company name, if the contact type is ‘company’

Example:
Smith & Sons Ltd.
phone
Object
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
number
string

The phone number

Example:
99123456
type
string
Enumeration:
LANDLINE
MOBILE
FAX
email_address
string

The contact’s email address

Example:
bill@gmail.com
address
Object

Information about an address of the contact

type
string required

The address type. Many of the same type.

Enumeration:
HOME
BUSINESS
ALTERNATIVE
name
string nullable

A short address name so that it can be easily recognised in a list

Example:
Engomi office
is_primary
boolean nullable

Defines whether the address is the primary one (used for billing or communication purposes)

Default:
false
Example:
true
address_line_1
string required

The address line 1 (main address information

Example:
21 Elia Papakyriakou
address_line_2
string nullable

The address line 2 (additional information)

Example:
7 Stars Tower
state_province_county
string nullable

The address state/province/county

Example:
Egkomi
town_city
string nullable

The address town/city

Example:
Nicosia
postal_code
string nullable

The address postal code

Example:
2415
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
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 an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
language_code
string
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
marketing_preferences
Object
sms_opt_out
boolean nullable

Has the contact opted out from receiving marketing communications via sms?

Example:
true
email_opt_out
boolean nullable

Has the contact opted out from receiving marketing communications via email?

Example:
false
referral_code
string nullable

Optionally provide the contact’s referral code (used when referring a friend). If a code is not provided, then it will be automatically generated by the system

Max length: 6
Example:
fa8f71
country_of_agreement
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
category_id
string nullable

The id of the contact’s category classification

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

Is the contact excluded from paying taxes?

Default:
false
Example:
true
create_wallet
boolean

Create a wallet for the contact?

Example:
true
wallet_identity
Object

Method of identifying the contact’s wallet (existing contact)

type
string
Enumeration:
EMAIL
PHONE
Example:
EMAIL
value
string

Value for the identification type, i.e. the email address or phone number

Example:
bill@gmail.com
create_default_account
boolean

If set to true, then a single account is created for the contact using the system’s default settings, alternatively, use ‘account’ to specificy account settings

Example:
true
account
Object

Create a single contact account with specific settings. Since this is the first account of the contact, then it will also be marked as the primary one.

name
string

The account name. If not specified, then it will be set based on business rules.

Example:
AC001856
credit_limit
number

The account credit limit. If not specified, then default Credit Terms are applied

Example:
100
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
classification_id
string

The account classification identifier

Example:
356215f1-8775-c949-cc18-b6da670d319a
payment_terms_id
string

The id for the account’s payment terms. If not specified, then default Credit Terms are applied

Example:
356215f1-8775-c949-cc18-b6da670d319a
demographics
Object
gender
string

The gender of the contact

Enumeration:
MALE
FEMALE
statutory_number
string

The contact’s unique statutory number

Example:
231224-8424406
country_of_residence
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
passport
Object

Contact’s passport information

number
string

Passport number

Example:
AK123456
issuing_country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
expiration_date
integer epoch

Passport’s expiry date

Example:
1677673128
id_details
Object

Contact’s ID information

number
string

ID number

Example:
809251833
issuing_country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
expiration_date
integer epoch

ID’s expiry date

Example:
1709295528
name_day
Object

Contact’s celebrated name day

day
integer required

Day of the month

Example:
6
month
integer required

Month of the year

Example:
8
date_of_birth
Object

Contact’s date of birth

day
integer required

Day

Example:
1
month
integer required

Month

Example:
3
year
integer required

Year

Example:
1948
company_profile
Object
registration_number
string nullable

Company’s registration number

Example:
EPM869233102
registration_country
string nullable
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
tax_reference_number
string nullable

The company’s tax reference number

Example:
TPS90398813
vat_registration_number
string nullable

The company VAT registration numnber

Example:
1206523T
industry_id
string GUID nullable

Id for company’s industry

Example:
69350edc-e0dc-4e2d-a8a1-8f26a2eacc09
industry_sectors
Array nullable

Ids for company’s industry sectors

Unique items: YES
Object
id
string

Industry sector identifier

Example:
69350edc-e0dc-4e2d-a8a1-8f26a2eacc09
notes
string nullable

Notes about the contact

Example:
This customer has been referred by our associate Kerry Jackson.
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
sales_model_id
string

The sales model based on which prices will be applied for this contact. If not specified, then the contact’s type (Person or Company) is used to apply Retail or Wholesale sales models respectivelly.

Example:
caf332bc-4e90-47b5-a05d-142b264897b9

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The identifier for the new contact created

Example:
356215f1-8775-c949-cc18-b6da670d319a
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

Create a contact for a person

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

Content-Type: application/json

{
    "code": "8047448052702285",
    "loyalty_identifier": "25145083077",
    "type": "COMPANY",
    "person_name": {
        "first_name": "Fernandes",
        "middle_name": "Louis",
        "last_name": "Kozior"
    },
    "company_name": "Smith & Sons Ltd.",
    "phone": {
        "country_code": "CYP",
        "number": "99123456",
        "type": "FAX"
    },
    "email_address": "bill@gmail.com",
    "address": {
        "type": "HOME",
        "name": "Engomi office",
        "is_primary": "true",
        "address_line_1": "21 Elia Papakyriakou",
        "address_line_2": "7 Stars Tower",
        "state_province_county": "Egkomi",
        "town_city": "Nicosia",
        "postal_code": "2415",
        "country_code": "CYP",
        "lat": 35.157115,
        "lon": 33.313719,
        "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
    },
    "language_code": "EN",
    "marketing_preferences": {
        "sms_opt_out": "true",
        "email_opt_out": "false"
    },
    "referral_code": "fa8f71",
    "country_of_agreement": "CYP",
    "category_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "is_tax_exempt": true,
    "create_wallet": true,
    "wallet_identity": {
        "type": "EMAIL",
        "value": "bill@gmail.com"
    },
    "create_default_account": "true",
    "account": {
        "name": "AC001856",
        "credit_limit": 100,
        "currency_code": "EUR",
        "classification_id": "356215f1-8775-c949-cc18-b6da670d319a",
        "payment_terms_id": "356215f1-8775-c949-cc18-b6da670d319a"
    },
    "demographics": {
        "gender": "MALE",
        "statutory_number": "231224-8424406",
        "country_of_residence": "CYP",
        "passport": {
            "number": "AK123456",
            "issuing_country_code": "CYP",
            "expiration_date": 1677673128
        },
        "id_details": {
            "number": "809251833",
            "issuing_country_code": "CYP",
            "expiration_date": 1709295528
        },
        "name_day": {
            "day": 6,
            "month": 8
        },
        "date_of_birth": {
            "day": 1,
            "month": 3,
            "year": 1948
        }
    },
    "company_profile": {
        "registration_number": "EPM869233102",
        "registration_country": "CYP",
        "tax_reference_number": "TPS90398813",
        "vat_registration_number": "1206523T",
        "industry_id": "69350edc-e0dc-4e2d-a8a1-8f26a2eacc09",
        "industry_sectors": [
            {
                "id": "69350edc-e0dc-4e2d-a8a1-8f26a2eacc09"
            }
        ]
    },
    "notes": "This customer has been referred by our associate Kerry Jackson.",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "sales_model_id": "caf332bc-4e90-47b5-a05d-142b264897b9"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "356215f1-8775-c949-cc18-b6da670d319a"
}
Update Contact
PUT /contacts/{id}

Update the information about a contact, it is possible to supply a partial body so that only those items supplied will be updated.

Path variables

id
string required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
person_name
Object
first_name
string required

Contact’s first name

Example:
Fernandes
middle_name
string

Contact’s middle name

Example:
Louis
last_name
string required

Contact’s surname

Example:
Kozior
company_name
string

Change the company name, if the contact type is ‘company’

Example:
Good Burger
phone
Object
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
number
string

The phone number

Example:
99123456
type
string
Enumeration:
LANDLINE
MOBILE
FAX
email_address
string

Set or change the contact’s email address

Example:
bill@gmail.com
addresses
Object

Information about an address of the contact

type
string required

The address type. Many of the same type.

Enumeration:
HOME
BUSINESS
ALTERNATIVE
name
string nullable

A short address name so that it can be easily recognised in a list

Example:
Engomi office
is_primary
boolean nullable

Defines whether the address is the primary one (used for billing or communication purposes)

Default:
false
Example:
true
address_line_1
string required

The address line 1 (main address information

Example:
21 Elia Papakyriakou
address_line_2
string nullable

The address line 2 (additional information)

Example:
7 Stars Tower
state_province_county
string nullable

The address state/province/county

Example:
Egkomi
town_city
string nullable

The address town/city

Example:
Nicosia
postal_code
string nullable

The address postal code

Example:
2415
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
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 an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
preferred_language_code
string
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
category_id
string

The contact’s category

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

Defines whether the contact is tax exempt or not

Example:
false
demographics
Object
gender
string

The gender of the contact

Enumeration:
MALE
FEMALE
statutory_number
string

The contact’s unique statutory number

Example:
231224-8424406
country_of_residence
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
passport
Object

Contact’s passport information

number
string

Passport number

Example:
AK123456
issuing_country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
expiration_date
integer epoch

Passport’s expiry date

Example:
1677673128
id_details
Object

Contact’s ID information

number
string

ID number

Example:
809251833
issuing_country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
expiration_date
integer epoch

ID’s expiry date

Example:
1709295528
name_day
Object

Contact’s celebrated name day

day
integer required

Day of the month

Example:
6
month
integer required

Month of the year

Example:
8
date_of_birth
Object

Contact’s date of birth

day
integer required

Day

Example:
1
month
integer required

Month

Example:
3
year
integer required

Year

Example:
1948
company_profile
Object
registration_number
string nullable

Company’s registration number

Example:
EPM869233102
registration_country
string nullable
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
tax_reference_number
string nullable

The company’s tax reference number

Example:
TPS90398813
vat_registration_number
string nullable

The company VAT registration numnber

Example:
1206523T
industry_id
string GUID nullable

Id for company’s industry

Example:
69350edc-e0dc-4e2d-a8a1-8f26a2eacc09
industry_sectors
Array nullable

Ids for company’s industry sectors

Unique items: YES
Object
id
string

Industry sector identifier

Example:
69350edc-e0dc-4e2d-a8a1-8f26a2eacc09
marketing_preferences
Object
sms_opt_out
boolean nullable

Has the contact opted out from receiving marketing communications via sms?

Example:
true
email_opt_out
boolean nullable

Has the contact opted out from receiving marketing communications via email?

Example:
false
notes
string

Add or update notes about the contact

Example:
Notes
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
sales_model_id
string

The sales model based on which prices will be applied for this contact. If not specified, then the contact’s type (Person or Company) is used to apply Retail or Wholesale sales models respectivelly.

Example:
caf332bc-4e90-47b5-a05d-142b264897b9

Responses

200 200

OK

Body
Object
id
string GUID

The updated contact identifier

Example:
443b03a2-8ec9-b4ba-7315-f0c638748dc3
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/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Content-Type: application/json

{
    "person_name": {
        "first_name": "Fernandes",
        "middle_name": "Louis",
        "last_name": "Kozior"
    },
    "company_name": "Good Burger",
    "phone": {
        "country_code": "CYP",
        "number": "99123456",
        "type": "LANDLINE"
    },
    "email_address": "bill@gmail.com",
    "addresses": {
        "type": "HOME",
        "name": "Engomi office",
        "is_primary": "true",
        "address_line_1": "21 Elia Papakyriakou",
        "address_line_2": "7 Stars Tower",
        "state_province_county": "Egkomi",
        "town_city": "Nicosia",
        "postal_code": "2415",
        "country_code": "CYP",
        "lat": 35.157115,
        "lon": 33.313719,
        "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
    },
    "preferred_language_code": "EN",
    "category_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "is_tax_exempt": "false",
    "demographics": {
        "gender": "MALE",
        "statutory_number": "231224-8424406",
        "country_of_residence": "CYP",
        "passport": {
            "number": "AK123456",
            "issuing_country_code": "CYP",
            "expiration_date": 1677673128
        },
        "id_details": {
            "number": "809251833",
            "issuing_country_code": "CYP",
            "expiration_date": 1709295528
        },
        "name_day": {
            "day": 6,
            "month": 8
        },
        "date_of_birth": {
            "day": 1,
            "month": 3,
            "year": 1948
        }
    },
    "company_profile": {
        "registration_number": "EPM869233102",
        "registration_country": "CYP",
        "tax_reference_number": "TPS90398813",
        "vat_registration_number": "1206523T",
        "industry_id": "69350edc-e0dc-4e2d-a8a1-8f26a2eacc09",
        "industry_sectors": [
            {
                "id": "69350edc-e0dc-4e2d-a8a1-8f26a2eacc09"
            }
        ]
    },
    "marketing_preferences": {
        "sms_opt_out": "true",
        "email_opt_out": "false"
    },
    "notes": "Notes",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "sales_model": {
        "id": "caf332bc-4e90-47b5-a05d-142b264897b9",
        "name": "Retail",
        "description": "Sales model available for all contact Person"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "443b03a2-8ec9-b4ba-7315-f0c638748dc3"
}
Get Contact
GET /contacts/{id}

Get the details of a specific contact

Path variables

id
string GUID required

The unique identifier of the contact whose details will be retrieved

Example:
9837ee37-a1ab-4a27-9b4b-663c9025a205

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
9837ee37-a1ab-4a27-9b4b-663c9025a205
code
string

The contact’s unique code

Example:
8047448052702285
type
string

Type of contact support types include Person and Company.

Enumeration:
PERSON
COMPANY
person_name
Object
full_name
string

The full name of the contact based on name display setting

Example:
Fernandes Louis Kozior
first_name
string

Contact’s first name

Example:
Fernandes
middle_name
string

Contact’s middle name

Example:
Louis
last_name
string

Contact’s surname

Example:
Kozior
company_name
string

The company name if the contact type is ‘company’

Example:
Smith & Sons Ltd.
phone
Object
id
string GUID

The phone identifier

Example:
5203665d-281d-ad97-6643-ae1038d2f6b7
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
number
string

The phone number

Example:
99123456
type
string
Enumeration:
LANDLINE
MOBILE
FAX
email_address
string

The contact’s email

Example:
fernandes@gmail.com
addresses
Array

Contact’s addresses

Example:
[
    {
        "id": "0df9936c-7d5f-a878-4c05-9b942aa14295",
        "type": "BUSINESS",
        "name": "Main Office",
        "is_primary": true,
        "address_line_1": "21 Elia Papakyriakou",
        "address_line_2": "7 Stars Tower",
        "state_province_county": "Egkomi",
        "town_city": "Nicosia",
        "postal_code": "2415",
        "country_code": "CYP",
        "lat": 35.157115,
        "lon": 33.313719,
        "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
    }
]
Object
id
string GUID

The address identifier

Example:
0df9936c-7d5f-a878-4c05-9b942aa14295
type
string

The address type. Many of the same type.

Enumeration:
HOME
BUSINESS
ALTERNATIVE
name
string

A short address name so that it’s easily recognised in a list

Example:
Mum's house
is_primary
boolean

Defines whether the address is the primary one

Example:
true
address_line_1
string

The address line 1

Example:
21 Elia Papakyriakou
address_line_2
string

The address line 2

Example:
7 Stars Tower
state_province_county
string

The address state/province/county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country 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
language_code
string
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
loyalty_identifiers
Array
Object
id
string

The unique id of the loyalty identifier (CIM)

Example:
3311eb31-1f2c-5d8f-ae0d-d22595bbfb7a
identifier
string

The loyalty identifier

Example:
100000001908
marketing_preferences
Object
sms_opt_out
boolean nullable

Has the contact opted out from receiving marketing communications via sms?

Example:
true
email_opt_out
boolean nullable

Has the contact opted out from receiving marketing communications via email?

Example:
false
category
Object

Details about the event classification

id
string GUID

The category identifier

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

The category name

Example:
Delivery Purchase
referral_code
string

The contact’s referral code for refer-a-friend actions via app/portal

Example:
fa8f71
country_of_agreement
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
is_tax_exempt
boolean

Is the contact exempt from paying taxes?

Example:
false
demographics
Object
gender
string

The gender of the contact

Enumeration:
MALE
FEMALE
statutory_number
string

The contact’s unique statutory number

Example:
231224-8424406
country_of_residence
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
passport
Object

Contact’s passport information

number
string

Passport number

Example:
AK123456
issuing_country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
expiration_date
integer epoch

Passport’s expiry date

Example:
1677673128
id_details
Object

Contact’s id information

number
string

Id number

Example:
809251833
issuing_country_code
string

Country code where id was issued

Example:
CYP
expiration_date
integer epoch

Id’s expiry date

Example:
1709295528
name_day
Object

Contact’s celebrated name day

day
integer

Day of the month

Example:
6
month
integer

Month of the year

Example:
8
date_of_birth
Object

Contact’s date of birth

day
integer

Day

Example:
1
month
integer

Month

Example:
3
year
integer

Year

Example:
1948
company_profile
Object
profile_year
integer nullable

Profile year

Example:
1980
annual_turnover
integer nullable

Company’s annual turnover

Example:
4005000
established_on
integer epoch nullable

Establishment date

Example:
62340925
number_of_employees
integer nullable

Number of people employeed by the company

Example:
200
registration_number
string nullable

Company’s registration number

Example:
EPM869233102
registration_country
string nullable
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
tax_reference_number
string nullable

The company’s tax reference number

Example:
TPS90398813
vat_registration_number
string nullable

The company VAT registration numnber

Example:
1206523T
industry_id
string GUID nullable

Id for company’s industry

Example:
69350edc-e0dc-4e2d-a8a1-8f26a2eacc09
industry_sectors
Array nullable

Ids for company’s industry sectors

string GUID
Example:
c43d9c79-2e47-44a1-9fd5-44da76c303e6
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
notes
string

Internal notes about the contact

Example:
This customer is an associate of Kerry Jackson.
interaction_status
string enum

The interaction status of the contact, retrieved by REDIS

Enumeration:
ENGAGED

A credit/debit transaction exists in the last 60 days

RESTING

A credit/debit transaction exists in the last 60-120 days

DORMANT

A credit/debit transaction exists in the last 120+ days

NEVER_ENGAGED

No credit/debit transactions exist

total_spend
number

The contact’s total spent amount in the last 12 months, retrieved from REDIS

Example:
245.06
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
credentials
Array

The contact’s authorisation credentials

Object
name
string

The name of the authorisation credential

Enumeration:
EMAIL
PHONE
FACEBOOK
GOOGLE
value
string

Authorised credential value

Example:
john.doe@gmail.com
is_verified
boolean

Have credentials been verified?

Example:
true
wallet
Object

Contact wallet information

id
string

Wallet id

Example:
3f91e3b1-7a0c-4ca3-9455-aa1bb8d51181
code
string

Wallet code

Example:
251432
anonymisation
Object

Defines wether a contact is anonymised, when and by whom

is_anonymised
boolean

Shows whether the contact is anonymised or not

Example:
false
date
integer

Date on which the contact was anonymised

Example:
1663064797
user
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
sales_model
Object

The sales model unique identifier used apply pricing policies for this contact

id
string

The sales model unique identifier

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
name
string

The sales model name

Example:
Retail
mrr
Object

The contact’s MRR metrics

total
number

The contact’s total MRR

Example:
12.11
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/9837ee37-a1ab-4a27-9b4b-663c9025a205 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9837ee37-a1ab-4a27-9b4b-663c9025a205",
    "code": "8047448052702285",
    "type": "COMPANY",
    "person_name": {
        "full_name": "Fernandes Louis Kozior",
        "first_name": "Fernandes",
        "middle_name": "Louis",
        "last_name": "Kozior"
    },
    "company_name": "Smith & Sons Ltd.",
    "phone": {
        "id": "5203665d-281d-ad97-6643-ae1038d2f6b7",
        "country_code": "CYP",
        "number": "99123456",
        "type": "LANDLINE"
    },
    "email_address": "fernandes@gmail.com",
    "addresses": [
        {
            "id": "0df9936c-7d5f-a878-4c05-9b942aa14295",
            "type": "ALTERNATIVE",
            "name": "Mum's house",
            "is_primary": true,
            "address_line_1": "21 Elia Papakyriakou",
            "address_line_2": "7 Stars Tower",
            "state_province_county": "Egkomi",
            "town_city": "Nicosia",
            "postal_code": "2415",
            "country_code": "CYP",
            "lat": 35.157115,
            "lon": 33.313719,
            "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
        }
    ],
    "language_code": "EN",
    "loyalty_identifiers": [
        {
            "id": "3311eb31-1f2c-5d8f-ae0d-d22595bbfb7a",
            "identifier": "100000001908"
        }
    ],
    "marketing_preferences": {
        "sms_opt_out": "true",
        "email_opt_out": "false"
    },
    "category": {
        "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
        "name": "Delivery Purchase"
    },
    "referral_code": "fa8f71",
    "country_of_agreement": "CYP",
    "is_tax_exempt": "false",
    "demographics": {
        "gender": "FEMALE",
        "statutory_number": "231224-8424406",
        "country_of_residence": "CYP",
        "passport": {
            "number": "AK123456",
            "issuing_country_code": "CYP",
            "expiration_date": 1677673128
        },
        "id_details": {
            "number": "809251833",
            "issuing_country_code": "CYP",
            "expiration_date": 1709295528
        },
        "name_day": {
            "day": 6,
            "month": 8
        },
        "date_of_birth": {
            "day": 1,
            "month": 3,
            "year": 1948
        }
    },
    "company_profile": {
        "profile_year": 1980,
        "annual_turnover": 4005000,
        "established_on": 62340925,
        "number_of_employees": 200,
        "registration_number": "EPM869233102",
        "registration_country": "CYP",
        "tax_reference_number": "TPS90398813",
        "vat_registration_number": "1206523T",
        "industry_id": "69350edc-e0dc-4e2d-a8a1-8f26a2eacc09",
        "industry_sectors": [
            "c43d9c79-2e47-44a1-9fd5-44da76c303e6"
        ]
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "Back Office"
        }
    ],
    "notes": "This customer is an associate of Kerry Jackson.",
    "interaction_status": "DORMANT",
    "total_spend": 245.06,
    "currency_code": "EUR",
    "credentials": [
        {
            "name": "EMAIL",
            "value": "john.doe@gmail.com",
            "is_verified": "true"
        }
    ],
    "wallet": {
        "id": "3f91e3b1-7a0c-4ca3-9455-aa1bb8d51181",
        "code": "251432"
    },
    "anonymisation": {
        "is_anonymised": "false",
        "date": 1663064797,
        "user": {
            "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
            "name": "John Smith",
            "username": "johnsmith@crm.com"
        }
    },
    "sales_model": {
        "id": "caf332bc-4e90-47b5-a05d-142b264897b9",
        "name": "Retail"
    }
}
List Contacts
GET /contacts

Retrieves the list of contacts (can be filtered based on contact attributes)

Notes

Recommended to be used when creating new Orders, Service Requests or Activities by external integrations (e.g. POS Integrators) to identify a contact

Request parameters

search_value
string optional

The value to be used for searching across Full Name, Company Name, Contact Code, Phone Number, Email Address, Loyalty Identifier, Serial number of a purchased/rental device (case insensitive) or Account number

Example:
L4211859
code
string optional

The contact code to search for

Example:
0171214760355764
person_name
string optional

The name of the contact to serach for, applicable only when searching for physical persons (‘person’ type contacts)

Example:
John Smith
company_name
string optional

The name of the company to serach for,aapplicable only when searching for companies (‘company’ type contacts)

Example:
CRM.COM
email_address
string optional

The email address of the contact to search for

Example:
john.smith@crm.com
phone_number
string optional

The phone number of the contact to search for

Example:
99123456
loyalty_identifier
string optional

The contact’s loyalty identifier to serach for

Example:
KMY30886AT
cim
string optional

Search using one of the contact’s identification mediums

Example:
T280223CAXKXIRL
country_of_agreement
string optional

Search using the contact’s country of agreement (useful in cases of multi-country setup)

Example:
CYP
registered_date
string optional

Filter based on the contact’s date of registration

Enumeration:
registered_date[gt]

Returns results where the registration date is greater than this value

registered_date[gte]

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

registered_date[lt]

Returns results where the registration date is less than this value

registered_date[lte]

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

type
string optional

Filter based on Contact type

Enumeration:
PERSON
COMPANY
owned_by
string GUID optional

Filter based on the unique identifier of the organisation that owns the contact

Example:
b8821635-09f6-9a97-7ef2-7f5b61c67bcb
custom_fields
string optional

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

Example:
key;value
tag_ids
string csv optional

Filter using a list of tag ids

include_tags
boolean optional

Defines whether tags should be retrieved or not

Example:
false
include_wallet
boolean optional

Include contact wallet information in the response?

include_gift_passes
boolean optional

If set to ‘true’ then any Gift passes redeemed by the contact will also be returned in the response

Example:
true
include_metrics
boolean optional

Retrieve metrics information in the response?

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
is_anonymised
boolean optional

Retrieve anonymised contacts

Example:
false
full_phone_number
string optional

The complete phone number of the contact which includes the country’s dial code

Example:
00035722123456
account_id
string optional

Search for a contact using their account information

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
sales_model_id
string optional

Search for a contact using one of the available sales models

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array
Object
id
string GUID

The unique contact identifier

Example:
14B48204E5B44589AE99CC351BC46A2A
code
string

The unique contact code

Example:
3517500846607727
type
string

Type of contact support types include Person and Company.

Enumeration:
PERSON
COMPANY
name
string

The contact’s full name (used for both ‘person’ and ‘company’ type contacts)

Example:
John Doe
email_address
string

The contact’s email address

Example:
john.doe@crm.com
phone
Object
id
string GUID

The phone identifier

Example:
5203665d-281d-ad97-6643-ae1038d2f6b7
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
number
string

The phone number

Example:
99123456
type
string
Enumeration:
LANDLINE
MOBILE
FAX
owned_by
string

The id of the organisation who owns the contact

Example:
bcca12e3-84c1-475e-a57b-35b5d85a8483
loyalty_identifiers
Array
Object
id
string

The unique id of the loyalty identifier (CIM)

Example:
3311eb31-1f2c-5d8f-ae0d-d22595bbfb7a
identifier
string

The loyalty identifier

Example:
100000001908
gift_passes
Array

The contact’s redeemed Gift passes (also used as a CIM). Available only if ‘include_gift_passes’ parameter was set to ‘true’

Object
code
string

The pass code

Example:
SIOT9W5GGKQQ4
statutory_number
string

The contact’s statutory number (if available)

Example:
0008569412
registered_on
integer epoch

Date of contact registration

Example:
1652342710
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
metrics
Object

Metrics information about the contact, available only if ‘include_metrics’ is set to ‘true’

subscriptions
integer

Number of subscriptions

Example:
1
reward_schemes
integer

Number of reward schemes

Example:
1
has_wallet
boolean

Does the contact have a wallet?

Example:
true
wallet
Object

Contact wallet information, subject to ‘include_wallet’ parameter

id
string

Wallet id

Example:
9837ee37-a1ab-4a27-9b4b-663c9025a205
code
string

Wallet code

Example:
6304407382072801
balances
Array

Wallet balance information, a balance per currency is returned

Object
type
string

Wallet type

Enumeration:
BUSINESS
Example:
BUSINESS
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
total
number

Wallet total balance

Example:
130
open
number

Wallet open balance (can be spent without restrictions)

Example:
95.15
commerce
number

Wallet commerce balance (may be subject to spend conditions)

Example:
34.85
sales_model
Object

The sales model of the contact

id
string

The sales model unique identifier

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
name
string

The sales model name which has to be unique across all sales models

Example:
Retail
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/contacts HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "14B48204E5B44589AE99CC351BC46A2A",
            "code": "3517500846607727",
            "type": "COMPANY",
            "name": "John Doe",
            "email_address": "john.doe@crm.com",
            "phone": {
                "id": "5203665d-281d-ad97-6643-ae1038d2f6b7",
                "country_code": "CYP",
                "number": "99123456",
                "type": "FAX"
            },
            "owned_by": "bcca12e3-84c1-475e-a57b-35b5d85a8483",
            "loyalty_identifiers": [
                {
                    "id": "3311eb31-1f2c-5d8f-ae0d-d22595bbfb7a",
                    "identifier": "100000001908"
                }
            ],
            "gift_passes": [
                {
                    "code": "SIOT9W5GGKQQ4"
                }
            ],
            "statutory_number": "0008569412",
            "registered_on": 1652342710,
            "custom_fields": [
                {
                    "key": "back_office",
                    "value": "Back Office"
                }
            ],
            "metrics": {
                "subscriptions": 1,
                "reward_schemes": 1,
                "has_wallet": true
            },
            "wallet": {
                "id": "9837ee37-a1ab-4a27-9b4b-663c9025a205",
                "code": "6304407382072801",
                "balances": [
                    {
                        "type": "BUSINESS",
                        "currency_code": "EUR",
                        "total": 130,
                        "open": 95.15,
                        "commerce": 34.85
                    }
                ]
            },
            "sales_model": {
                "id": "caf332bc-4e90-47b5-a05d-142b264897b9",
                "name": "Retail"
            },
            "tags": [
                {
                    "id": "609a369e-3f10-492a-8332-679ecbe56b65",
                    "name": "Maintenance",
                    "colour": "FR547F"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Delete Contact
DELETE /contacts/{id}

Permanently delete an existing contact, and completely remove all it’s details.

Path variables

id
string GUID required

Id of the contact to be deleted

Example:
473539a2-1cb9-4674-9260-d68d3d639b5c

Notes

  • Anything related to the contact is permanently deleted from the database, this action is not reversible
  • Contacts at the Service Owner (contact registry) level cannot be deleted
  • Contacts that were created for Businesses that use the Service Owner registry can be deleted at the Business level, BUT NOT at the contact registry level
  • Contacts who have rented devices on them (for subscription services), cannot be deleted until the devices have been returned
  • No financial validation checks whatsoever are applied prior to deleting a contact (e.g. any unpaid invoices are ignored) - Deleted contacts and their affected entities are excluded from analytics representations

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/contacts/473539a2-1cb9-4674-9260-d68d3d639b5c HTTP/1.1 

HTTP/1.1 204 No Content 
Activity Feed
GET /contacts/{id}/activity_feed
Get Contact Activity Feed
GET /contacts/{id}/activity_feed

Retrieve the Contact’s activity feed

Path variables

id
string GUID required

The contact identifier that the activity will be retrieved for

Example:
13cc9948-3560-e10a-e1e4-a73610054933

Request parameters

activity_type
string optional

Filter based on activity type

Enumeration:
INVOICE
PAYMENT
REFUND
CREDIT_NOTE
TOP_UP
TRANSFER
PURCHASE
AWARD
SPEND
ACHIEVEMENT
SERVICE_REQUEST
ACTIVITY
PAYOUT
REDEEM
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

page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10
sort
string optional

Defines on which attribute the results should be sorted

Default:
CREATED_DATE
Examples:
CREATED_DATEUPDATED_DATENAMESCHEDULED_DATE
order
string optional

Defines how the results will be ordered

Default:
DESC

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array

In some cases only parts of the response may be populated, depending on the type of activity

Object
id
string GUID

The unique activity identifier

Example:
0f7c6a42-68f9-bb46-f0d1-cf24a79f72e6
number
string

The entity’s number (e.g. an invoice number)

Example:
I10003
reference_number
string

The entity’s reference number (e.g. an invoice reference number)

Example:
7200685834808227
code
string

A code relevant to the entity

Example:
123456789ABE2364
state
string

The entity’s state

Example:
POSTED
created_date
integer epoch

The date and time the activity was created

Example:
1576486645
activity_type
string

The activity type

Enumeration:
INVOICE
PAYMENT
REFUND
CREDIT_NOTE
TOP_UP
TRANSFER
PURCHASE
AWARD
SPEND
ACHIEVEMENT
SERVICE_REQUEST
ACTIVITY
PAYOUT
REDEEM
type
string

The entity’s type name

Example:
Invoice
name ???
string

The activity name

notes
string

Notes accompanying the activity

Example:
This Invoice is created for November 2019
total_amount
number

The entity’s total amount

Example:
200
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
due_date
integer epoch

The entity’s due date in case of Invoices

Example:
1576486645
expiration_date
integer epoch

The entity’s expiration date in case of Awards

Example:
1576486645
reward_offer
string

The name of the reward offer that provided the award

Example:
Happy Birthday Offer
merchant_name
string

The name of the merchant that the activity was performed at

Example:
My Bakery Nicosia
top_up
Object

Top-up activity information

id
string GUID

The unique ID of the topped-up entity

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244
number
string

The number or code of the topped-up entity

Example:
AC00123 John Johnson
type
string

The type of the topped-up entity

Enumeration:
ACCOUNT
WALLET
transfer
Object

Relevant for transfer activities

origin
Object

Details of the entity where the transfer originated from (can be an account or wallet)

id
string

The unique id of the transfer origin entity

Example:
5ba60c8b-80b6-4972-9e38-1b1e06a0d307
number
string

The number or code of the transfer origin entity

Example:
AC00123
type
string

The type of the transfer origin entity

Enumeration:
ACCOUNT
WALLET
Example:
ACCOUNT
destination
Object

Details of the entity on the receiving end of the transfer

id
string

The unique id of the destiantion transfer entity (can be an account or wallet)

Example:
1eba06df-8e13-4976-a061-00d7215a1230
number
string

The number or code of the destination entity

Example:
8488574234381466
type
string

The type of the destination entity

Enumeration:
ACCOUNT
WALLET
Example:
WALLET
contact
Object

Details of the contact receiving the transferred funds

id
string

Id of the contact receiving transfer of funds

Example:
1667e557-078b-4e83-92b9-94e572492e37
name
string

The full name of the contact receiving the transfer

Example:
Jane Smith
code
string

The unique contact code of the contact receiving the transfer

Example:
6738001518510328
referred_by_contact
Object

The referred by contact details

id
string GUID

The referred by contact identifier

Example:
4bab629d-0d6b-f93b-4664-82cea61c1422
name
string

The referred by contact name

Example:
John Doe
ad_hoc_return
Object

The ad hoc return purchase details

reference_number
string

The ad hoc return reference number

Example:
qwewe234-dfsf234324-dwrwerw
date
integer epoch

The date that the ad hoc return is requested

Example:
1601636257
amount
number

The actual amount that the contact was debiterd due to ad hoc return

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

The amount that was returned

Example:
999.99
payment
Array

Payment method(s) information

Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
allocations
Array

How an entity is allocated (e.g. a credit note)

Object
id
string GUID

The financial transaction type unique identifier

name
string

The financial transaction type name

Example:
Purchase
purchase_discount
number

Purchase discount amount

Example:
2.4
owner
Object
id
string
Example:
&686786876HGHJDG
name
string
Example:
John Doe
priority
string
Enumeration:
URGENT
HIGH
MEDIUM
LOW
date
string

scheduled date

from_time
string
to_time
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
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/13cc9948-3560-e10a-e1e4-a73610054933/activity_feed HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "0f7c6a42-68f9-bb46-f0d1-cf24a79f72e6",
            "number": "I10003",
            "reference_number": "Ref12345678",
            "code": "123456789ABE2364",
            "state": "POSTED",
            "created_date": 1576486645,
            "activity_type": "ACTIVITY",
            "direction": "OUTGOING",
            "notes": "This Invoice is created for November 2019",
            "type": "INVOICE",
            "total_amount": 200,
            "currency_code": "EUR",
            "name": "",
            "due_date": 1576486645,
            "expiration_date": 1576486645,
            "reward_offer": "Happy Birthday Offer",
            "merchant_name": "Bakery Nicosia",
            "topup_entity": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "number": "AC00123 John Johnson",
                "type": "WALLET"
            },
            "transfer_origin_entity": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "number": "AC00123 John Johnson",
                "type": "ACCOUNT"
            },
            "transfer_dest_entity": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "number": "W00123 John Johnson",
                "type": "ACCOUNT",
                "contact": {
                    "id": "",
                    "name": "John Smith",
                    "code": "89904678"
                }
            },
            "referred_by_contact": {
                "id": "4bab629d-0d6b-f93b-4664-82cea61c1422",
                "name": "John Doe"
            },
            "ad_hoc_return": {
                "reference_number": "qwewe234-dfsf234324-dwrwerw",
                "date": 1601636257,
                "amount": 299.99,
                "currency_code": "EUR",
                "return_amount": 999.99
            },
            "payment": [
                {
                    "type": "ACCOUNT_DEBIT",
                    "identity": {
                        "id": "",
                        "identifier": "Visa *****1234 03/25"
                    }
                }
            ],
            "allocations": [
                {
                    "id": "",
                    "name": "Purchase"
                }
            ],
            "purchase_discount": 2.4,
            "financials": "",
            "owner": {
                "id": "&686786876HGHJDG",
                "name": "John Doe"
            },
            "priority": "LOW",
            "date": "",
            "from_time": "",
            "to_time": ""
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Address

Addresses related to a contact

POST /contacts/{id}/addresses
PUT /contacts/{id}/addresses/{address_id}
DELETE /contacts/{id}/addresses/{address_id}
GET /contacts/{id}/addresses/
Add Contact Address
POST /contacts/{id}/addresses

Add a new address to an existing contact. A contact can have multiple addresses but only one of them is the primary one.

Path variables

id
string GUID required

The contact identifier for which the address will be added

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244

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

Information about an address of the contact

type
string required

The address type. Many of the same type.

Enumeration:
HOME
BUSINESS
ALTERNATIVE
name
string nullable

A short address name so that it can be easily recognised in a list

Example:
Engomi office
is_primary
boolean nullable

Defines whether the address is the primary one (used for billing or communication purposes)

Default:
false
Example:
true
address_line_1
string required

The address line 1 (main address information

Example:
21 Elia Papakyriakou
address_line_2
string nullable

The address line 2 (additional information)

Example:
7 Stars Tower
state_province_county
string nullable

The address state/province/county

Example:
Egkomi
town_city
string nullable

The address town/city

Example:
Nicosia
postal_code
string nullable

The address postal code

Example:
2415
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
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 an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0

Responses

200 200

Successful Request

Body
Object
id
string GUID

The address identifier

Example:
9d1df8ce-cecd-d335-2b44-2644c9576e6f
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/61c943c8-dfeb-4c09-a25c-b054f48bf244/addresses HTTP/1.1 

Content-Type: application/json

{
    "type": "BUSINESS",
    "name": "Engomi office",
    "is_primary": "true",
    "address_line_1": "21 Elia Papakyriakou",
    "address_line_2": "7 Stars Tower",
    "state_province_county": "Egkomi",
    "town_city": "Nicosia",
    "postal_code": "2415",
    "country_code": "CYP",
    "lat": 35.157115,
    "lon": 33.313719,
    "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
Update Contact Address
PUT /contacts/{id}/addresses/{address_id}

Update an existing address of a contact

Path variables

id
string GUID required

The contact identifier for which the address will be updated

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244
address_id
string GUID required

The address identifier that will be updated

Example:
9f0508e7-ea4f-43f3-b260-ce55ab87fa8d

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

Information about an address of the contact

type
string required

The address type. Many of the same type.

Enumeration:
HOME
BUSINESS
ALTERNATIVE
name
string nullable

A short address name so that it can be easily recognised in a list

Example:
Engomi office
is_primary
boolean nullable

Defines whether the address is the primary one (used for billing or communication purposes)

Default:
false
Example:
true
address_line_1
string required

The address line 1 (main address information

Example:
21 Elia Papakyriakou
address_line_2
string nullable

The address line 2 (additional information)

Example:
7 Stars Tower
state_province_county
string nullable

The address state/province/county

Example:
Egkomi
town_city
string nullable

The address town/city

Example:
Nicosia
postal_code
string nullable

The address postal code

Example:
2415
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
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 an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0

Responses

200 200

Successful Request

Body
Object
id
string GUID

The address identifier

Example:
9f0508e7-ea4f-43f3-b260-ce55ab87fa8d
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/contacts/61c943c8-dfeb-4c09-a25c-b054f48bf244/addresses/9f0508e7-ea4f-43f3-b260-ce55ab87fa8d HTTP/1.1 

Content-Type: application/json

{
    "address_type": "HOME",
    "address_name": "Mum's house",
    "is_primary": "true",
    "address_line_1": "21 Elia Papakyriakou",
    "address_line_2": "7 Stars Tower",
    "state_province_county": "Egkomi",
    "town_city": "Nicosia",
    "postal_code": "2415",
    "country_code": "CYP",
    "lat": 35.157115,
    "lon": 33.313719,
    "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0",
    "care_of": "n/a"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9f0508e7-ea4f-43f3-b260-ce55ab87fa8d"
}
Delete Contact Address
DELETE /contacts/{id}/addresses/{address_id}

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

Path variables

id
string GUID required

The contact identifier for which an addresss will be removed

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244
address_id
string GUID required

The address identifier that will be removed

Example:
9f0508e7-ea4f-43f3-b260-ce55ab87fa8d

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/contacts/61c943c8-dfeb-4c09-a25c-b054f48bf244/addresses/9f0508e7-ea4f-43f3-b260-ce55ab87fa8d HTTP/1.1 

HTTP/1.1 204 No Content 
List Contact Addresses
GET /contacts/{id}/addresses/

Retrieves all addresses associated with a single contact.

Path variables

id
string required

Contact identifier

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
search_value
string optional

Value to search by name

Responses

200 OK
Body
Object
content
Array
Object
id
string GUID

The address identifier

Example:
0df9936c-7d5f-a878-4c05-9b942aa14295
type
string

The address type. Many of the same type.

Enumeration:
HOME
BUSINESS
ALTERNATIVE
name
string

A short address name so that it’s easily recognised in a list

Example:
Mum's house
is_primary
boolean

Defines whether the address is the primary one

Example:
true
address_line_1
string

The address line 1

Example:
21 Elia Papakyriakou
address_line_2
string

The address line 2

Example:
7 Stars Tower
state_province_county
string

The address state/province/county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country 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
Example 1
GET https://sandbox.crm.com/backoffice/v2/contacts/{id}/addresses/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "0df9936c-7d5f-a878-4c05-9b942aa14295",
            "type": "ALTERNATIVE",
            "name": "Mum's house",
            "is_primary": true,
            "address_line_1": "21 Elia Papakyriakou",
            "address_line_2": "7 Stars Tower",
            "state_province_county": "Egkomi",
            "town_city": "Nicosia",
            "postal_code": "2415",
            "country_code": "CYP",
            "lat": 35.157115,
            "lon": 33.313719,
            "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0",
            "care_of": "n/a"
        }
    ]
}
POST /contacts/{id}/anonymisation
Contact Anonymisation
POST /contacts/{id}/anonymisation

Contact Anonymisation is the process of encrypting or removing personally identifiable data from data sets so that the person can no longer be identified directly or indirectly. In order to successfully anonymise a Contact there atwo major pre-requisites:

  1. All accounts of the contact are terminated and this also implies that all account-based entities (e.g. financial transactions, subscirptions) are in a final state.
  2. The Contact’s Wallet does not have a balance. If contact requests for the data to be anonymised and there’s still money in the Wallet, then this money will be lost.

Path variables

id
string GUID required

The contact identifier that will be anonymised

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

Request body

Object
contact_id
string GUID

The contact unique identifier to whom the user will transfer the wallet money

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

Responses

200 200

Successful Request

Body
Object
id
string GUID

The entity identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/4dc0809f-ed91-4b68-b912-5bd6064d901e/anonymisation HTTP/1.1 

Content-Type: application/json

{
    "contact_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Attachment Files
POST /contacts/{id}/attachments
DELETE /contacts/{id}/attachments/{file_id}
GET /contacts/{id}/attachments
Add Contact Attachment
POST /contacts/{id}/attachments

Connect an uploaded file to an existing contact using a file (identifier) or URL

Path variables

id
string GUID required

The contact (identifier) that an attachment will be added

Example:
66451204-4404-894c-4dc6-486c540ece40

Notes

FILE UPLOAD FLOW

Integrating attachments upload for Contacts should be based on the following APIs

  1. Upload File Signature
  2. Add Contact Attachment

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 nullable

The uploaded file signature (identifier) to be attached (file or link should be provided)

Example:
60556f0c-1c94-45b5-01b8-4dc7fa72001a
link
string required nullable

The URL endpoint to be attached (file or link should be provided)

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
description
string nullable

The file description

Example:
contact screenshot

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The attachment identifier

Example:
66451204-4404-894c-4dc6-486c540ece40
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/66451204-4404-894c-4dc6-486c540ece40/files HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "file_id": "30526723-24a3-e4e3-1a75-b26b1b41f05c",
    "description": "Screenshot sent by contact"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "66451204-4404-894c-4dc6-486c540ece40"
}
Delete Contact Attachment
DELETE /contacts/{id}/attachments/{file_id}

Delete a specific contact attachment

Path variables

id
string GUID required

The contact (identifier) whose attachment will be deleted

Example:
66451204-4404-894c-4dc6-486c540ece40
file_id
string GUID required

The attachment (identifier) that will be delted

Example:
04c0bebd-8bb0-0b3e-e1a6-716a0fd200b1

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/contacts/66451204-4404-894c-4dc6-486c540ece40/files/04c0bebd-8bb0-0b3e-e1a6-716a0fd200b1 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Contact Attachments
GET /contacts/{id}/attachments

Retrieve all attachment files for a specific contact

Path variables

id
string GUID required

The contact (identifier) that attachments will be retrieved

Example:
66451204-4404-894c-4dc6-486c540ece40

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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The attachement identifier

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

The attachement description

Example:
Screenshot sent by customer
file
Object

The attached file

id
string GUID

The attached file identifier

Example:
0317868f-28f8-9f56-d248-5a78718b38cc
url
string

The attached file URL endpoint

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
name
string

The attached file name

Example:
img.png
mime
string

The mime type of the uploaded file

Enumeration:
csv
doc
docx
xls
xlsx
pdf
log
txt
png
jpg
jpeg
svg
link
string

The attached URL endpoint

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
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/66451204-4404-894c-4dc6-486c540ece40/files HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "3ae9d64a-8a3b-f1e1-eed6-05b307f926fb",
            "description": "Screenshot sent by customer",
            "file": {
                "id": "0317868f-28f8-9f56-d248-5a78718b38cc",
                "url": "https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug",
                "name": "img.png",
                "mime": "docx"
            },
            "url": "https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Authentication
POST /contacts/{id}/otp
POST /contacts/{id}/validate_otp
Request One Time Password
POST /contacts/{id}/otp

Request a one-time-password for a specific contact. The request sends an outbound validation number that can be used to verify the contact.

Path variables

id
string GUID required

The contact (identifier) that a one-time-password will be created for

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

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
method
string

Defines how one time password will be sent

Enumeration:
EMAIL

Send otp to contact’s email address

SMS

Send otp to contact’s phone number

Example:
EMAIL

Responses

200 OK

The request has succeeded

Body
Object
obfuscated_value
string

The obfuscated value of the email or sms used to send the otp

Example:
+35799***834
auth_otp
string

The one time password authentication identifier

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

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

401 Unauthorized

The 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/33749faa-4ef0-426d-f9f0-83b91bf5ab3f/otp HTTP/1.1 

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

{
    "method": "SMS"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "obfuscated_value": "+35799***834",
    "auth_otp": "731e4023-4c04-4278-8eb5-240651317e46"
}
Validate One Time Password
POST /contacts/{id}/validate_otp

Verifies an one time password that was sent to contact

Path variables

id
string required

The contact (identifier) for which the one-time-password will be validated

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
auth_otp
string

The one time password authentication identifier as generated on one time password request

Example:
47c7-318202dbe45d
code
string

The one time password that was sent to the contact and should be used for verification purposes

Example:
654321

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/contacts/{id}/validate_otp HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "auth_otp": "47c7-318202dbe45d",
    "code": "654321"
}

HTTP/1.1 204 No Content 
Organisation Operations
POST /contacts/{id}/organisations
Sign up/out Organisation
POST /contacts/{id}/organisations

Contact joins an existing organisation

Path variables

id
string GUID required

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

Example:
0b2c2111-0294-59f1-8a39-92039444a2f6

Notes

CONTACT REGISTRY

Contacts should belong to the service owner registry and via API integration a user can sign up/off such contacts to/from a business that utilise such service owner contact registry

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 action that should be applied on the organisation

Enumeration:
SIGN_UP
SIGN_OFF
Example:
SIGNUP
organisation_id
string GUID required

The organisation identifier that the action will be applied

Example:
db50a590-7de3-3b2d-33a6-91a25e83d3e6
service_acceptance
string nullable

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

Default:
true
Example:
true
email_opt_out
string nullable

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

Default:
false
Example:
true
sms_opt_out
string nullable

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

Default:
false
Example:
true
consent_state
string nullable

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

Enumeration:
ACCEPTED
PENDING
REJECTED
WITHDRAWN
Example:
ACCEPTED

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
Example 2
POST https://sandbox.crm.com/backoffice/v1/contacts/0b2c2111-0294-59f1-8a39-92039444a2f6/organisations HTTP/1.1 

Content-Type: application/json

{
    "action": "SIGNUP",
    "organisation_id": "db50a590-7de3-3b2d-33a6-91a25e83d3e6",
    "service_acceptance": "true",
    "email_opt_out": "false",
    "sms_opt_out": "false",
    "consent_state": "ACCEPTED",
    "referral_code": "1234"
}

HTTP/1.1 200 OK 
POST https://sandbox.crm.com/backoffice/v1/contacts/0b2c2111-0294-59f1-8a39-92039444a2f6/organisations HTTP/1.1 

Content-Type: application/json

{
    "action": "SIGNOFF",
    "organisation_id": "db50a590-7de3-3b2d-33a6-91a25e83d3e6"
}

HTTP/1.1 200 OK 
Loyalty Identifiers
POST /contacts/{id}/loyalty_identifiers
DELETE /contacts/{id}/loyalty_identifiers/{loyalty_id}
GET /contacts/{id}/loyalty_identifiers
Add Loyalty Identifier
POST /contacts/{id}/loyalty_identifiers

Add a new loyalty identifier to an existing contact. A contact can have multiple loyalty identifiers. A contact’s loyalty identifiers must be unique (per contact).

Path variables

id
string GUID required

The contact (identifier) whose loyalty identifier will be created

Example:
731a8b58-46de-654d-3e45-0c3f90970da2

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
identifier
string required

The loyalty identifier

Example:
123234345624356213

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The loyalty identifier (CIM)

Example:
891d84dd-4b3b-84b3-ba87-aa63fed3b88a
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/731a8b58-46de-654d-3e45-0c3f90970da2/loyalty_identifiers HTTP/1.1 

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

{
    "identifier": "123234345624356213"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "891d84dd-4b3b-84b3-ba87-aa63fed3b88a"
}
Delete Loyalty Identifier
DELETE /contacts/{id}/loyalty_identifiers/{loyalty_id}

Removes a contact loyalty identifier. A single loyalty identifier can be removed at a time

Path variables

id
string GUID required

The contact (identifier) whose loyalty identifier will be removed

Example:
1be1fa96-1d76-6227-c603-e751d15ff424
loyalty_id
string GUID required

The loylaty (identifier) (CIM based) that will be removed

Example:
7449929f-f297-8400-2f22-65b1f624130f

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/contacts/1be1fa96-1d76-6227-c603-e751d15ff424/loyalty_identifiers/7449929f-f297-8400-2f22-65b1f624130f HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 204 No Content 
List Loyalty Identifiers
GET /contacts/{id}/loyalty_identifiers

Retrieve the loyalty identifiers for a specific contact

Path variables

id
string GUID required

The contact (identifier) whose loyalty identiers will be retrieved

Example:
7449929f-f297-8400-2f22-65b1f624130f

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 loyalty identifier (CIM) identifier

Example:
1adaae9e-6dbb-f389-e5d0-8288f0c87a62
identifier
string

The loyalty identifier

Example:
2143454566754
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/7449929f-f297-8400-2f22-65b1f624130f/loyalty_identifiers HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "1adaae9e-6dbb-f389-e5d0-8288f0c87a62",
            "identifier": "2143454566754"
        }
    ]
}
Payment Methods

Allow for management of payment methods for contacts.

POST /contacts/{id}/payment_methods
PUT /contacts/{id}/payment_methods/{payment_method_id}
DELETE /contacts/{id}/payment_methods/{payment_method_id}
GET /contacts/{id}/payment_methods
Add Payment Method
POST /contacts/{id}/payment_methods

Add a new payment method for a contact. The payment method’s details will be passed to a Payment Gateway Integrator

Path variables

id
string required

The contact’s unique identifier

Example:
2e58e67a-b551-4780-bd7a-7b065447a799

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

A short name for the payment method

type
string

Only Account Debits can be added as payment methods via the back-end

Enumeration:
ACCOUNT_DEBIT
CARD
WALLET
is_primary
boolean

If the payment method being added is the first one for the contact, then it will automatically become the primary payment method. If another primary method exists, then the new payment method becomes the primary.

is_backup
boolean

If another backup payment method exists, then the new payment method becomes the backup

notes
string

Payment method notes

account_debit
Object

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

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

Id of newly created payment method

Example:
2964aaff-df07-4798-b585-82a813800b3e
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/contacts/{id}/payment_methods HTTP/1.1 

Content-Type: application/json

{
    "name": "",
    "type": "CARD",
    "is_primary": true,
    "is_backup": true,
    "notes": "",
    "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": "",
        "account_holder_details": {
            "account_holder_name": "",
            "address_line_1": "",
            "address_line_2": "",
            "address_state": "",
            "address_city": "",
            "address_zip": "",
            "address_coutry": "",
            "use_billing_address": true
        },
        "country": "CY",
        "currency": "EUR"
    },
    "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"
            }
        ]
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

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

Update a payment method for a contact

Path variables

id
string required
payment_method_id
string required

The payment method id to be updated

Example:
9f0508e7-ea4f-43f3-b260-ce55ab87fa8d

Notes

JCC Merchant Gateway

  • Perform Fingerprint to retrieve the card masked & hashed numbers and the country of issue
  • Set the retrieved masked number, hashed number and country of issue on the related “card” collection

Settle Gateway

  • Set the phone country code, phone number and msisdn (phone country + number) on the related “phone” collection

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

Payment method short name

is_primary
boolean

Marks the payment method as the contact’s primary payment method

is_backup
boolean

Marks the payment method as the backup payment method

account_debit
Object

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
country
string

The country the bank account is located in.

Example:
CY
mandate
Object
reference
string
sign_date
integer
termination_date
integer
type
string

The mandate (sequence) type

Enumeration:
FIRST
FINAL
RECURRING
ONEOFF
currency
string
Example:
EUR
account_type
string

The type of the event

Enumeration:
SAVINGS
CHECKING
BUSINESS_CHECKING
Example:
SAVINGS
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
notes
string

Notes related to the payment method

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated payment method

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/contacts/880e68ca-d42b-4ead-a6c6-34a39b9149e0/payment_methods/9f0508e7-ea4f-43f3-b260-ce55ab87fa8d HTTP/1.1 

Content-Type: application/json

{
    "name": "",
    "is_primary": true,
    "is_backup": true,
    "account_debit": {
        "account_name": "",
        "account_number": "001002001",
        "iban": "0143240434320434",
        "bank": "Barclays",
        "bank_code": "0032933-1123",
        "branch": "Ascot",
        "swift": "12345678",
        "sort_code": "20-02-53",
        "country": "CY",
        "mandate": {
            "reference": "",
            "sign_date": 1
        },
        "currency": "EUR",
        "account_type": "SAVINGS",
        "account_holder_details": {
            "account_holder_name": "",
            "address_line_1": "",
            "address_line_2": "",
            "address_state": "",
            "address_city": "",
            "address_zip": "",
            "address_coutry": "",
            "use_billing_address": true
        }
    },
    "wallet": "",
    "notes": ""
}
Delete Payment Method
DELETE /contacts/{id}/payment_methods/{payment_method_id}

Deletes a payment method for a contact

Path variables

id
string required

The id of the contact

Example:
9f0508e7-ea4f-43f3-b260-ce55ab87fa8d
payment_method_id
string required

The id of the payment method.

Example:
880e68ca-d42b-4ead-a6c6-34a39b9149e0

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/v1/contacts/JGKDJHAK76786JUGJHDG/payment_methods/SHDGJKSHDJKHS86876HGFHDGSFHSF HTTP/1.1 
List Payment Methods
GET /contacts/{id}/payment_methods

Retrieves all payment methods for a single contact

Path variables

id
string GUID required

The contact identifier whose payment methods will be retrieved

Example:
880e68ca-d42b-4ead-a6c6-34a39b9149e0

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
type
string optional

Filters the contact’s payment methods based on type

Enumeration:
CARD

Credit/Debit/Prepaid cards

WALLET

Wallet related to either a card, bank account or has a monetary value

ACCOUNT_DEBIT

Collect money directly from an account

Example:
CARD
is_primary
boolean optional

Filter using primary payment methods

Example:
true
is_backup
boolean optional

Filter using backup payment methods

Example:
false

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The payment method identifier

Example:
2e58e67a-b551-4780-bd7a-7b065447a799
name
string

USED?

is_primary
boolean

Indicates the contact’s primary payment method

Example:
true
is_backup
boolean

Indicates the contact’s backup payment method

Example:
false
payment_method_type
string

The type of the event

Enumeration:
CARD

Credit/Debit/Prepaid cards

WALLET

Wallet related to either a card, bank account or has a monetary value

ACCOUNT_DEBIT

Collect money directly from an account

Example:
CARD
card
Object

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
funding_type
string

The type of the event

Enumeration:
CREDIT
DEBIT
PREPAID
Example:
CREDIT
first6
string

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

last4
string

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

expiration_month
integer

The card expiration month

Example:
1
expiration_year
integer

The card expiration year

Example:
2020
country_of_issue
string

The card issue country (3 char country code)

Example:
CYP
cvc
string
card_holder_details
Object

Information about the card holder

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
Object
token
string
gateway
string nullable
Enumeration:
JCC
JCC_MERCHANT
SETTLE
integration
Object nullable
id
string
name
string
account_debit
Object

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

account_name
string
account_number
string

The bank account number.

Example:
001002001
iban
string

The IBAN code.

Example:
0143240434320434
bank
string

The name of the customer’s bank

Example:
Barclays
bank_code
string

Institution number of the customer’s bank.

Example:
0032933-1123
branch
string

The identifier of the bank branch

Example:
Ascot
swift
string

The bank account swift number

Example:
12345678
sort_code
string

The sort code

Example:
20-02-53
country
string

The country the bank account is located in.

Example:
CY
currency
string
Example:
EUR
account_type
string

The type of the event

Enumeration:
SAVINGS
CHECKING
BUSINESS_CHECKING
Example:
SAVINGS
mandate
Object
reference
string
sign_date
integer
termination_date
integer
type
string

The mandate (sequence) type

Enumeration:
FIRST
FINAL
RECURRING
ONEOFF
account_holder_details
Object
account_holder_name
string
address_line_1
string
address_line_2
string
address_city
string
address_state
string
address_zip
string
address_country
string
gateway_token
Array
Object
token
string
gateway
string nullable
Enumeration:
JCC
JCC_MERCHANT
SETTLE
integration
Object nullable
id
string
name
string
wallet
Object

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

email
string nullable

The email used when registering to the walled-based payment method

Example:
jsmith@email.com
phone
Object nullable

The phone used when registering to the walled-based payment method

name
string
country_code
string
number
string
msisdn
string
gateway_token
Array
Object
token
string
gateway
string nullable
Enumeration:
JCC
JCC_MERCHANT
SETTLE
integration
Object nullable
id
string
name
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
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/880e68ca-d42b-4ead-a6c6-34a39b9149e0/payment_methods HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "2e58e67a-b551-4780-bd7a-7b065447a799", 
            "name": "",
            "is_primary": true,
            "is_backup": "false",
            "payment_method_type": "CARD",
            "card": {
                "name": "Default Card",
                "brand": "VISA",
                "funding_type": "CREDIT",
                "first6": "",
                "last4": "",
                "expiration_month": 1,
                "expiration_year": 2020,
                "country_of_issue": "CYP",
                "cvc": "",
                "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": [
                    {
                        "token": "",
                        "gateway": "JCC",
                        "integration": {
                            "id": "",
                            "name": ""
                        }
                    }
                ]
            },
            "account_debit": {
                "account_name": "",
                "account_number": "001002001",
                "iban": "0143240434320434",
                "bank": "Barclays",
                "bank_code": "0032933-1123",
                "branch": "Ascot",
                "swift": "12345678",
                "sort_code": "20-02-53",
                "country": "CY",
                "currency": "EUR",
                "account_type": "SAVINGS",
                "mandate": {
                    "reference": "",
                    "sign_date": 1,
                    "termination_date": 1
                },
                "account_holder_details": {
                    "account_holder_name": "",
                    "address_line_1": "",
                    "address_line_2": "",
                    "address_city": "",
                    "address_state": "",
                    "address_zip": "",
                    "address_country": ""
                },
                "gateway_token": [
                    {
                        "token": "",
                        "gateway": "SETTLE",
                        "integration": {
                            "id": "",
                            "name": ""
                        }
                    }
                ]
            },
            "wallet": {
                "email": "jsmith@email.com",
                "phone": {
                    "name": "",
                    "country_code": "",
                    "number": "",
                    "msisdn": ""
                },
                "gateway_token": [
                    {
                        "token": "",
                        "gateway": "SETTLE",
                        "integration": {
                            "id": "",
                            "name": ""
                        }
                    }
                ]
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Communities
POST /contacts/{id}/people
PUT /contacts/{id}/people/{people_id}
DELETE /contacts/{id}/people/{people_id}
GET /contacts/{id}/people
Add Community Person
POST /contacts/{id}/people

Add a new person to a contact’s community

Path variables

id
string GUID required

The contact (identifier) whose community will be updated by adding a new person

Example:
41531d41-2a77-fc41-5643-d84dfbefc1ff

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

Object
contact_id
string GUID required nullable

The existing contact (identifier) that will be added as a member to the (parent) contact community (contact id or contact should be specified)

Example:
6428e180-f2e0-268d-5a96-e16a22569e91
contact
Object required nullable

The new contact that will be created and will be added as a member to the (parent) contact community (contact id or contact should be specified)

first_name
string required

The contact first name

Example:
John
last_name
string required

The contact last name

Example:
Doe
email_address
string nullable

The contact email address

Example:
johndoe@crm.com
phone
Object nullable

The contact phone

country_code
string

The phone country code

Example:
CYP
number
string

The phone number

Example:
22265566
relation_id
string GUID required

The community relation (identifier) that will be assigned to the new contact member

Example:
d0eec134-784e-7289-2aa5-32d5323d6e7a
is_admin
boolean required

Defines whether the new contact member will have full permissions

Default:
false
Example:
true
permissions
Array nullable

Defines the (explicit) allowed permissions that the new contact member will have

string
Example:
VIEW_CONTACTS

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The community relation identifier

Example:
9dcc93dd-4698-afaf-1296-f22824bb5da8
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/contacts/41531d41-2a77-fc41-5643-d84dfbefc1ff/people HTTP/1.1 

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

{
    "contact": {
        "first_name": "John",
        "last_name": "Doe",
        "email_address": "johndoe@crm.com",
        "phone": {
            "country_code": "CYP",
            "number": "22265566"
        }
    },
    "relation_id": "d0eec134-784e-7289-2aa5-32d5323d6e7a",
    "is_admin": "true",
    "permissions": [
        "VIEW_CONTACTS"
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "9dcc93dd-4698-afaf-1296-f22824bb5da8"
}
Update Community Person
PUT /contacts/{id}/people/{people_id}

Update an existing person in a contact’s community

Path variables

id
string GUID required

The contact (identifier) whose community will be updated

Example:
719ee10e-a6c3-68b3-d5bf-30473eacd927
people_id
string GUID required

The community person (identifier) that will be updated

Example:
f3ef1fc1-afc8-d3b4-3a6d-3a299acb454c

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

Object
relation_id
string GUID nullable

The community relation (identifier) that will be assigned to the existing contact member

Example:
bfd3cc67-2a4b-2900-6fcc-2ad3341f5495
is_admin
boolean nullable

Defines whether the existing contact member will have full permissions

Example:
false
permissions
Array nullable

Defines the (explicit) allowed permissions that the existing contact member will have

string
Example:
VIEW_CONTACTS

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The community relation identifier

Example:
f3ef1fc1-afc8-d3b4-3a6d-3a299acb454c
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/contacts/719ee10e-a6c3-68b3-d5bf-30473eacd927/people/f3ef1fc1-afc8-d3b4-3a6d-3a299acb454c HTTP/1.1 

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

{
    "relation_id": "bfd3cc67-2a4b-2900-6fcc-2ad3341f5495",
    "is_admin": "false",
    "permissions": [
        "VIEW_CONTACTS"
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "f3ef1fc1-afc8-d3b4-3a6d-3a299acb454c"
}
Delete Community Person
DELETE /contacts/{id}/people/{people_id}

Delete an existing person from a contact’s community

Path variables

id
string GUID required

The contact (identifier) whose community will be updated, by removing an existing member

Example:
5c6de428-9acb-9648-c0ec-5cbcb5dec714
people_id
string GUID required

The community person (identifier) that will be deleted

Example:
0650dff4-53e8-601b-170f-bf522df18f81

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/contacts/5c6de428-9acb-9648-c0ec-5cbcb5dec714/people/0650dff4-53e8-601b-170f-bf522df18f81 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Community People
GET /contacts/{id}/people

Lists all people that a contact’s community has

Path variables

id
string GUID required

The contact (identifier) whose community people will be retrieved

Example:
323a12a6-90e4-fa30-caa4-63e9552ffb10

Request parameters

type
string optional

Filter based on whether the contact is a parent or a member in a community

Enumeration:
PARENT

Retrieve all contact communities that such contact is a member to

MEMBER

Retrieve all contacts that are members to such contact’s community

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 contact relationship identifier

Example:
323a12a6-90e4-fa30-caa4-63e9552ffb10
contact
Object

The contact (parent or member in the respective community)

id
string GUID

The contact identifier

Example:
19e631ac-4123-1099-d207-2a70fb126186
first_name
string

The contact first name

Example:
John
last_name
string

The contact last name

Example:
Doe
email
string

The contact email address

Example:
johndoe@crm.com
phone
Object

The contact phone number

country_code
string

The phone country code

Example:
CYP
number
string

The phone number

Example:
22265566
relation
Object

The community relation that the contact has

id
string GUID

The community relation identifier

Example:
9aabba32-82e3-441f-969a-103d81e2f91f
name
string

The community relation name

Example:
Employees
is_admin
boolean

Defines whether the contact member will have full permissions

Example:
false
permissions
Array

Defines the (explicit) allowed permissions that the new contact member will have

string
Example:
VIEW_CONTACTS
type
string

Defines whether the contact is a parent or a member in a community

Enumeration:
PARENT
MEMBER
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/323a12a6-90e4-fa30-caa4-63e9552ffb10/people HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "323a12a6-90e4-fa30-caa4-63e9552ffb10",
            "contact": {
                "id": "19e631ac-4123-1099-d207-2a70fb126186",
                "first_name": "John",
                "last_name": "Doe",
                "email": "johndoe@crm.com",
                "phone": {
                    "country_code": "CYP",
                    "number": "22265566"
                }
            },
            "relation": {
                "id": "9aabba32-82e3-441f-969a-103d81e2f91f",
                "name": "Employees"
            },
            "is_admin": "false",
            "permissions": [
                "VIEW_CONTACTS"
            ],
            "type": "MEMBER"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Rewards
GET /contacts/{id}/rewards
PUT /contacts/{id}/rewards
POST /contacts/{id}/reward_schemes
Get Contact Rewards
GET /contacts/{id}/rewards

Retrieve a contact’s reward details

Path variables

id
string GUID required

The contact (identifier) whose reward details will be retrieved

Example:
d12b5b30-98f1-12fb-53db-23c05cfe264a

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

Details about sign up

date
string epoch

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

Example:
1647851718
organisation
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
spend_blocked
Object

Details about whether the contact can spend or not

status
boolean

Defines whether the contact can spend or not

Example:
true
date
integer epoch

The date that the contact’s spend blockage was updated

Example:
1583846865
user
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
reward_tier
Object

Details about the reward tier.

id
string GUID

The reward tier identifier

Example:
0c85a6e0-6b97-63d8-5c9c-adf0efdf00fc
name
string

The reward tier name

Example:
Gold
color
string

The designated hexadecimal code of the tier’s color

Example:
#d4af37
period_value_units
number

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

Example:
222
lifetime_value_units
number

The overall accumulated value units

Example:
333
progress
Array

Details about the progression percentage for each reward tier

Object
percentage
number

The progression percentage until the reward tier

Example:
45.98
tier
Object

Details about the reward tier

id
string GUID

The reward tier identifier

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

The reward tier name

Example:
Gold
value_units
integer

The tier (threshold) value units (inclusive)

Example:
2500
remaining_value_units
integer

The remaining value units to reach this tier

Example:
123
reward_schemes
Array

Information about the already signed up reward schemes

Object
id
string GUID

The reward scheme identifier

Example:
6f0cb034-7e0c-cdc8-3f62-d734d54aab56
name
string

The reward scheme name

Example:
CRMdotCOM Scheme
signed_up_on
integer epoch

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

Example:
1583846865
email_address
string

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

Example:
johndoe@crm.com
sign_up_option
string

Defines how customers can sign up to the reward scheme

Enumeration:
AUTO_SIGN_UP

Contacts will sign up upon registration automatically

SELF_SIGN_UP

Contacts can sign up manually

CLOSED_SIGN_UP

Contacts can be signed up on a selective and controlled manner (request to sign up), usually based on domain specific emails

Default:
SELF_SIGN_UP
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/accounts/d12b5b30-98f1-12fb-53db-23c05cfe264a/rewards HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "d12b5b30-98f1-12fb-53db-23c05cfe264a",
    "sign_up_on": 1583846865,
    "sign_up_organisation": {
        "id": "7d65bf09-9385-a2a4-c069-1df91e5e9c26",
        "name": "CRMdotCOM"
    },
    "spending_blocked_status": "false",
    "spending_blocked_date": 1583846865,
    "spending_blocked_user": {
        "id": "57a23a0f-dee5-9a18-2edc-2dca904e3712",
        "email_address": "johndoe@crm.com",
        "first_name": "John",
        "last_name": "Doe"
    },
    "reward_tier": {
        "id": "0c85a6e0-6b97-63d8-5c9c-adf0efdf00fc",
        "name": "Gold",
        "color": "#d4af37",
        "period_value_units": 222,
        "lifetime_value_units": 333,
        "tier_progression": [
            {
                "percentage": 45.98,
                "tier": {
                    "id": "41ed2390-4058-81a2-d41b-18acaea22c84",
                    "name": "Gold"
                },
                "value_units": 2500,
                "remaining_value_units": 123
            }
        ]
    },
    "joined_reward_schemes": [
        {
            "id": "6f0cb034-7e0c-cdc8-3f62-d734d54aab56",
            "name": "CRMdotCOM Scheme",
            "signed_up_on": 1583846865,
            "email_address": "johndoe@crm.com",
            "sign_up_option": "CLOSE_LOOP_SIGN_UP"
        }
    ]
}
Update Contact Rewards
PUT /contacts/{id}/rewards

Update the reward details of a contact

Path variables

id
string GUID required

The contact (identifier) whose reward details will be updated

Example:
d12b5b30-98f1-12fb-53db-23c05cfe264a

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
signed_up
Object nullable

The date that the contact first signed up

date
integer epoch nullable

The date that the contact first signed up

Example:
1647852385
organisation
Object nullable

The organisation that signed up the contact (first time)

id
string GUID required

The organisation identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
spend_blocked
boolean nullable

Defines whether the spending is blocked for the specific contact

Example:
true

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
d12b5b30-98f1-12fb-53db-23c05cfe264a
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/contacts/d12b5b30-98f1-12fb-53db-23c05cfe264a/rewards HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "signed_up": {
        "date": 1647852385,
        "organisation": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    },
    "spend_blocked": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "d12b5b30-98f1-12fb-53db-23c05cfe264a"
}
Contact Reward Schemes Actions
POST /contacts/{id}/reward_schemes

Sign up/out a contact from/to a reward scheme

Path variables

id
string GUID required

The contact (identifier) that will be signed up/out to/from a reward scheme

Example:
84842636-0779-ba89-8757-7c3c74af6bf6

Notes

BACK-END MANAGEMENT OF REWARD SCHEMES
  • A user can sign up a contact only to auto-sign up and self-sign up reward schemes.
  • A user can sign out a contact from any type of reward schemes.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
actions
string

The action that should be applied for the reward scheme

Enumeration:
SIGN_UP
SIGN_OUT
Example:
SIGN_UP
reward_scheme_id
string GUID required

The reward scheme that the contact has signed up

Example:
a66ebb30-4e81-e301-e37d-1c5502af65b0
sign_up_date
integer epoch nullable

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

Example:
1589796854

Responses

201 Created

The request was successful

Body
Object
id
string GUID

The reward scheme identifier

Example:
a66ebb30-4e81-e301-e37d-1c5502af65b0
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
Example 2

Sign up to a reward scheme

POST https://sandbox.crm.com/backoffice/v1/contacts/84842636-0779-ba89-8757-7c3c74af6bf6/reward_schemes HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "reward_scheme_id": "a66ebb30-4e81-e301-e37d-1c5502af65b0"
}

HTTP/1.1 201 Created

Content-Type: application/json

{
    "id": "a66ebb30-4e81-e301-e37d-1c5502af65b0"
}

Sign out from a reward scheme

POST https://sandbox.crm.com/backoffice/v2/contacts/84842636-0779-ba89-8757-7c3c74af6bf6/reward_schemes HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "actions": "SIGN_OUT",
    "reward_scheme_id": "a66ebb30-4e81-e301-e37d-1c5502af65b0"
}

HTTP/1.1 204 No Content 
Statement

A Contact’s statement is a financial analysis of all financial events performed by or for the contact within a period of time. It includes an opening balance of an account along with all financial events logged for that period and

GET /contacts/{id}/statement
GET /contacts/{id}/statement_details
POST /contacts/{id}/export_statement
Get Statement
GET /contacts/{id}/statement

Retrieves all financial events of a Contact based on an account and the selected period for the signed-in organisation. Used in conjunction with Get Account Statement Details to produce the complete Contact statement.

Path variables

id
string GUID required

The contact identifier to retrieve account balances for

Example:
76D7A65ACCE45B2E68DFDCAD1E31269B

Request parameters

account_id
string optional

Contact’s account id to retrieve balance information for

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/contacts/76D7A65ACCE45B2E68DFDCAD1E31269B/statement HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c8079ee1-8081-4be1-ab09-5091f55b2d4e",
    "number": "A3900853",
    "currency_code": "EUR",
    "period": {
        "month": {
            "from": 3,
            "to": 3
        },
        "year": {
            "from": 2022,
            "to": 2022
        }
    },
    "opening_balance": 100.56,
    "closing_balance": 157.8,
    "total_credits": 84.05,
    "total_debits": 26.81,
    "ageing_analysis": {
        "balance": 99.99,
        "buckets": {
            "121": 96.03,
            "1_30": 0.99,
            "31_60": 0.99,
            "61_90": 0.99,
            "91_120": 0.99
        }
    }
}
Get Statement Details
GET /contacts/{id}/statement_details

Retrieves all the statement detail lines for a single Contact, for the given period, used in conjunction with Get Accounts Statement API to create a Contact statement

Path variables

id
string GUID required

The contact identifier for which to retrieve account journals for

Example:
76D7A65ACCE45B2E68DFDCAD1E31269B

Request parameters

account_id
string optional

Contact’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/contacts/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": "INVOICE",
                "number": "90508992",
                "id": "61c943c8-dfeb-4c09-a25c-b054f48bf244"
            },
            "details": "Sally's Flower Shop",
            "running_balance": 14.99
        }
    ]
}
Export Statement
POST /contacts/{id}/export_statement

Use this API to export the contact 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 contact 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"
}
Tags

The following APIs are used to manage tags for contacts. Tags are used to label contacts with one or more keywords so that it can be easily located/filtered when necessary.

PUT /contacts/{id}/tags
GET /contacts/{id}/tags
Update Contact Tags
PUT /contacts/{id}/tags

Update the tags associated with the contact

Path variables

id
string GUID required

The contact (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 contact 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/contacts/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 Contact Tags
GET /contacts/{id}/tags

Retrieve a list of tags that are associated with the contact

Path variables

id
string GUID required

The contact (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/contacts/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"
        }
    ]
}
Contact Identities
GET /contacts/{id}/identities
List Contact Identities
GET /contacts/{id}/identities

Retrieve a list of contact identities based on search criteria (e.g. all contact identities)

Path variables

id
string GUID required

The contact (identifier) whose identities will be retrieved

Example:
5fa7ff61-a960-cfa3-2f93-68a67058489a

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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The contact identity identifier

Example:
09e4d464-3bae-1eab-1c7c-9166979300fd
type
string

The contact identity type

Enumeration:
EMAIL_PASSWORD
EMAIL_OTP
PHONE_OTP
GOOGLE
FACEBOOK
MAC_ADDRESS
username
string

The contact identity username

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/contacts/5fa7ff61-a960-cfa3-2f93-68a67058489a/identities HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "09e4d464-3bae-1eab-1c7c-9166979300fd",
            "type": "EMAIL_PASSWORD",
            "username": "johndoe@crm.com"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Customer Events

Customer Events capture contact financial and marketing interactions for analytical and award purposes. The classification of an event, such as achievement and purchase, determines how CRM.COM will process and award the event.

  • Achievement Events represent a contact’s accomplishment of pushing past a goal post (e.g. Facebook like, complete a questionnaire, monetary achievement)
  • Purchase Events record the purchase of goods or services by a contact from an external POS or within CRM.COM for the purpose of awarding it or paying for it by spending the wallet balance
  • Referral Events represent the events where one contact refers another contact to sign up to the business
Achievement Events
POST /achievements
PUT /achievements/{id}/actions
GET /achievements
GET /achievements/{id}
GET /achievements/{id}/rewards
Create Achievement
POST /achievements

Create a new achievement customer event in posted life cycle state

Notes

CUSTOMER IDENTIFICATION

Customer identification can be achieved by providing one of the following attributes

  1. contact id - a unique contact identifier as specified in CRM.COM
  2. cim - a unique identification medium representing the customer (e.g. phone number, hashed card number)
  3. contact code - a unique contact code as specified in CRM.COM

Request headers

api_key
string optional

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

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Request body

Object
id
string GUID nullable

The achievement customer event identifier

Example:
b995d649-e9de-637e-5590-1d8f0f24ecdf
reference_number
string nullable

The achievement reference number

Example:
RF000001
contact
Object required

Defines the contact for whom the achievement is created for

id
string GUID required nullable

The contact identifier

Example:
847e833b-294f-b3f8-b7b9-543dc0a1bbbb
code
string required nullable

The contact code

Example:
CO0012
cim
string required nullable

The value of a single contact identification medium (representing a contact)

Example:
4A30966F684B0269AD91
classification
Object nullable

The purchase classification

id
string GUID required nullable

The customer event classification identifier

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

The customer event classification name

Example:
Delivery Purchase
amount
number nullable

The amount related with the achievement

Example:
131.2
date
integer epoch nullable

The date that the achievement was performed

Example:
1572423477
organisation
Object required

Details about the organisation that achievement was submitted from

id
string GUID required nullable

The organisation identifier

Example:
75eec3b7-0b45-4620-3604-ea4680498157
tap
Object required nullable

The transaction acquiring point that the event was submitted from (id or code must be specified). TAP and Organisation (id) attributes are semi-optional

id
string GUID required nullable

The transaction acquiring point identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
code
string required nullable

The transaction acquiring point code

Example:
TAP001

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The achievement identifier

Example:
b995d649-e9de-637e-5590-1d8f0f24ecdf
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

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/achievements HTTP/1.1 

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

{
    "id": "b995d649-e9de-637e-5590-1d8f0f24ecdf",
    "reference_number": "RF000001",
    "contact": {
        "id": "847e833b-294f-b3f8-b7b9-543dc0a1bbbb"
    },
    "classification": {
        "id": "c8d83493-3f50-40df-adb0-762ec5f41863"
    },
    "amount": 131.2,
    "date": 1572423477,
    "organisation": {
        "tap": {
            "code": "TAP001"
        }
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "b995d649-e9de-637e-5590-1d8f0f24ecdf"
}
Perform Achievement Actions
PUT /achievements/{id}/actions

Perform actions on an existing achievement customer event (e.g. cancel achievement)

Path variables

id
string GUID required

The achievement (identifier) that will be updated

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0

Request headers

api_key
string optional

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

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Request body

Object
action
string required

Defines the action that will be applied on the event

Enumeration:
CANCEL

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The achievement identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
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

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/achievements/4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0/actions HTTP/1.1 

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

{
    "action": "CANCEL"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0"
}
List Achievements
GET /achievements

Retrieve a list of achievement events based on search criteria (e.g. all posted achievements)

Request parameters

contact_id
string GUID optional

Filter based on contact (identifier)

Example:
a43ed3af-6ffc-7f52-642c-dd58b7565178
contact_code
string optional

Filter based on contact code

Example:
ABC1234
reference_number
string optional

Filter based on reference number

Example:
REF1234
state
string optional

Filter based on state

Enumeration:
POSTED
CANCELLED
amount
number optional

Filter based on whether the event amount falls within a given amount range (e.g. amount.[gte]=0.99&amount.[lt]=1.99)

Example:
11.99
date
string optional

Filter based on whether the performed date falls within a given date range (e.g. performed_date.[gte]=1618395497&performed_date.[lt]=1618395497)

Enumeration:
date[gt]

Returns results where the performed date is greater than this value

date[gte]

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

date[lt]

Returns results where the performed date is less than this value

date[lte]

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

classifications
array of string optional

Filter based on event classification

Collection format: csv
organisations
array of string optional

Filter based on performed on organisation

Collection format: csv
taps
array of string optional

Filter based on the performed on transaction acquiring point (identifier) that captured the achievement event

Collection format: csv
tap_codes
array of string optional

Filter based on the performed on transaction acquiring point (code) that captured the achievement event

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 achievement identifier

Example:
1f69c0a7-e3cd-1c6d-9c00-9d6b8f93a007
reference_number
string

The achievement reference number

Example:
REF1234
state
string

The export definition status

Enumeration:
POSTED
CANCELLED
amount
number

The amount related to the achievement

Example:
1.99
date
integer epoch

The date on which the achievement was performed

Example:
1576486645
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
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
organisation
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
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/achievements HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "1f69c0a7-e3cd-1c6d-9c00-9d6b8f93a007",
            "reference_number": "REF1234",
            "state": "POSTED",
            "amount": 1.99,
            "date": 1576486645,
            "contact": {
                "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
                "name": "John Doe",
                "code": "C123"
            },
            "classification": {
                "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
                "name": "Delivery Purchase"
            },
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Achievement
GET /achievements/{id}

Retrieve detailed information for an achievement event

Path variables

id
string GUID required

The achievement (identifier) that will be retrieved

Example:
0e6dd60a-3163-167d-f456-f924d3e9e1b6

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 achievement identifier

Example:
0e6dd60a-3163-167d-f456-f924d3e9e1b6
reference_number
string

The achievement reference number

Example:
REF001
code
string

A unique code assigned to the achievement

Example:
1234WER
state
string

The export definition status

Enumeration:
POSTED
CANCELLED
date
integer epoch

The date on which the achievement was performed

Example:
1576486645
amount
number

The amount related with the achievement

Example:
1.5
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
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
organisation
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
tap
Object

Information about the organisation’s external references

id
string GUID

The tap identifier

Example:
cd953fe3-e2f6-2ae2-8a40-1bd8154c0f29
name
string

The tap name

Example:
ePOS
code
string

The tap code

Example:
EP12
rewards
Object

Details about reward amounts

award
number

The total awarded amount

Example:
121.99
fees
Object

Details about fees that were applied on achievement

total
number

The total fee amount (sum of all fee amounts)

Example:
1.21
credit_fee
number

The fee that was applied on awards (credit wallet)

Example:
1.21
top_up
Object

Details about top-up transaction

id
string GUID

The top-up identifier

Example:
f83054f2-b57d-4c2f-6ca0-f7822b5f0efa
code
string

The top-up code

Example:
QWS2234GSWS32424
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://devapi.crm.com/backoffice/v2/purchases/0e6dd60a-3163-167d-f456-f924d3e9e1b6 HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "0e6dd60a-3163-167d-f456-f924d3e9e1b6",
    "reference_number": "REF001",
    "life_cycle_state": "CANCELLED",
    "reduction_method": "BACK_END",
    "payment_medium_identifer": "424242",
    "performed_on": 1576486645,
    "total_net_amount": 1.59,
    "total_tax_amount": 0.41,
    "discount_amount": 0.5,
    "total_amount": 1.5,
    "requested_spend_amount": 1,
    "contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Doe",
        "code": "CO1234"
    },
    "account": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "ACR1234 John Doe",
        "number": "ACR1234"
    },
    "organisation": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "Bravo Coffee"
    },
    "tap": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "ePOS",
        "code": "TAP00012"
    },
    "rewards": {
        "total_award_amount": 121.99,
        "total_spend_amount": 12.22,
        "total_automatic_spend_amount": 2.22,
        "total_instant_discount_amount": 4.49,
        "total_spend_request_amount": 4.51
    },
    "products": [
        {
            "product_sku": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "sku": "SKU00012",
                "name": "Cappuccino",
                "description": "Cappuccino Coffee"
            }
            "quantity": 1,
            "net_amount": 1.08,
            "tax_amount": 0.51,
            "total_amount": 1.59
        },
        {
            "product_family": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "Chocolates"
            },
            "quantity": 1,
            "net_amount": 1.08,
            "tax_amount": 0.51,
            "total_amount": 1.59
        }
    ]
}
List Achievement Rewards Breakdown
GET /achievements/{id}/rewards

Get reward details (awards/spends) for a specific achievement customer event

Path variables

id
string GUID required

The achievement (identifier) for which rewards details will be retrieved

Example:
e3e9bad2-9169-e273-12b5-877a8acd3529

Request parameters

type
string optional

Filter based on reward type

Enumeration:
AWARD
REDEEM
SPEND

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
type
string

The reward type

Enumeration:
AWARD
REDEEM
SPEND
reward_offer
Object

The reward offer that the promotion pass will consume.

id
string GUID

The reward offer identifier

Example:
c888dd7a-7476-538c-730a-9f924bd82d04
name
string

The reward offer name

Example:
Birthday Offer
redeem_method
string

Defines which redeem methods are allowed

Enumeration:
DEFERRED
INSTANT
amount
number

The awarded amount

Example:
1.01
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/achievements/e3e9bad2-9169-e273-12b5-877a8acd3529/rewards HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "type": "AWARD",
            "reward_offer": {
                "id": "c888dd7a-7476-538c-730a-9f924bd82d04",
                "name": "Review Offer"
            },
            "redeem_method": "DEFERRED",
            "amount": 9.99
        }
    ]
}
Purchase Events
POST /purchases
PUT /purchases/{id}/actions
GET /purchases
GET /purchases/{id}
GET /purchases/{id}/rewards
POST /purchases/ad_hoc_return
POST /purchases/batches
GET /purchases/batches
GET /purchases/batches/{id}
Create Purchase
POST /purchases

Create a new purchase customer event in posted life cycle state

Notes

CUSTOMER IDENTIFICATION

Customer identification can be achieved by providing one of the following attributes

  1. contact id - a unique contact identifier (usually GUID based)
  2. cim - a unique identification medium representing the customer (e.g. phone number, hashed card number)
  3. contact token - an OTP token as requested by a contact via CRM.COM applications
  4. contact code - a unique contact code (usually 8 or 16 characters long)
PRODUCT CORE BEHAVIOR

Product SKUs and Product Families will be created automatically if they are submitted in a purchase and do not exist in CRM.COM.

PURCHASE ESTIMATES FLOW

To integrate purchase estimates in a “submit purchase” flow the following APIs should be called

  1. POST /estimates/purchases
  2. POST /purchases by providing the estimates identifier as return from previous API call

Attribute “disable spends” from Purchase Estimates can be explicitly ovewritten by Submit Purchase.

Request headers

api_key
string optional

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

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Request body

Object
id
string GUID nullable

The purchase customer event identifier

Max length: 32
Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
reference_number
string nullable

The purchase reference number

Example:
RF000001
transaction_reference
string nullable

The transaction reference number that will be used for matching purchases (TP Match Mode)

Example:
795a-2dc4cc3f566f
estimation_id
string GUID nullable

The purchase estimation (identifier) that can be used instead of specifying (again) all purchase attributes

Example:
a68cfe78-153d-e7ad-a4b4-4d783f7e6219
date
integer epoch nullable

The date that the customer event was performed

Example:
1572423477
classification
Object nullable

The purchase classification

id
string GUID required nullable

The customer event classification identifier

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

The customer event classification name

Example:
Delivery Purchase
products
Array required nullable

The purchased products. Applicable and required when net/tax/total amounts are not provided

Object
product_sku
string required nullable

The purchased product sku (product sku and product family are semi-optional)

Example:
FREDESPR001
product_name
string nullable

The purchased product name

Example:
Freddo Espresso
product_family
string required nullable

The purchased product family (product sku and product family are semi-optional)

Example:
Chocolates
net_amount
number required

The purchased product net amount

Example:
14.15
tax_amount
number required

The purchased product vat amount

Example:
1.04
total_amount
number required

The purchased product total amount (net and vat amount)

Example:
15.19
quantity
integer nullable

The purchased quantity

Default:
1
Example:
2
transaction_amounts
Object required nullable

Details about total transaction amounts (products and transaction amounts are semi-optional)

net
number required nullable

The net amount

Example:
12.11
tax
number required nullable

The tax amount

Example:
0.11
total
number required nullable

The total amount (net + tax)

Example:
11
discount
number nullable

The discount amount

Example:
1
organisation
Object required nullable

Details about the organisation that purchase was submitted from (id or taps are semi-optional)

id
string GUID required nullable

The organisation identifier

Example:
5eb64e17-154f-4e47-ab8b-14e56c0be3e8
merchant_tap
Object required nullable

The transaction acquiring point that the event was submitted from (id or code must be specified). TAP and Organisation (id) attributes are semi-optional

id
string GUID required nullable

The transaction acquiring point identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
code
string required nullable

The transaction acquiring point code

Example:
TAP001
venue_tap
Object required nullable

The transaction acquiring point that the event was submitted from (id or code must be specified). TAP and Organisation (id) attributes are semi-optional

id
string GUID required nullable

The transaction acquiring point identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
code
string required nullable

The transaction acquiring point code

Example:
TAP001
contact
Object nullable

Defines the contact for whom the purchase is created for (customer identification can be made either using contact id, contact code, cim, contact_token or contact masked card)

id
string GUID required nullable

The contact identifier

Example:
ff67c281-d408-5a10-494a-0bf5e4a86059
code
string required nullable

The contact code

Example:
CO12345
cim
string required nullable

The contact cim

Example:
93002149
otp
string required nullable

The contact OTP token

Example:
447212
spend_request
Object nullable

Information related with the spend request that should be created as part of the purchase

amount
number required nullable

The amount requested to be spent (spend, instant_spend and amount are semi-optional)

Example:
2.12
spend
boolean required nullable

Defines whether spend will be calculated across any available balance (e.g. instant offers and available wallet balance) (spend, instant_spend and amount are semi-optional)

Example:
false
instant_spend
boolean required nullable

Defines whether spend will be calculated only based on instant offers (e.g. free product, amount) (spend, instant_spend and amount are semi-optional)

Example:
true
restrict_fully_covered
boolean nullable

Defines whether the purchase will be posted successfully only if requested spend amount is fully covered by the available wallet balance

Example:
true
pass
Object nullable

Details about the pass

type
string

Defines the pass type

Enumeration:
PROMOTION
GIFT
TOP_UP
Default:
PROMOTION
code
string required

The pass code. For Promotion passes - a Promotion pass will be generated and redeemed as part of the process, the contact_id should also be provided

Example:
SI8276333
pin
string

The pass assocaited pin (if applicable) should be set here for validation

  • If validation is successful, the Purchase Event will be created and wallet funds will be consumed
  • If validation is unsuccessful, the Purchase Event won’t be created and wallet funds won’t be consumed
Example:
1234
otp
string nullable

The pass one time password (if applicable) - not implemented yet for passes

Example:
445729
payment_medium_identifier
string nullable

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

Example:
42424242

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The purchase identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
rewards
Object

Details about reward amounts

spend
number

The total (actual) spent amount

Example:
1.72
open_spend
number

The spent amount from wallet’s open balance

Example:
1.01
commerce_spend
number

The spent amount from wallet’s commerce balance

Example:
0.71
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
Example 2
POST https://sandbox.crm.com/backoffice/v2/purchases HTTP/1.1 

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

{
    "id": "4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0",
    "reference_number": "RF000001",
    "date": 1572423477,
    "classification": {
        "name": "Delivery"
    },
    "products": [
        {
            "product_sku": "FREDESPR001",
            "product_name": "Freddo Espresso",
            "net_amount": 14.15,
            "tax_amount": 1.04,
            "total_amount": 15.19,
            "quantity": 2
        }
    ],
    "transaction_amounts": {
        "discount": 1,
    },
    "organisation": {
        "merchant_tap": {
            "code": "TAP001"
        },
        "venue_tap": {
            "code": "TAP001"
        }
    },
    "contact": {
        "otp": "447212"
    }
    "pass": {
        "code": "SI8276333"
    },
    "payment_medium_identifier": "4242"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0",
    "reference_number": "RF123",
    "rewards": {
        "spend": 1.72
    }
}
POST https://sandbox.crm.com/backoffice/v2/purchases HTTP/1.1 

Content-Type: application/json

{
    "transaction_amounts": {
        "net": 12.11,
        "tax": 0.11,
        "discount": 1,
        "total": 11
    },
    "organisation": {
        "merchant_tap": {
            "code": "TAP001"
        },
        "venue_tap": {
            "code": "TAP001"
        }
    },
    "contact": {
        "cim": "93002149"
    },
    "payment_medium_identifier": "4242"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0"
}
Perform Purchase Actions
PUT /purchases/{id}/actions

Perform actions on an existing purchase customer event (e.g. cancel purchase)

Path variables

id
string GUID required

The purchase (identifier) that will be canceled

Example:
91a52c35-fcdd-a328-7708-2b02ac3ff02e

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

Defines the action that will be applied on the event

Enumeration:
CANCEL

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The purchase identifier

Example:
91a52c35-fcdd-a328-7708-2b02ac3ff02e
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/purchases/91a52c35-fcdd-a328-7708-2b02ac3ff02e/actions HTTP/1.1 

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

{
    "action": "CANCEL"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "91a52c35-fcdd-a328-7708-2b02ac3ff02e"
}
List Purchases
GET /purchases

Retrieve a list of purchase events based on search criteria (e.g. all posted purchases)

Request parameters

contact_id
string GUID optional

Filter based on contact (identifier)

Example:
6409b6ba-4cba-b9d9-e5b1-0b568388eb6a
contact_code
string optional

Filter based on contact (code)

Example:
ABC1234
reference_number
string optional

Filter based on reference number

Example:
REF1234
state
string optional

Filter based on state

Enumeration:
POSTED
CANCELLED
classifications
array of string optional

The classification related to the purchase customer event

Collection format: csv
organisations
array of string optional

The organisation that the purchase customer event was performed

Collection format: csv
taps
array of string optional

The transaction acquiring point that captured the customer event

Collection format: csv
total_amount
string optional

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

Enumeration:
total_amount[gt]

Returns results where the total amount is greater than this value

total_amount[gte]

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

total_amount[lt]

Returns results where the total amount is less than this value

total_amount[lte]

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

date
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:
date[gt]

Returns results where the performed date is greater than this value

date[gte]

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

date[lt]

Returns results where the performed date is less than this value

date[lte]

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

is_ad_hoc_return
boolean optional

Filter purchases that an ad hoc return was applied on them

Example:
true
ad_hoc_reference_number
string optional

Filter purchase based on the applied ad hoc return reference number

Example:
3276a89a-340e-e096-e79a-267dbddf8fca
transaction_reference
string optional

Filter based on transaction reference number

Example:
a64a-f1fcff0312fe
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 purchase identifier

Example:
6409b6ba-4cba-b9d9-e5b1-0b568388eb6a
reference_number
string

The purchase’s reference number

Example:
REF1234
state
string

The export definition status

Enumeration:
POSTED
CANCELLED
date
integer epoch

The date on which the purchase was performed

Example:
1576486645
transaction_amounts
Object

Details about the purchase transaction amounts

net
number

The total net amount (all products’ net amount or total transaction net amount)

Example:
1.51
tax
number

The total tax amount (all products’ tax amount or total transaction tax amount)

Example:
0.49
total
number

The purchase’s total amount (net + tax)

Example:
1
discount
number

The purchase’s discount amount

Example:
1
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
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
organisation
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
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/purchases HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "6409b6ba-4cba-b9d9-e5b1-0b568388eb6a",
            "reference_number": "REF1234",
            "state": "CANCELLED",
            "date": 1576486645,
            "amounts": {
                "net": 1.51,
                "tax": 0.49,
                "discount": 1,
                "total": 1
            },
            "contact": {
                "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
                "name": "John Doe",
                "code": "C123"
            },
            "classification": {
                "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
                "name": "Delivery Purchase"
            },
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Purchase
GET /purchases/{id}

Retrieve detailed information for a purchase event

Path variables

id
string GUID required

The purchase (identifier) that will be retrieved

Example:
a0003f83-32c8-da03-200d-d6af0386cb3a

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 purchase identifier

Example:
a0003f83-32c8-da03-200d-d6af0386cb3a
code
string

A unique code assigned to the purchase

Example:
1234WER
reference_number
string

The purchase reference number

Example:
REF001
transaction_reference
string

The transaction reference number (TP Match Mode)

Example:
c855-b22208b42575
state
string

The export definition status

Enumeration:
POSTED
CANCELLED
date
integer epoch

The date on which the purchase was performed

Example:
1576486645
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
products
Array

Details about purchased products

Object
product_sku
Object

Details about product SKU

id
string GUID

The product identifier

Example:
6aaeaf7c-8e41-f9e8-214a-e62209859a60
sku
string

The product sku

Example:
SKU00012
name
string

The product name

Example:
Cappuccino
description
string

The product description

Example:
Cappuccino Coffee
product_family
Object

Details about product family

id
string GUID

The product family identifier

Example:
61310d09-1521-f288-4475-5b26add58a23
name
string

The product family

Example:
Chocolates
quantity
integer

The quantity of the line item

Example:
1
net_amount
number

The net amount of the line item

Example:
1.08
tax_amount
number

The tax amount of the line item

Example:
0.51
total_amount
number

The total amount (net + tax) of the line item

Example:
1.59
transaction_amounts
Object

Details about the purchase transaction amounts

net
number

The total net amount (all products’ net amount or total transaction net amount)

Example:
1.51
tax
number

The total tax amount (all products’ tax amount or total transaction tax amount)

Example:
0.49
total
number

The purchase’s total amount (net + tax)

Example:
1
discount
number

The purchase’s discount amount

Example:
1
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
payment_medium_identifier
string

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

Example:
424242
spend_request
Object

Details about spend request for a specific amount (as requested by contact)

amount
number

The requested spend amount

Example:
2.99
pass
Object

Details about pass redemption

id
string GUID

The pass identifier

Example:
83cbad41-86ee-4aa5-bc5a-6483094dceca
code
string

The pass code

Example:
132465798
organisation
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
tap
Object

Information about the organisation’s external references

id
string GUID

The tap identifier

Example:
cd953fe3-e2f6-2ae2-8a40-1bd8154c0f29
name
string

The tap name

Example:
ePOS
code
string

The tap code

Example:
EP12
rewards
Object

Details about reward amounts

award
number

The total awarded amount

Example:
5.99
redeem
number

The total redeemed amount

Example:
2.01
spend
number

The total (actual) spent amount

Example:
1.72
ad_hoc_return
Object

Details about ad hoc return of goods

reference_number
string

The ad hoc return reference number

Example:
AHR001
date
integer epoch

The date that ad hoc retun of goods was applied

Example:
1589987160
return_amount
number

The amount that was returned

Example:
200.99
amount
number

The amount that the customer was debited due to ad hoc return of goods

Example:
12.34
invoice
Object

Details about financial transaction

id
string GUID

The financial transaction identifier

Example:
93d4d954-0ffe-64d4-908f-732d2d79ce25
number
string

The financial transaction number

Example:
NUM1234
reference_number
string

The financial transaction reference number

Example:
REFNUM1234
credit_note
Object

Details about financial transaction

id
string GUID

The financial transaction identifier

Example:
93d4d954-0ffe-64d4-908f-732d2d79ce25
number
string

The financial transaction number

Example:
NUM1234
reference_number
string

The financial transaction reference number

Example:
REFNUM1234
fees
Object

Details about applied fees

total
number

The total fee amount (sum of all fee amounts)

Example:
2.54
credit_fee
number

The fee that was applied on awards (credit wallet)

Example:
1.21
debit_fee
number

The fee that was applied on spends (debit wallet)

Example:
1.34
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/purchases/a0003f83-32c8-da03-200d-d6af0386cb3a HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a0003f83-32c8-da03-200d-d6af0386cb3a",
    "code": "1234WER",
    "reference_number": "REF001",
    "state": "POSTED",
    "date": 1576486645,
    "classification": {
        "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
        "name": "Delivery Purchase"
    },
    "products": [
        {
            "product_sku": {
                "id": "6aaeaf7c-8e41-f9e8-214a-e62209859a60",
                "sku": "SKU00012",
                "name": "Cappuccino",
                "description": "Cappuccino Coffee"
            },
            "product_family": {
                "id": "61310d09-1521-f288-4475-5b26add58a23",
                "name": "Chocolates"
            },
            "quantity": 1,
            "net_amount": 1.08,
            "tax_amount": 0.51,
            "total_amount": 1.59
        }
    ],
    "contact": {
        "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
        "name": "John Doe",
        "code": "C123"
    },
    "organisation": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "tap": {
        "id": "cd953fe3-e2f6-2ae2-8a40-1bd8154c0f29",
        "name": "ePOS",
        "code": "EP12"
    },
    "rewards": {
        "award": 5.99,
        "redeem": 2.01,
        "spend": 1.72
    }
}
List Purchase Rewards Breakdown
GET /purchases/{id}/rewards

Get reward details for a specific purchase customer event

Path variables

id
string GUID required

The purchase (identifier) for which rewards details will be retrieved

Example:
2cd2ba51-63c6-4327-f570-80949e693a08

Request parameters

type
string optional

Filter based on reward type

Enumeration:
AWARD
REDEEM
SPEND

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
type
string

The reward type

Enumeration:
AWARD
REDEEM
SPEND
reward_offer
Object

The reward offer that the promotion pass will consume.

id
string GUID

The reward offer identifier

Example:
c888dd7a-7476-538c-730a-9f924bd82d04
name
string

The reward offer name

Example:
Birthday Offer
redeem_method
string

Defines which redeem methods are allowed

Enumeration:
DEFERRED
INSTANT
amount
number

The awarded/redeemed/spent amount

Example:
9.23
product
Object

The awarded product (free product)

type
string

The awarded product type

Enumeration:
SKU
TYPE
BRAND
FAMILY
id
string GUID

The awarded product identifier

Example:
cea5ff54-c875-e289-ebe3-ac50cbd00a07
name
string

The awarded product name

Example:
Coffee
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/purchases/2cd2ba51-63c6-4327-f570-80949e693a08/rewards HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "type": "AWARD",
            "reward_offer": {
                "id": "c888dd7a-7476-538c-730a-9f924bd82d04",
                "name": "Birthday Offer"
            },
            "redeem_method": "INSTANT",
            "amount": 9.23
        }
    ]
}
Ad Hoc Return of Goods
POST /purchases/ad_hoc_return

Performs an ad hoc return of goods for a speciifc customer

Notes

RETURN CORE BEHAVIOR

No purchase customer events will be cancelled

When an ad hoc return of goods transaction takes place, the customer wallet will be debited for an amount proportional based on the return amount, the identified purchase transaction amount and the award (on total transaction value) provided on that purchase.
debit amount = (return amount/purchase total amount)*award amount

Any spend amount on such purchase should be ignored, as the spend is an event that is triggered real-time and returning any spend amounts can be a complex process due to different spend conditions that apply on awards that the Customer has earned from previous purchases.

Request headers

api_key
string optional

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

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

Request body

Object
reference_number
string nullable

The ad hoc return reference number

Example:
RF123
amount
number required

The amount of purchased goods that are returned

Example:
14.56
date
integer epoch nullable

The date that the ad hoc return is requested

Example:
1601636231
contact
Object required

Defines the contact for whom the purchase is created for (customer identification can be made either using contact id, contact code, cim, contact_token or contact masked card)

id
string GUID required nullable

The contact identifier

Example:
ff67c281-d408-5a10-494a-0bf5e4a86059
code
string required nullable

The contact code

Example:
CO12345
cim
string required nullable

The contact cim

Example:
93002149
organisation
Object

Details about the organisation that purchase was submitted from (id or taps are semi-optional)

id
string GUID required nullable

The organisation identifier

Example:
5eb64e17-154f-4e47-ab8b-14e56c0be3e8
merchant_tap
Object required nullable

The transaction acquiring point that the event was submitted from (id or code must be specified). TAP and Organisation (id) attributes are semi-optional

id
string GUID required nullable

The transaction acquiring point identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
code
string required nullable

The transaction acquiring point code

Example:
TAP001
venue_tap
Object required nullable

The transaction acquiring point that the event was submitted from (id or code must be specified). TAP and Organisation (id) attributes are semi-optional

id
string GUID required nullable

The transaction acquiring point identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
code
string required nullable

The transaction acquiring point code

Example:
TAP001

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The purchase identifier that ad hoc return is performed against

Example:
37ed4a1a-0e8f-4691-a8a0-636aea6e47c5
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

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/purchases/ad_hoc_return HTTP/1.1 

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

{
    "reference_number": "RF123",
    "amount": 14.56,
    "date": 1601636231,
    "contact": {
        "cim": "93002149"
    },
    "organisation": {
        "merchant_tap": {
            "code": "TAP001"
        },
        "venue_tap": {
            "code": "TAP001-V01"
        }
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "37ed4a1a-0e8f-4691-a8a0-636aea6e47c5"
}
Purchase Events Batch
POST /purchases/batches

Create a new batch to submit a number of purchase events

Notes

CUSTOMER IDENTIFICATION

Customer identification can be achieved by providing one of the following attributes

  1. contact id - a unique contact identifier (usually GUID based)
  2. cim - a unique identification medium representing the customer (e.g. phone number, hashed card number)
  3. contact token - an OTP token as requested by a contact via CRM.COM applications
  4. contact code - a unique contact code (usually 8 or 16 characters long)

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

Object
id
string GUID nullable

The batch identifier

Example:
65bd03bf-b33e-469d-a8cc-505654d3df49
name
string nullable

The batch name

Example:
EOD Events
events
Array required

The purchase events that will be submitted as part of the batch process

Object
id
string GUID nullable

The purchase customer event identifier

Max length: 32
Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
reference_number
string nullable

The purchase reference number

Example:
RF000001
transaction_reference
string nullable

The transaction reference number that will be used for matching purchases (TP Match Mode)

Example:
795a-2dc4cc3f566f
estimation_id
string GUID nullable

The purchase estimation (identifier) that can be used instead of specifying (again) all purchase attributes

Example:
a68cfe78-153d-e7ad-a4b4-4d783f7e6219
date
integer epoch nullable

The date that the customer event was performed

Example:
1572423477
classification
Object nullable

The purchase classification

id
string GUID required nullable

The customer event classification identifier

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

The customer event classification name

Example:
Delivery Purchase
products
Array required nullable

The purchased products. Applicable and required when net/tax/total amounts are not provided

Object
product_sku
string required nullable

The purchased product sku (product sku and product family are semi-optional)

Example:
FREDESPR001
product_name
string nullable

The purchased product name

Example:
Freddo Espresso
product_family
string required nullable

The purchased product family (product sku and product family are semi-optional)

Example:
Chocolates
net_amount
number required

The purchased product net amount

Example:
14.15
tax_amount
number required

The purchased product vat amount

Example:
1.04
total_amount
number required

The purchased product total amount (net and vat amount)

Example:
15.19
quantity
integer nullable

The purchased quantity

Default:
1
Example:
2
transaction_amounts
Object required nullable

Details about total transaction amounts (products and transaction amounts are semi-optional)

net
number required nullable

The net amount

Example:
12.11
tax
number required nullable

The tax amount

Example:
0.11
total
number required nullable

The total amount (net + tax)

Example:
11
discount
number nullable

The discount amount

Example:
1
organisation
Object required nullable

Details about the organisation that purchase was submitted from (id or taps are semi-optional)

id
string GUID required nullable

The organisation identifier

Example:
5eb64e17-154f-4e47-ab8b-14e56c0be3e8
merchant_tap
Object required nullable

The transaction acquiring point that the event was submitted from (id or code must be specified). TAP and Organisation (id) attributes are semi-optional

id
string GUID required nullable

The transaction acquiring point identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
code
string required nullable

The transaction acquiring point code

Example:
TAP001
venue_tap
Object required nullable

The transaction acquiring point that the event was submitted from (id or code must be specified). TAP and Organisation (id) attributes are semi-optional

id
string GUID required nullable

The transaction acquiring point identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
code
string required nullable

The transaction acquiring point code

Example:
TAP001
contact
Object nullable

Defines the contact for whom the purchase is created for (customer identification can be made either using contact id, contact code, cim, contact_token or contact masked card)

id
string GUID required nullable

The contact identifier

Example:
ff67c281-d408-5a10-494a-0bf5e4a86059
code
string required nullable

The contact code

Example:
CO12345
cim
string required nullable

The contact cim

Example:
93002149
otp
string required nullable

The contact OTP token

Example:
447212
pass
Object nullable

Details about the pass

type
string

Defines the pass type

Enumeration:
PROMOTION
GIFT
TOP_UP
Default:
PROMOTION
code
string required

The pass code. For Promotion passes - a Promotion pass will be generated and redeemed as part of the process, the contact_id should also be provided

Example:
SI8276333
pin
string

The pass assocaited pin (if applicable) should be set here for validation

  • If validation is successful, the Purchase Event will be created and wallet funds will be consumed
  • If validation is unsuccessful, the Purchase Event won’t be created and wallet funds won’t be consumed
Example:
1234
otp
string nullable

The pass one time password (if applicable) - not implemented yet for passes

Example:
445729
payment_medium_identifier
string nullable

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

Example:
42424242

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The batch identifier

Example:
65bd03bf-b33e-469d-a8cc-505654d3df49
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/purchases/batches HTTP/1.1 

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

{
    "id": "65bd03bf-b33e-469d-a8cc-505654d3df49",
    "name": "EOD Events",
    "events": [
        {
            "id": "4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0",
            "reference_number": "RF000001",
            "performed_on": 1572423477,
            "payment_medium_identifier": "42424242",
            "contact": {
                "cim": "93002149"
            },
            "products": [
                {
                    "product_sku": "FREDESPR001",
                    "product_name": "Freddo Espresso",
                    "net_amount": 14.15,
                    "tax_amount": 1.04,
                    "total_amount": 15.19,
                    "quantity": 2
                }
            ],
            "merchant_tap": {
                "code": "TAP001"
            },
            "venue_tap": {
                "code": "TAP001-V01"
            },
            "classification": {
                "name": "Delivery Purchase"
            }
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "65bd03bf-b33e-469d-a8cc-505654d3df49"
}
List Batches
GET /purchases/batches

Get a list of purchase batches and process status

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 required

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

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

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The batch identifier

Example:
65bd03bf-b33e-469d-a8cc-505654d3df49
name
string

The batch name

Example:
EOD File
dates
Object

Details about processing time frame

start
integer epoch

The date on which the batch was performed

Example:
1606814571
events
Object

Details about batch events

submitted
integer

The number of events submitted

Example:
2
success
integer

The number of events that were successfully processed

Example:
1
failure
integer

The number of events that failed to be processed

Example:
1
processed
integer

The number of events that were processed

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/v2/purchases/batches HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "65bd03bf-b33e-469d-a8cc-505654d3df49",
            "name": "EOD File",
            "dates": {
                "start": 1606814571
            },
            "events": {
                "submitted": 2,
                "success": 1,
                "failure": 1,
                "processed": 2
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Batch
GET /purchases/batches/{id}

Retrieve details for a specific batch of purchase events

Path variables

id
string GUID required

The batch (identifier) that will be retrieved

Example:
65bd03bf-b33e-469d-a8cc-505654d3df49

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 batch identifier

Example:
65bd03bf-b33e-469d-a8cc-505654d3df49
name
string

The batch name

Example:
EOD Batch
dates
Object

Details about processing time frame

start
integer epoch

The date on which the batch was performed

Example:
1606814160
events
Array

A list of all processed purchase events

Object
id
string GUID

The purchase event identifier

Example:
65bd03bf-b33e-469d-a8cc-505654d3dfQQ
reference_number
string

The purchase event reference number

Example:
RF000001
processed_at
integer epoch

The time that the purchase event was processed

Example:
1606814160
process_status
string

The status of the processed purchase event

Enumeration:
SUCCESS
ERROR
PENDING
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/purchases/batches/65bd03bf-b33e-469d-a8cc-505654d3df49 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "65bd03bf-b33e-469d-a8cc-505654d3df49",
    "name": "EOD Batch",
    "dates": {
        "start": 1606814160
    },
    "events": [
        {
            "id": "65bd03bf-b33e-469d-a8cc-505654d3dfQQ",
            "reference_number": "RF000001",
            "processed_at": 1606814160,
            "process_status": "PENDING"
        }
    ]
}
Referral Events
PUT /referrals/{id}/actions
GET /referrals
GET /referrals/{id}
Perform Referral Actions
PUT /referrals/{id}/actions

Perform actions on an existing referral customer event (e.g. cancel referral)

Path variables

id
string GUID required

The referral (identifier) that will be updated

Example:
e3e9bad2-9169-e273-12b5-877a8acd3529

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

Defines the action that will be applied on the event

Enumeration:
CANCEL

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The referral event identifier

Example:
e3e9bad2-9169-e273-12b5-877a8acd3529
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/referrals/e3e9bad2-9169-e273-12b5-877a8acd3529/actions HTTP/1.1 

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

{
    "action": "CANCEL"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "e3e9bad2-9169-e273-12b5-877a8acd3529"
}
List Referrals
GET /referrals

Retrieve a list of referral events based on search criteria (e.g. all posted referrals)

Request parameters

referred_contact_id
string GUID optional

The referred contact identifier

Example:
8a1bf4e7-43b7-7e84-d8d6-2301a6bb5223
referred_by_contact_id
string GUID optional

The referred by contact identifier

Example:
d526c5a9-d41d-2ed1-cb98-d29231f6a50f
reference_number
string optional

The referral’s reference number

Example:
REF1234
date
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:
date[gt]

Returns results where the performed date is greater than this value

date[gte]

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

date[lt]

Returns results where the performed date is less than this value

date[lte]

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

state
string optional

Filter based on state

Enumeration:
POSTED
CANCELLED
organisations
array of string optional

The organisation that the referral customer event was performed

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 referral identifier

Example:
e3e9bad2-9169-e273-12b5-877a8acd3529
reference_number
string

The referral reference number

Example:
REF1234
referred
Object

Details about the referred contact

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

Details about the referred by contact

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

The export definition status

Enumeration:
POSTED
CANCELLED
organisation
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
date
integer epoch

The date on which the referral was performed

Example:
1576486645
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 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/referrals HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "e3e9bad2-9169-e273-12b5-877a8acd3529",
            "reference_number": "REF1234",
            "referred": {
                "contact": {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "name": "John Johnson",
                    "code": "C123"
                }
            },
            "referred_by": {
                "contact": {
                    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                    "name": "John Johnson",
                    "code": "C123"
                }
            },
            "state": "POSTED",
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "date": 1576486645
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Referral
GET /referrals/{id}

Retrieve detailed information for a referral event

Path variables

id
string GUID required

The referral event (identifier) that will be retrieved

Example:
15301f22-5cc2-22c8-5c8d-0aadb869cdfc

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 referral identifier

Example:
15301f22-5cc2-22c8-5c8d-0aadb869cdfc
reference_number
string

The referral reference number

Example:
REF001
state
string

The export definition status

Enumeration:
POSTED
CANCELLED
date
integer epoch

The date on which the referral was made

Example:
1576486645
referred
Object

Details about referred contact

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

Details about referred by contact

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

Details about reward amounts

award
number

The total awarded amount

Example:
121.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://stagingapi.crm.com/backoffice/v1/referrals/CEEE83D6E0804A30966F684B0269AD91 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CEEE83D6E0804A30966F684B0269AD91",
    "reference_number": "REF001",
    "life_cycle_state": "CANCELLED",
    "performed_on": 1576486645,
    "referred_contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Doe",
        "code": "CO1234"
    },
    "referred_account": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "ACR1234 John Doe",
        "number": "ACR1234"
    },
    "organisation": {
        "id": "CEEE83D6E0804A30966F684B0269AD91",
        "name": "Bravo Coffee"
    },
    "rewards": {
        "total_award_amount": 121.99
    },
    "referred_by_contact": {
        "id": "b47cc2a3-6e00-b826-6bb5-48849e222e2a",
        "name": "Jane Doe",
        "code": "45679"
    },
    "referred_by_account": {
        "id": "0a1c62c3-75cc-7b65-d7c8-9ce59f7ad6cc",
        "name": "AR567 Jane Doe",
        "number": "AR567"
    }
}
Devices
POST /devices
PUT /devices/{id}
DELETE /devices/{id}
GET /devices
GET /devices/{id}
PUT /devices/{id}/actions
GET /devices/{id}/history
POST /devices/{id}/ownership
Create Device
POST /devices

Create a new device

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

The device’s serial number

Example:
STB123456
electronic_id
string nullable

The device electronic id

Example:
I243WER
product_id
string GUID required

The device’s product (identifier) - product must be of traceable physical good classification

Example:
f4b9dc04-b06f-1f57-bb9a-a845851b91e8
warehouse_id
string GUID required nullable

The warehouse (identifier) at which the device will be located, required only when devices are imported to a warehouse

Example:
d538824d-7efe-3f9d-5d11-701efca5fe40
contact_id
string GUID required nullable

The contact (identifier) that owns such device, required only when a contact registers his/her own device

Example:
81dd0800-be43-d43a-a727-77d6c7606036
spatial_location
string nullable

The spatial location of the device (when located in the warehouse)

Example:
1C
characteristics
Array nullable

The device characteristics. The allowed set of characteristics are defined by the device’s product specification.

Array
Object
key
string required

The characteristic’s key which is uque across the set of configured characteristics

Example:
static-ip
value
string required

The actual value of the characteristic.

Example:
10.10.01.10
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
status_id
string GUID nullable

The device status

Example:
9ce41a61-4c47-c06a-1c74-191f496903ae

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The device identifier

Example:
88b563fc-da35-c157-ca89-56432b269128
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/devices HTTP/1.1 

Content-Type: application/json

{
    "serial_number": "STB123456",
    "electronic_id": "I243WER",
    "product_id": "f4b9dc04-b06f-1f57-bb9a-a845851b91e8",
    "warehouse_id": "d538824d-7efe-3f9d-5d11-701efca5fe40",
    "contact_id": "81dd0800-be43-d43a-a727-77d6c7606036",
    "spatial_location": "1C",
    "characteristics": [
        [
            {
                "key": "static-ip",
                "value": "10.10.01.10"
            }
        ]
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}
Update Device
PUT /devices/{id}

Update a single device

Path variables

id
string GUID required

The device (identifier) to be updated

Example:
0b8e03c1-01e4-9c44-533a-d55b9ab0821e

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 nullable

The device’s new state (a user can update a device state to Used and Blocked only, other states are set only by business operations/processes)

Enumeration:
NEW
USED
BLOCKED
RENTED
spatial_location
string nullable

The spatial location of the device

Example:
1D
characteristics
Array nullable

The device characteristics (specified per product, product type or device)

Array
Object
key
string required

The characteristic’s key which is uque across the set of configured characteristics

Example:
static-ip
value
string required

The actual value of the characteristic.

Example:
10.10.01.10
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
status_id
string GUID nullable

The device status

Example:
9ce41a61-4c47-c06a-1c74-191f496903ae
iniaitalisation_details
Object

Detailed information of when the device was at first initialised on a subscription. Informaiton is set only once when the device is added to the first subscription either as a sold item or a rented one. This information is never reset, even if the device is returned to the warehouse or given to another contact.

date
integer

The initialisation date

Example:
1666862814
user_id
string

The user who performe dthe action that adds the service to the first subscription

Example:
9ce41a61-4c47-c06a-1c74-191f496903ae

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The device identifer

Example:
0b8e03c1-01e4-9c44-533a-d55b9ab0821e
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/devices/0b8e03c1-01e4-9c44-533a-d55b9ab0821e HTTP/1.1 

Content-Type: application/json

{
    "state": "BLOCKED",
    "spatial_location": "1D",
    "characteristics": [
        [
            {
                "key": "static-ip",
                "value": "10.10.01.10"
            }
        ]
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "status_id": "9ce41a61-4c47-c06a-1c74-191f496903ae",
    "iniaitalisation_details": {
        "date": 1666862814,
        "user_id": "9ce41a61-4c47-c06a-1c74-191f496903ae"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "0b8e03c1-01e4-9c44-533a-d55b9ab0821e"
}
Delete Device
DELETE /devices/{id}

Delete a single device

Path variables

id
string GUID required

The device (identifier) to be deleted

Example:
f42971d4-cfcb-963b-6213-7e2b8c82b30c

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

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

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

Responses

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/devices/f42971d4-cfcb-963b-6213-7e2b8c82b30c HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Devices
GET /devices

Retrieve a list of devices based on search criteria (e.g. all rented devices)

Request parameters

search_value
string optional

Search for devices using their serial number, mac address or electronic ID

Example:
STB809403222
states
array of Device State (enum) optional

Filter based on device’s state(s)

Collection format: csv
serial_number
string optional

Filter based on serial number

Example:
SN123234WE
electronic_id
string optional

Filter based on electronic id

Example:
I243WER
mac_address
string optional

Filter based on mac address

Example:
00:00:5e:00:53:af
subscription_ids
array of string optional

Filter based on subscription

Collection format: csv
contact_id
string GUID optional

Filter based on the contact that owns/bought/brought/rented such devices

Example:
e3af8d33-b972-3a8a-d5ef-f5aa7de6dd61
organisation_id
string GUID optional

Filter based on the organisation that owns such devices

Example:
51283409-d80c-1a55-2514-892a9f746684
integration_id
string GUID optional

Filter based on the integrator (e.g. provisioning provider) that provisions the device

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
can_be_rented
boolean optional

If set to true, then list all warehouse devices that can be provded to contacts as rentals i.e such devices have a rental price in the product catalogue. It is important to note that only devices located in the business’s warehouse are returned

Example:
true
include_application
boolean optional

Defines whether Application and Platform details should be returned or not

Example:
false
include_wifi
boolean optional

Defines whether WiFi platform details should be returned or not

Example:
true
include_subscription
boolean optional

Defines whether subscription and enabled services should be returned 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
include_characteristics
boolean optional

Defines whether characteristics should be returned or not

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
status_id
string GUID optional

Filter based on device status

Example:
427b61c4-c31a-59f6-9948-b7b94501fa14
spatial_location
string optional

Search for devices based on their spatial location in the warehouse

Example:
Corridor A
product_id
string GUID optional

Filter based on product

Example:
8c28baea-7a99-90a2-1f6a-a0a263a009c3
in_warehouse
boolean optional

Filter only the devices that currently are in the warehouse

Example:
true
product_family_id
string GUID optional

Filter based on product family

Example:
862b7329-b0c5-4a63-1acb-557432785fc2
product_type_id
string GUID optional

Filter based on product type

Example:
80494f35-f44b-62c3-5154-4e30b127020f
is_reserved
boolean optional

Defines whether only reserved devices will be retrieved or not

Example:
true
initialised_on
integer optional

The date on which the device was initialised for the first time. Filter supports gt, gte,lt, lte operators

Example:
1666862934
initialised_by
string optional

The user who performed the device’s first initialisation

Example:
80494f35-f44b-62c3-5154-4e30b127020f

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 device identifier

Example:
f9ce56ed-f1ce-a8f1-f9e8-e1db5fb2cb33
state
string

The device’ state

Enumeration:
NEW
USED
RENTED
BLOCKED
DISPATCHED
serial_number
string

The device’s serial number

Example:
STB123456
application
Object

Details about the application

id
string GUID

The application identiier

Example:
af9c61d3-7685-e31f-3387-27c42858e868
name
string

The application name

Example:
Best Coffee App
provided_on
integer epoch

The date from which the device is located at the contact’s premises. Returned only when listing devices linked to a subscription (i.e subscirpiton provided as input)

Example:
1642770980
product
Object
id
string GUID

The product identifier

Example:
e283a863-18e1-7cae-48c4-7433bf28cf97
sku
string

The product SKU code

Example:
ABC-12345
name
string

The product name

Example:
ABC
owner
Object

Details about the device’s ownership

type
string

The ownership type

Enumeration:
BUSINESS
RETAILER
CONTACT
id
string GUID

The device owner identifier

Example:
5f67324c-1076-618b-8d29-012efde9485e
name
string

The name of the device owner

Example:
CRM
enabled_services
Array

The enabled services for the device. List of services includes all services of the specified subscripption.

Object

Details about the enabled services for the device

id
string

The enabled service identifier

life_cycle_state
string

The enabled service life cycle state

product
Object

Details about a product

id
string GUID

The product identifier

Example:
a0f79973-d4b3-db89-4276-cb4abcccd842
sku
string

The product SKU code

Example:
STB
name
string

The product name

Example:
Set-top-box
characteristics
Array

The product characteristics

Example:
[
    [
        {
            "key": "static-ip",
            "value": "10.10.01.10",
            "label": "Static IP"
        }
    ]
]
Array
Object
key
string required

The Characteristic’s key which is uque across the set of configured characteristics

Example:
static-ip
value
string required

The actual value of the characteristic.

Example:
10.10.01.10
label
string

The characteristic’s label used for UI purposes

Example:
Static IP
subscription
Object
id
string GUID

The subscription identifier

Example:
5535e087-3e27-d2c8-249f-54fe0c1307a4
code
string

The subscription code

Example:
SUB001
provisioning
Object

Details about the integration

id
string GUID

The integration identifier

Example:
81ed6bcd-39ec-214c-5124-9e5ac6cb5dc4
name
string

The integration name

Example:
UniFi
wifi
Object

Details about the device WiFi platform status

status
string

The current WiFi status of the device

Enumeration:
ONLINE
OFFLINE
last_auth_date
string epoch

The last time that the device was WiFi authorized

Example:
1642767506
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
electronic_id
string

The device electronic id

Example:
I243WER
platform
string

The device’s operation platform (Application Devices)

Enumeration:
IOS
ANDROID
BROWSER
OTHER
MOBILE
mac_address
string

The device’s MAC address

Example:
00:00:5e:00:53:af
registration_token
string

The device’s registration token

Example:
50c31f6af479_d06622ec
status
Object

The device status

id
string GUID

The device status identifier

Example:
9ce41a61-4c47-c06a-1c74-191f496903ae
name
string

The device status name

Example:
new status
characteristics
Array

The device characteristics (specified per product, product type or device)

Array
Object
key
string required

The Characteristic’s key which is uque across the set of configured characteristics

Example:
static-ip
value
string required

The actual value of the characteristic.

Example:
10.10.01.10
label
string

The characteristic’s label used for UI purposes

Example:
Static IP
is_reserved
boolean

Defines whether the device is reserved or not

Example:
false
reserved_by
Object

The business entity from which the device is reserved

type
string

The business entity from which the device is reserved for

Enumeration:
ORDERS
INVOICES
SERVICE_REQUESTS
id
string GUID

The business entity identifier that such device is reserved by

Example:
ccdcede0-066e-4412-b98d-72032c18e32d
number
string

The business entity number that such device is reserved by

Example:
N12345
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/devices HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "f9ce56ed-f1ce-a8f1-f9e8-e1db5fb2cb33",
            "state": "NEW",
            "serial_number": "STB123456",
            "application": {
                "id": "af9c61d3-7685-e31f-3387-27c42858e868",
                "name": "Best Coffee App"
            },
            "provided_on": 1642770980,
            "product": {
                "id": "e283a863-18e1-7cae-48c4-7433bf28cf97",
                "sku": "ABC-12345",
                "name": "ABC"
            },
            "warehouse": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Nicosia headquarters"
            },
            "ownership": {
                "type": "RETAILER",
                "id": "5f67324c-1076-618b-8d29-012efde9485e",
                "name": "CRM"
            },
            "enabled_services": [
                {
                    "id": "",
                    "life_cycle_state": "",
                    "product": {
                        "id": "a0f79973-d4b3-db89-4276-cb4abcccd842",
                        "sku": "STB",
                        "name": "Set-top-box",
                        "measurement_unit": "MB"
                    }
                }
            ],
            "subscription": {
                "id": "5535e087-3e27-d2c8-249f-54fe0c1307a4",
                "code": "SUB001"
            },
            "provisioning": {
                "id": "81ed6bcd-39ec-214c-5124-9e5ac6cb5dc4",
                "name": "UniFi"
            },
            "wifi": {
                "status": "OFFLINE",
                "last_auth_date": "1642767506"
            },
            "custom_fields": [
                {
                    "id": "f68fad29-4a1b-3a1e-5cfa-6540a5b1609a",
                    "key": "back_office",
                    "label": "Back Office",
                    "description": "The account's back office code",
                    "tooltip": "",
                    "visible": true,
                    "field": "RADIO_BUTTONS",
                    "entity": "DEVICES"
                }
            ],
            "electronic_id": "I243WER"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Device
GET /devices/{id}

Retrieve detailed information for a device

Path variables

id
string GUID required

The device (identifier) to be retrieved

Example:
c39c6c23-319f-ef74-37cd-9b7878992fc1

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

The device identifier

Default:
GUID
Example:
c39c6c23-319f-ef74-37cd-9b7878992fc1
state
string

The device’ state

Enumeration:
NEW
USED
RENTED
BLOCKED
DISPATCHED
mac_address
string

The device’s MAC address

Example:
00:00:5e:00:53:af
platform
string

The device’s operation platform (Application Devices)

Enumeration:
IOS
ANDROID
BROWSER
OTHER
MOBILE
registration_token
string

The device’s registration token for push notifications

Example:
4e11bef819b8ae9af08d
registration_date
integer epoch

The date that such device was registered by the contact

Example:
1642758418
application
Object

Details about the application

id
string GUID

The application identiier

Example:
af9c61d3-7685-e31f-3387-27c42858e868
name
string

The application name

Example:
Best Coffee App
wifi
Object

Details about the device WiFi platform status

status
string

The current WiFi status of the device

Enumeration:
ONLINE
OFFLINE
last_auth_date
string epoch

The last time that the device was WiFi authorized

Example:
1642767506
serial_number
string

The device serial number

Example:
2049-3630
spatial_location
string

The device’s spatial location when located in a warehouse

Example:
1C
product
Object
id
string GUID

The product identifier

Example:
e283a863-18e1-7cae-48c4-7433bf28cf97
sku
string

The product SKU code

Example:
ABC-12345
name
string

The product name

Example:
ABC
owner
Object

Details about the device’s ownership

type
string

The ownership type

Enumeration:
BUSINESS
RETAILER
CONTACT
id
string GUID

The device owner identifier

Example:
5f67324c-1076-618b-8d29-012efde9485e
name
string

The name of the device owner

Example:
CRM
order
Object

The order from which the device is sold to the contact

id
string GUID

The order identifier

Example:
fa1f472e-fa4e-4cae-eae1-7e0002391237
number
string

The order number

Example:
O0002334
enabled_services
Array

The services that the device is enabled to

Object

Details about the enabled services for the device

id
string

The enabled service identifier

life_cycle_state
string

The enabled service life cycle state

product
Object

Details about a product

id
string GUID

The product identifier

Example:
a0f79973-d4b3-db89-4276-cb4abcccd842
sku
string

The product SKU code

Example:
STB
name
string

The product name

Example:
Set-top-box
characteristics
Array

The product characteristics

Example:
[
    [
        {
            "key": "static-ip",
            "value": "10.10.01.10",
            "label": "Static IP"
        }
    ]
]
Array
Object
key
string required

The Characteristic’s key which is uque across the set of configured characteristics

Example:
static-ip
value
string required

The actual value of the characteristic.

Example:
10.10.01.10
label
string

The characteristic’s label used for UI purposes

Example:
Static IP
subscription
Object
id
string GUID

The subscription identifier

Example:
5535e087-3e27-d2c8-249f-54fe0c1307a4
code
string

The subscription code

Example:
SUB001
provisioning
Object

Details about the integration

id
string GUID

The integration identifier

Example:
81ed6bcd-39ec-214c-5124-9e5ac6cb5dc4
name
string

The integration name

Example:
UniFi
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
electronic_id
string

The device electronic id

Example:
I243WER
characteristics
Array

The device characteristics (specified per product, product type or device)

Array
Object
key
string required

The Characteristic’s key which is uque across the set of configured characteristics

Example:
static-ip
value
string required

The actual value of the characteristic.

Example:
10.10.01.10
label
string

The characteristic’s label used for UI purposes

Example:
Static IP
status
Object

The device status

id
string GUID

The device status identifier

Example:
9ce41a61-4c47-c06a-1c74-191f496903ae
name
string

The device status name

Example:
new status
initialisation_details
Object

Detailed information of when the device was at first initialised on a subscription. Informaiton is set only once when the device is added to the first subscription either as a sold item or a rented one. This information is never reset, even if the device is returned to the warehouse or given to another contact.

date
integer

The initialisation date.

Example:
1666862572
user
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
is_reserved
boolean

Defines whether the device is reserved or not

Example:
true
reserved_by
Object

The business entity from which the device is reserved

type
string

The business entity from which the device is reserved for

Enumeration:
SERVICE_REQUESTS
ORDERS
INVOICES
id
string

The business entity identifier that such device is reserved by

Example:
da8aaf6a-ac3e-ee44-4760-a3b4084b15f4
number
string

The business entity number that such device is reserved by

Example:
N1234
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/devices/c39c6c23-319f-ef74-37cd-9b7878992fc1 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c39c6c23-319f-ef74-37cd-9b7878992fc1",
    "state": "USED",
    "mac_address": "00:00:5e:00:53:af", 
    "platform": "OTHER",
    "registration_token": "4e11bef819b8ae9af08d",
    "registration_date": 1642758418,
    "application": {
        "id": "af9c61d3-7685-e31f-3387-27c42858e868",
        "name": "Best Coffee App"
    },
    "wifi": {
        "status": "OFFLINE",
        "last_auth_date": "1642767506"
    },
    "serial_number": "2049-3630",
    "spatial_location": "1C",
    "product": {
        "id": "e283a863-18e1-7cae-48c4-7433bf28cf97",
        "sku": "ABC-12345",
        "name": "ABC"
    },
    "owner": {
        "type": "RETAILER",
        "id": "5f67324c-1076-618b-8d29-012efde9485e",
        "name": "CRM"
    },
    "order": {
        "id": "fa1f472e-fa4e-4cae-eae1-7e0002391237",
        "number": "O0002334"
    },
    "enabled_services": [
        {
            "id": "",
            "life_cycle_state": "",
            "product": {
                "id": "a0f79973-d4b3-db89-4276-cb4abcccd842",
                "sku": "STB",
                "name": "Set-top-box",
                "characteristics": [
                    [
                        {
                            "key": "static-ip",
                            "value": "10.10.01.10",
                            "label": "Static IP"
                        }
                    ]
                ]
            }
        }
    ],
    "subscription": {
        "id": "5535e087-3e27-d2c8-249f-54fe0c1307a4",
        "code": "SUB001"
    },
    "provisioning": {
        "id": "81ed6bcd-39ec-214c-5124-9e5ac6cb5dc4",
        "name": "UniFi"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "Back Office"
        }
    ],
    "electronic_id": "I243WER",
    "characteristics": [
        [
            {
                "key": "static-ip",
                "value": "10.10.01.10",
                "label": "Static IP"
            }
        ]
    ],
    "status": {
        "id": "9ce41a61-4c47-c06a-1c74-191f496903ae",
        "name": "new status"
    },
    "initialisation_details": {
        "date": 1666862572,
        "user": {
            "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
            "name": "John Smith",
            "username": "johnsmith@crm.com"
        }
    }
}
Perform Device Actions
PUT /devices/{id}/actions

Perform actions on an existing device (e.g. unblock device)

Path variables

id
string GUID required

The device (identifier) that an action will be performed

Example:
91a52c35-fcdd-a328-7708-2b02ac3ff02e

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

Defines the action that will be applied on the device

Enumeration:
UNBLOCK

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The device identifier

Example:
91a52c35-fcdd-a328-7708-2b02ac3ff02e
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/devices/91a52c35-fcdd-a328-7708-2b02ac3ff02e/actions HTTP/1.1 

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

{
    "action": "UNBLOCK"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "91a52c35-fcdd-a328-7708-2b02ac3ff02e"
}
Get Device History
GET /devices/{id}/history

Retrieve detailed information for a device’s history

Path variables

id
string GUID required

The device (identifier) of which history will be retrieved

Example:
3ef38763-2d6b-fb41-5c22-79989fa90bae

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 historical action identifier

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

The action that was performed

Enumeration:
STOCK_IN
STOCK_OUT
STOCK_ADJUSTMENT
STOCK_MOVEMENT
SALE
RETURN
RENT
TRANSFER
OWN_DEVICE
performed_on
integer epoch

The date on which such action was performed

Example:
1618861892
performed_by
Object

Details about the user/contact that performed such action

type
string

Defines who made such action

Enumeration:
CONTACT
USER
id
string GUID

The performer identifier

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

The performer full name

Example:
Jane Smith
username
string

The performer username (user related)

Example:
janesmith@crm.com
origin
Object

Details about the owner of a device (history)

type
string

Defines the historical entity type

Enumeration:
CONTACT
ORGANISATION
SUBSCRIPTION
WAREHOUSE
id
string GUID

Defines the historical entity identifier

Example:
07d737e8-d20c-08c5-7a2a-6c7f247b13a5
value
string

Defines the historical entity value

Example:
JS01
destination
Object

Details about the owner of a device (history)

type
string

Defines the historical entity type

Enumeration:
CONTACT
ORGANISATION
SUBSCRIPTION
WAREHOUSE
id
string GUID

Defines the historical entity identifier

Example:
07d737e8-d20c-08c5-7a2a-6c7f247b13a5
value
string

Defines the historical entity value

Example:
JS01
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/devices/3ef38763-2d6b-fb41-5c22-79989fa90bae/history HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "action": "SALE",
            "performed_on": 1618861892,
            "performed_by": {
                "type": "CONTACT",
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Jane Smith",
                "username": "janesmith@crm.com"
            },
            "origin": {
                "type": "SUBSCRIPTION",
                "id": "07d737e8-d20c-08c5-7a2a-6c7f247b13a5",
                "value": "JS01"
            },
            "destination": {
                "type": "WAREHOUSE",
                "id": "07d737e8-d20c-08c5-7a2a-6c7f247b13a5",
                "value": "JS01"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Device Ownership Transaction
POST /devices/{id}/ownership

Transfer the ownership of a device

Path variables

id
string GUID required

The device (identifier) to be transferred

Example:
97663bf8-7fb8-10b5-9387-47cd0ff2558c

Notes

CORE BEHAVIOR

Ownership transfer can be between an organisation to a contact, or between two contacts

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

The entity that will transfer the ownership of the device

Enumeration:
ORGANISATION
CONTACT
origin_id
string GUID required

Defines the entity (identifier) that such device’s ownership will be transferred from

Example:
d60ddb7a-31fd-d521-fa57-fc2a3624b462
destination_id
string GUID required

Defines the entity (identifier) that such device’s ownership will be transferred to, usually the destination is a Contact

Example:
4c6d275c-3e97-1bf1-62c6-2d27610e20f0

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The device identifier

Example:
97663bf8-7fb8-10b5-9387-47cd0ff2558c
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://stagingapi.crm.com/backoffice/v1/devices/6A24D2B5E44F44B28451FE021FCAD51E/ownership_transfer HTTP/1.1 

Content-Type: application/json

{
    "origin_entity": "CONTACT",
    "origin_id": "6A24D2B5E44F44B28451FE021FCAD51E",
    "destination_id": "6A24D2B5E44F44B28451FE021FCAD51E"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "6A24D2B5E44F44B28451FE021FCAD51E"
}
Estimates
POST /estimates/allowance
POST /estimates/billing
POST /estimates/invoicing
POST /estimates/order_fulfillment
POST /estimates/orders
POST /estimates/purchases
POST /estimates/service_delivery
GET /products/recommendation
Authorise Usage Consumption
POST /estimates/allowance

Returns an estimation on whether a contact is allowed to consume usage allowance and if yes, the remaining one.

Request parameters

include_remaining
boolean optional

Set to True if the remaining ausage allowance should also be included in the response. When set to False, the Web API just informs whether usage consumption is authorised or not.

Default:
true

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
contact_id
string required

The contact consuming usage

product_id
string required

The usage product identifier

service
Object

The identifier of the service through which usage is consumed. If not specified, then the response will include all termed and one-time services that allow the specified contact to consume usage. In the latter case, one-time services which are expired or fully consumed are not returned. For termed services, only non-cancelled ones are returned

id
string required

the unique identifier of the service

classification
string required
Enumeration:
TERMED_SERVICE
ONE_TIME_SERVICE
organisation_id
string

The organisation at which usage is consumed

cash_amount
number nullable

The consumed usage’s charged amount.

currency_code
string

The charged amount’s currency.

usage_amount
number nullable

The consumed usage’s amount/volume

Responses

200 OK
Body
Object
estimation_id
string
services
Array
Object
authorise_consumption
boolean

Returned are True if usage can be consumed, i.e. termed/one-time service has remaining allowance. If no usage allowance limits are set, then usage is always authorised.

Example:
true
currency_code
string

The currency code reated to usage cash amount limits

Example:
EUR
service
Object

The one-time/termed service through which usage is consumed

id
string
classification
string
Enumeration:
ONE_TIME_SERVICE
TERMED_SERVICE
product
Object
id
string
sku
string
name
string
accumulated_allowance
Object
cash_amounts
Object
per_transaction
number
Example:
9.99
per_day
number
Example:
19.99
per_billing_cycle
number
Example:
59.99
products_allowance
Array
Object
item_type
string
Example:
PRODUCT
item_id
string
name
string
remaining_cash
Object
per_transaction
number
Example:
9.99
per_day
number
Example:
19.99
per_billing_cycle
number
Example:
59.99
remaining_usage
Object
per_transaction
number
Example:
9.99
per_day
number
Example:
19.99
per_billing_cycle
number
Example:
59.99
measurement_unit
Object
id
string
name
string
display_name
string
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/estimates/allowance HTTP/1.1 

Content-Type: application/json

{
    "contact_id": "",
    "product_id": "",
    "service": {
        "id": "",
        "classification": "ONE_TIME_SERVICE"
    },
    "organisation_id": "",
    "cash_amount": 1,
    "currency_code": "",
    "usage_amount": 1
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "estimation_id": "",
    "services": [
        {
            "authorise_consumption": true,
            "currency_code": "EUR",
            "service": {
                "id": "",
                "classification": "ONE_TIME_SERVICE",
                "product": {
                    "id": "",
                    "sku": "",
                    "name": ""
                }
            },
            "accumulated_allowance": {
                "cash_amounts": {
                    "per_transaction": 9.99,
                    "per_day": 19.99,
                    "per_billing_cycle": 59.99
                }
            },
            "products_allowance": [
                {
                    "item_type": "PRODUCT",
                    "item_id": "",
                    "name": "",
                    "remaining_cash": {
                        "per_transaction": 9.99,
                        "per_day": 19.99,
                        "per_billing_cycle": 59.99
                    },
                    "remaining_usage": {
                        "per_transaction": 9.99,
                        "per_day": 19.99,
                        "per_billing_cycle": 59.99
                    },
                    "measurement_unit": {
                        "id": "",
                        "name": "",
                        "display_name": ""
                    }
                }
            ]
        }
    ]
}
Billing
POST /estimates/billing

Returns an estimation of a subscriber’s upcoming billing

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
contact_id
string nullable
organisation_id
string nullable
account_id
string nullable
as_of_date
integer
Example:
1234567
upcoming_billing_cycles
integer
Default:
1
Example:
3
subscription_id
string

The subscirptipon to be billed. If not specified, then all of the subscirpitons of the specified contact/account are billed, otherwise, if a subscription is specified, then the selected subscirpiton’s bill preview is presented

Responses

200 OK
Body
Object
billing_estimate
Array
Object
billing_date
integer
Example:
12345678
billed_period
Object
from_date
integer
Example:
12345678
to_date
integer
Example:
12345678
account
Object
id
string
number
string
name
string
totals
Object
total_amount
number
Example:
9.99
tax_amount
number
Example:
1.99
net_amount
number
Example:
1.99
discount_amount
number
Example:
1.99
invoicing
Array
Object
issued_date
integer
Example:
123456789
due_date
integer
Example:
123456789
currency_code
string
Example:
EUR
is_credit
boolean
wallet_funds_amount
number
Example:
5.99
total_net_amount
integer
Example:
1
total_discount_amount
integer
Example:
1
total_discount_incl_tax
integer
Example:
1
total_tax_amount
number
Example:
0.99
total_price
number

Sum of all products’ prices as these are defined in the product catalog

total_amount
number

Total amount of the invoice that will be generated. Includes taxed and disoucnt amounts

Example:
9.99
amount_due
string

The amount that will be due at the time of the estimation

amount_to_collect
number

Amount that the customer needs to pay at the time of the estimation

taxes_breakdown
Array
Object
tax_amount
number
Example:
0.99
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
line_items
Array
Object
quantity
integer
Example:
1
unit_price
number
Example:
9.99
net_amount
number
Example:
9.99
discount_amount
number
Example:
1
sub_total
number
Example:
9.99
pricing
number

The price of the product as this is configured in the product catalog (including tax or not depending on the tax model)

Example:
11.99
period
Object
from
integer

The date from which the service is invoiced/credited

Example:
1651172405
to
integer

The date until which the service is invoiced/credited

Example:
1653764405
product
Object

Details about the product

id
string GUID

The product identifier

Example:
ba603bdc-f18f-1d4e-dd07-ad6b57c6e565
sku
string

The product SKU

Example:
DEC1234
name
string

The product name

Example:
Decoder
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
discount
Object

Details about the applied discount

discount_amount
number
Example:
0.96
discount_percentage
number
Example:
1.5
discount_incl_tax
number
Example:
0.98
applied_taxes
Array

Details about the applied taxes

Object
tax_amount
number
Example:
0.99
tax_exempt_reason
string
Example:
CONTACT
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
bundle_product
Object

Defines the main product that the line item is component to it (applicable only when the line item is invoiced as a component of another product)

id
string GUID

The product identifier

Example:
31f2e99d-a5cb-21c1-2866-1a1491989893
sku
string

The product sku

Example:
ICL-001
name
string

The product name

Example:
Iced Latte
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
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/estimates/billing HTTP/1.1 

Content-Type: application/json

{
    "contact_id": "",
    "organisation_id": "",
    "account_id": "",
    "as_of_date": 1234567,
    "upcoming_billing_cycles": 3,
    "subscription_id": ""
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "billing_estimate": [
        {
            "billing_date": 12345678,
            "billed_period": {
                "from_date": 12345678,
                "to_date": 12345678
            },
            "account": {
                "id": "",
                "number": "",
                "name": ""
            },
            "totals": {
                "total_amount": 9.99,
                "tax_amount": 1.99,
                "net_amount": 1.99,
                "discount_amount": 1.99
            },
            "invoicing": [
                {
                    "issued_date": 123456789,
                    "due_date": 123456789,
                    "currency_code": "EUR",
                    "is_credit": true,
                    "wallet_funds_amount": 5.99,
                    "total_net_amount": 1,
                    "total_discount_amount": 1,
                    "total_discount_incl_tax": 1,
                    "total_tax_amount": 0.99,
                    "total_price": 1,
                    "total_amount": 9.99,
                    "amount_due": "",
                    "amount_to_collect": 1,
                    "taxes_breakdown": [
                        {
                            "tax_amount": 0.99,
                            "tax_rate": {
                                "id": "",
                                "name": "",
                                "tax_code": "VAT",
                                "percentage": 1
                            }
                        }
                    ],
                    "line_items": [
                        {
                            "quantity": 1,
                            "unit_price": 9.99,
                            "net_amount": 9.99,
                            "discount_amount": 1,
                            "sub_total": 9.99,
                            "pricing": 11.99,
                            "period": {
                                "from": 1651172405,
                                "to": 1653764405
                            },
                            "product": {
                                "id": "ba603bdc-f18f-1d4e-dd07-ad6b57c6e565",
                                "sku": "DEC1234",
                                "name": "Decoder",
                                "classification": "TRACEABLE_PHYSICAL_GOOD"
                            },
                            "discount": {
                                "discount_amount": 0.96,
                                "discount_percentage": 1.5,
                                "discount_incl_tax": 0.98
                            },
                            "applied_taxes": [
                                {
                                    "tax_amount": 0.99,
                                    "tax_exempt_reason": "CONTACT",
                                    "tax_rate": {
                                        "id": "",
                                        "name": "",
                                        "tax_code": "VAT",
                                        "percentage": 1
                                    }
                                }
                            ],
                            "bundle_product": {
                                "id": "31f2e99d-a5cb-21c1-2866-1a1491989893",
                                "sku": "ICL-001",
                                "name": "Iced Latte",
                                "classification": "TRACEABLE_PHYSICAL_GOOD"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}
Invoicing
POST /estimates/invoicing

Estimates how a product will be charged in invoices, quotations, billing without generating any invoices etc. Pricing estimation includes the price, all applicable promotions as well as the taxes to be applied.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
contact_id
string GUID nullable

The contact’s unique identifier.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
account_id
string GUID nullable

The account’s unique identifier

Example:
24c0809f-ed91-4b68-b912-5bd6064d901e
supply_method
string
Enumeration:
ON_SITE
DELIVERY
PICK_UP
fulfilled_by
string

The unique idetifier of the organisation from which the customer purchases prducts

line_items
Array required
Min items: 1
Object
product_id
string GUID required

The unique identifier of a product

bundle_product_id
string GUID
quantity
integer required
Default:
1
Example:
1
price
number

The unit price of the product. If specified, then the pricing strategy is not applied.

Example:
9.99
discount_option
string

Required if a discount value is specified.

Enumeration:
AMOUNT
PERCENTAGE
discount_value
number
Example:
1.11
tax_model
string

Required if a price is specified as input

Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
price_term_id
string

Applicable for termed and one-time services

discount
Object
amount
number
type
string
Enumeration:
AMOUNT
PERCENTAGE

Responses

200 OK

The request has succeeded

Body
Object
issued_date
integer
Example:
123456789
due_date
integer
Example:
123456789
currency_code
string
Example:
EUR
is_credit
boolean
wallet_funds_amount
number
Example:
5.99
total_net_amount
integer
Example:
1
total_discount_amount
integer
Example:
1
total_discount_incl_tax
integer
Example:
1
total_tax_amount
number
Example:
0.99
total_price
number

Sum of all products’ prices as these are defined in the product catalog

total_amount
number

Total amount of the invoice that will be generated. Includes taxed and disoucnt amounts

Example:
9.99
amount_due
string

The amount that will be due at the time of the estimation

amount_to_collect
number

Amount that the customer needs to pay at the time of the estimation

taxes_breakdown
Array
Object
tax_amount
number
Example:
0.99
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
line_items
Array
Object
quantity
integer
Example:
1
unit_price
number
Example:
9.99
net_amount
number
Example:
9.99
discount_amount
number
Example:
1
sub_total
number
Example:
9.99
pricing
number

The price of the product as this is configured in the product catalog (including tax or not depending on the tax model)

Example:
11.99
period
Object
from
integer

The date from which the service is invoiced/credited

Example:
1651172405
to
integer

The date until which the service is invoiced/credited

Example:
1653764405
product
Object

Details about the product

id
string GUID

The product identifier

Example:
ba603bdc-f18f-1d4e-dd07-ad6b57c6e565
sku
string

The product SKU

Example:
DEC1234
name
string

The product name

Example:
Decoder
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
discount
Object

Details about the applied discount

discount_amount
number
Example:
0.96
discount_percentage
number
Example:
1.5
discount_incl_tax
number
Example:
0.98
applied_taxes
Array

Details about the applied taxes

Object
tax_amount
number
Example:
0.99
tax_exempt_reason
string
Example:
CONTACT
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
bundle_product
Object

Defines the main product that the line item is component to it (applicable only when the line item is invoiced as a component of another product)

id
string GUID

The product identifier

Example:
31f2e99d-a5cb-21c1-2866-1a1491989893
sku
string

The product sku

Example:
ICL-001
name
string

The product name

Example:
Iced Latte
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
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/estimates/invoicing HTTP/1.1 

Content-Type: application/json

{
    "contact_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "account_id": "24c0809f-ed91-4b68-b912-5bd6064d901e",
    "supply_method": "DELIVERY",
    "fulfilled_by": "",
    "line_items": [
        {
            "product_id": "",
            "bundle_product_id": "",
            "quantity": 1,
            "price": 9.99,
            "discount_option": "AMOUNT",
            "discount_value": 1.11,
            "tax_model": "TAX_EXCLUSIVE",
            "price_term_id": ""
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "issued_date": 123456789,
    "due_date": 123456789,
    "currency_code": "EUR",
    "is_credit": true,
    "wallet_funds": 5.99,
    "total_net_amount": 1,
    "total_discount_amount": 1,
    "total_discount_incl_tax": 1,
    "total_tax_amount": 0.99,
    "total_amount": 9.99,
    "taxes_breakdown": [
        {
            "tax_amount": 0.99,
            "tax_rate": {
                "id": "",
                "name": "",
                "tax_code": "VAT",
                "percentage": 1
            }
        }
    ],
    "line_items": [
        {
            "id": "7CD9C84FA60F9FE407140E20F707726A",
            "sku": "",
            "name": "",
            "tax_model": "TAX_INCLUSIVE",
            "pricing_model": "TIERED",
            "currency": "EUR",
            "quantity": 1,
            "unit_price": 9.99,
            "price_incl_tax": 11.99,
            "net_amount": 9.99,
            "discount": {
                "discount_amount": 0.96,
                "discount_percentage": 1.5,
                "discount_incl_tax": 0.98
            },
            "tax_amount": 0.99,
            "sub_total": 9.99,
            "classification": "",
            "applied_taxes": [
                {
                    "tax_amount": 0.99,
                    "tax_exempt_reason": "CONTACT",
                    "tax_rate": {
                        "id": "",
                        "name": "",
                        "tax_code": "VAT",
                        "percentage": 1
                    }
                }
            ]
        }
    ]
}
Order Fulfillment
POST /estimates/order_fulfillment

Preview order fulfillment information

Notes

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

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

application/json
Object
supply_method
string required

Preview order based on the supply method

Enumeration:
DELIVERY
PICK_UP
DIRECT_SALE
is_open
boolean

Preview order only for open venues

Example:
true
postal_code
string

Preview order based on the postal code

Example:
2415
lat_lot
string

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

Example:
35.157204,33.314151
address_id
string GUID

Preview order based on the customer address

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

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

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

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

time
integer required

The order ahead time

Example:
30
time_unit
string required

The order ahead time unit

Example:
MINUTES
date
integer epoch required

The order ahead date

Example:
12312323123
queue_id
string GUID

The id of the queue selected

Example:
532652ff-10b2-1f88-914a-df316249ccf0

Responses

200 200

The request has succeeded

Body
application/json
Array
Object
fulfilled_by
Object

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

id
string GUID

The organisation identifier

Example:
3FD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation name

Example:
Best Burger Egkomi
phone
string

The organisation phone number

Example:
+6934222321
address
Object

The organisation address

address_line_1
string

The address line 1

Example:
Ilia Papakyriakou 21
address_line_2
string

The address line 2

Example:
7 Stars Tower
state_province_county
string

The address state/province/county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
lat
string

The latitude of the location

Example:
35.157115
lon
string

The longitude of the location

Example:
33.313719
google_place_id
string

The Google textual identifier that uniquely identifies a location

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
parent_organisation
Object

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

id
string GUID

The organisation identifier

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

The organisation name

Example:
Best Burger
creatives
Array
Object
id
string GUID

The creative identifier

Example:
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
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
payment_method_types
Array

The payment methods allowed when ordering from the organisation that fulfills the order

Example:
[
    "CASH","CARD"
]
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
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
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/estimates/order_fulfillment HTTP/1.1 

Content-Type: application/json

{
    "supply_method": "DIRECT_SALE",
    "is_open": true,
    "postal_code": "2415",
    "lat_lot": "35.157204,33.314151",
    "address_id": "28441e3e-767a-b6cc-9a59-6d7705de6428",
    "requested_organisation_id": "4456e728-019c-86e4-3e4f-bb7920e2ef75",
    "requested_delivery_at": {
        "time": 30,
        "time_unit": "MINUTES", 
        "date": 12312323123
    },
    "queue_id": "532652ff-10b2-1f88-914a-df316249ccf0"
}

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "fulfilled_by": { 
            "id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Best Burger Egkomi",
            "phone": "+6934222321",
            "address": {
                "address_line_1": "Ilia Papakyriakou 21",
                "address_line_2": "7 Stars Tower",
                "state_province_county": "Egkomi",
                "town_city": "Nicosia",
                "postal_code": "2415",
                "lat": "35.157115",
                "lon": "33.313719",
                "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
            },
            "parent_organisation": {
                "id": "b1607c37-e750-2324-ac49-6591a86f54b8",
                "name": "Best Burger",
                "creatives": [
                    {
                        "id": "CA123456789AQWSXZAQWS1236547896541",
                        "usage_type": "LOGO",
                        "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"
                            }
                        ]
                    }
                ]
            },
            "opening_hours": [
                {
                    "day_of_week": "MONDAY",
                    "opens": "09:00",
                    "closes": "20:00",
                    "operation": "ANY"
                }
            ],
            "short_term_operations": [
                {
                    "operation": "PICK_UP",
                    "is_closed": "false"
                }
            ],
            "payment_method_types": [
                "CRM_WALLET"
            ],
            "creatives": [
                {
                    "id": "CA123456789AQWSXZAQWS1236547896541",
                    "usage_type": "WALLET_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"
                        }
                    ]
                }
            ]
        }
    }
]
Orders
POST /estimates/orders

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

Notes

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

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

application/json
Object
account_id
string GUID required

The contact’s or organisation’s Account identifier. This must be an Active account.

Example:
1bd3e4d3-5981-209b-787d-352dcd5389a3
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
fulfilled_by
string GUID nullable

The organisation that will fulfill the Order. For Direct Sales, the Business itslef fulfills the Order.

Example:
271671a0-4bb3-9c2e-a9c7-6490dbfe5939
requested_delivery_at
Object

Time at which the contact requests the Order to be fulfilled. Applicable for Delivery and Pick up Orders

time
integer

Order to be fulfilled after a period of time

Example:
30
time_unit
string

Unit of time. Applicable when “time” is specified

Example:
MINUTES
date
integer epoch

Date on which the Order is requested to be fulfilled.

Example:
12312323123
address_info
Object

Appicable and required when the supply method is Delivery. either a contact address or a one-off address can be specified.

id
string nullable

Order to be fulfilled at one of the contact’s registered Addresses

Example:
Appicable and required when the supply method is Delivery
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
queue_id
string GUID required

The Order’s queue.

Example:
271671a0-4bb3-9c2e-a9c7-6490dbfe5939
use_wallet_funds
boolean

Defines whether the contact wants to use available funds from the CRM Wallet to fully or partially pay off the Order’s cost.

Default:
false
payment_method_type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
items
Array required

List of ordered items. At least one must be specified

Unique items: YES
Object
id
string GUID

Product identifier

Example:
7f45ad8a-b164-2a67-eb93-8651c0f1b101
quantity
integer

Quantity of ordered items

Example:
1
price
number

Unit price provided to the buyer. If not specified, then the Business’s pricing rules will be applied.

Example:
2.99
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
notes
string

Order item notes

price_terms_id
string GUID

Applicable and required for termed and one-time services. Also applicable for tracceable physical goods which are ordered as Rentals.

Example:
905a4a5d-80d4-1e18-4595-d03c2b9546e1
components
Array

List of components that is applicable when ordering products of bundle composition or products that include modifiers.

Unique items: YES
Object
id
string GUID required

Product identifier. This product must be only of the allowed ones of the bundle/composite product.

Example:
6e111025-002b-48d7-a675-6d9e48070b8f
quantity
integer

Quantity of the component. If not specified, then it defaults to 1

Example:
1
price
number nullable

The component product’s price. IF not specified, then the business’s pricing rules will be applied.

Example:
0.5
price_terms_id
string nullable

Applicable only when ordering a service bundle. This is the component service’s selected price.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
milestones
Array

These milestones will default to the milestones based on the queue type selected - unless they are edited by the user.

Unique items: YES
Object
stage_id
string GUID required

The stage on which the Milesotne’s Invoice will be issued. The allowed stages are defined in the order’s Queue, i.e. only Queue stages with a milestone are allowed to be specified as the Order’s milestone stages.

Example:
271671a0-4bb3-9c2e-a9c7-6490dbfe5939
percentage
number required nullable

This will be either be the value entered by the user or the value based on the queue stages configuration. Each milestone can either have a percentage or a specific amount, not both

Example:
20
amount
number required nullable

The milestone’s actual ammount to be paid on reaching a stage. Each milestone can either have a percentage or a specific amount, not both. The sum of all milestone amounts cannot exceed the order’s total cost.

Example:
9.99
discount
Object

Ad-hoc discount applied including tax

amount
number
type
string
Enumeration:
AMOUNT
PERCENTAGE
pass
Object

Redeemed Promotion pass for a subscription service

code
string

Pass code

Example:
TB68937255
otp
string

Pass associated OTP (roadmapped)

Example:
344566

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The order’s estimation_id. Use this id as input to POST /orders Web API to successfully place the new Order.

Example:
905a4a5d-80d4-1e18-4595-d03c2b9546e1
order_estimate
Object

The Order’s estimation.

ordering_allowed
boolean

Indicates whether minimum order amount is met and order can proceed with submission. the order’s amount is validated against the Applied Fulfillemnt policy’s rules.

Example:
true
minimum_amount
number

Defines the minimum order amount as specified in the fulfillment policy of the organisation fulfilling the order.

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

Estimated delivery information, i.e. when the order will be fulfilled.

time_to_deliver
integer

Time to fulfill

Example:
30
uot
string

Unit of time

Example:
minutes
delivered_at
integer epoch

Fulfilled by this time

Example:
12345565
queue
Object

The applied Queue that the order will follow

id
string

Order queue identifier

Example:
905a4a5d-80d4-1e18-4595-d03c2b9546e1
name
string

Queue name

Example:
Delivery Orders
invoice_estimate
Object
issued_date
integer
Example:
123456789
due_date
integer
Example:
123456789
currency_code
string
Example:
EUR
is_credit
boolean
wallet_funds_amount
number
Example:
5.99
total_net_amount
integer
Example:
1
total_discount_amount
integer
Example:
1
total_discount_incl_tax
integer
Example:
1
total_tax_amount
number
Example:
0.99
total_price
number

Sum of all products’ prices as these are defined in the product catalog

total_amount
number

Total amount of the invoice that will be generated. Includes taxed and disoucnt amounts

Example:
9.99
amount_due
string

The amount that will be due at the time of the estimation

amount_to_collect
number

Amount that the customer needs to pay at the time of the estimation

taxes_breakdown
Array
Object
tax_amount
number
Example:
0.99
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
line_items
Array
Object
quantity
integer
Example:
1
unit_price
number
Example:
9.99
net_amount
number
Example:
9.99
discount_amount
number
Example:
1
sub_total
number
Example:
9.99
pricing
number

The price of the product as this is configured in the product catalog (including tax or not depending on the tax model)

Example:
11.99
period
Object
from
integer

The date from which the service is invoiced/credited

Example:
1651172405
to
integer

The date until which the service is invoiced/credited

Example:
1653764405
product
Object

Details about the product

id
string GUID

The product identifier

Example:
ba603bdc-f18f-1d4e-dd07-ad6b57c6e565
sku
string

The product SKU

Example:
DEC1234
name
string

The product name

Example:
Decoder
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
discount
Object

Details about the applied discount

discount_amount
number
Example:
0.96
discount_percentage
number
Example:
1.5
discount_incl_tax
number
Example:
0.98
applied_taxes
Array

Details about the applied taxes

Object
tax_amount
number
Example:
0.99
tax_exempt_reason
string
Example:
CONTACT
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
bundle_product
Object

Defines the main product that the line item is component to it (applicable only when the line item is invoiced as a component of another product)

id
string GUID

The product identifier

Example:
31f2e99d-a5cb-21c1-2866-1a1491989893
sku
string

The product sku

Example:
ICL-001
name
string

The product name

Example:
Iced Latte
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
service_delivery_estimate
Array

Applicable only when purchasing termed services and/or renting devices

Object
action_allowed
boolean
Example:
true
allowed_execution_on
integer
Example:
12345678
next_billing_date
integer
Example:
1235678
next_payment_date
integer
Example:
12345678
subscription
Object
life_cycle_state
string
Example:
ACTIVE
terms
Object
billing_period
Object
duration
integer
Example:
1
uot
string
Example:
MONTHS
billing_day
Object
day_of_month
integer
Example:
5
day_of_week
string
Example:
MONDAY
services_to_add
Array
Object
life_cycle_state
string
Example:
EFFECTIVE
quantity
integer
Example:
5
product
Object
id
string
sku
string
name
string
classification
string
Example:
TERMED_SERVICE
trial_period
Object
starts_on
integer
Example:
12345678
ends_on
integer
Example:
12345678
components
Array
Object
id
string
Example:
b82648cb-e5f4-53b2-26b3-edca38e3e34f
sku
string
name
string
dependencies
Array
Object
item_type
string
item_id
string
item_name
string
billing_estimate
Object
billing_date
integer
Example:
12345678
billed_period
Object
from_date
integer
Example:
12345678
to_date
integer
Example:
12345678
totals
Object
total_amount
number
Example:
9.99
tax_amount
number
Example:
1.99
net_amount
number
Example:
1.99
discount_amount
number
Example:
1.99
invoice_estimate
Object
issued_date
integer
Example:
123456789
due_date
integer
Example:
123456789
currency_code
string
Example:
EUR
is_credit
boolean
wallet_funds_amount
number
Example:
5.99
total_net_amount
integer
Example:
1
total_discount_amount
integer
Example:
1
total_discount_incl_tax
integer
Example:
1
total_tax_amount
number
Example:
0.99
total_price
number

Sum of all products’ prices as these are defined in the product catalog

total_amount
number

Total amount of the invoice that will be generated. Includes taxed and disoucnt amounts

Example:
9.99
amount_due
string

The amount that will be due at the time of the estimation

amount_to_collect
number

Amount that the customer needs to pay at the time of the estimation

taxes_breakdown
Array
Object
tax_amount
number
Example:
0.99
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
line_items
Array
Object
quantity
integer
Example:
1
unit_price
number
Example:
9.99
net_amount
number
Example:
9.99
discount_amount
number
Example:
1
sub_total
number
Example:
9.99
pricing
number

The price of the product as this is configured in the product catalog (including tax or not depending on the tax model)

Example:
11.99
period
Object
from
integer

The date from which the service is invoiced/credited

Example:
1651172405
to
integer

The date until which the service is invoiced/credited

Example:
1653764405
product
Object

Details about the product

id
string GUID

The product identifier

Example:
ba603bdc-f18f-1d4e-dd07-ad6b57c6e565
sku
string

The product SKU

Example:
DEC1234
name
string

The product name

Example:
Decoder
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
discount
Object

Details about the applied discount

discount_amount
number
Example:
0.96
discount_percentage
number
Example:
1.5
discount_incl_tax
number
Example:
0.98
applied_taxes
Array

Details about the applied taxes

Object
tax_amount
number
Example:
0.99
tax_exempt_reason
string
Example:
CONTACT
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
bundle_product
Object

Defines the main product that the line item is component to it (applicable only when the line item is invoiced as a component of another product)

id
string GUID

The product identifier

Example:
31f2e99d-a5cb-21c1-2866-1a1491989893
sku
string

The product sku

Example:
ICL-001
name
string

The product name

Example:
Iced Latte
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
milestone_plan
Array

The Order’s milestone plans plus each milestone’s amount.

Object
stage
Object

The milestone’s stage i.e. when the Invoice will be issued.

id
string GUID

Order stage identifier

Example:
b82648cb-e5f4-53b2-26b3-edca38e3e34f
name
string

Stage name

Example:
Accepted
order
integer

Each milestone’s ordering along the Order’s life cycle.

Example:
1
percentage
number

The milestone’s percentage

Enumeration:
5.5
amount
number

The milestone’s calculated amount based on the percentage set and the order’s total cost.

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/estimates/orders HTTP/1.1 

Content-Type: application/json

{
    "account_id": "1bd3e4d3-5981-209b-787d-352dcd5389a3",
    "supply_method": "DELIVERY",
    "fulfilled_by": "271671a0-4bb3-9c2e-a9c7-6490dbfe5939",
    "requested_delivery_at": {
        "time": 30,
        "time_unit": "MINUTES",
        "date": 12312323123
    },
    "address_info": {
        "id": "Appicable and required when the supply method is Delivery",
        "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"
        }
    },
    "queue_id": "271671a0-4bb3-9c2e-a9c7-6490dbfe5939",
    "use_wallet_funds": "false",
    "payment_method_type": "CRM_WALLET",
    "items": [
        {
            "id": "7f45ad8a-b164-2a67-eb93-8651c0f1b101",
            "quantity": 1,
            "price": 2.99,
            "tax_model": "TAX_INCLUSIVE",
            "notes": "",
            "price_terms_id": "905a4a5d-80d4-1e18-4595-d03c2b9546e1",
            "components": [
                {
                    "id": "6e111025-002b-48d7-a675-6d9e48070b8f",
                    "quantity": 1,
                    "price": 0.5,
                    "price_terms_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "tax_model": "TAX_INCLUSIVE"
                }
            ]
        }
    ],
    "milestones": [
        {
            "stage_id": "271671a0-4bb3-9c2e-a9c7-6490dbfe5939",
            "percentage": 20,
            "amount": 9.99
        }
    ],
    "discount": {
        "amount": 1,
        "type": "AMOUNT"
    },
    "pass": {
        "code": "TB68937255",
        "otp": "344566"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "905a4a5d-80d4-1e18-4595-d03c2b9546e1",
    "order_estimate": {
        "ordering_allowed": "true",
        "minimum_amount": 1,
        "fulfilled_by": {
            "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
            "name": "Bravo Coffee"
        },
        "estimated_delivery": {
            "time_to_deliver": 30,
            "uot": "minutes",
            "delivered_at": 12345565
        },
        "queue": {
            "id": "905a4a5d-80d4-1e18-4595-d03c2b9546e1",
            "name": "Delivery Orders"
        }
    },
    "invoice_estimate": {
        "issued_date": 123456789,
        "due_date": 123456789,
        "currency_code": "EUR",
        "is_credit": true,
        "wallet_funds_amount": 5.99,
        "total_net_amount": 1,
        "total_discount_amount": 1,
        "total_discount_incl_tax": 1,
        "total_tax_amount": 0.99,
        "total_price": 1,
        "total_amount": 9.99,
        "amount_due": "",
        "amount_to_collect": 1,
        "taxes_breakdown": [
            {
                "tax_amount": 0.99,
                "tax_rate": {
                    "id": "",
                    "name": "",
                    "tax_code": "VAT",
                    "percentage": 1
                }
            }
        ],
        "line_items": [
            {
                "quantity": 1,
                "unit_price": 9.99,
                "net_amount": 9.99,
                "discount_amount": 1,
                "sub_total": 9.99,
                "pricing": 11.99,
                "period": {
                    "from": 1651172405,
                    "to": 1653764405
                },
                "product": {
                    "id": "ba603bdc-f18f-1d4e-dd07-ad6b57c6e565",
                    "sku": "DEC1234",
                    "name": "Decoder",
                    "classification": "TRACEABLE_PHYSICAL_GOOD"
                },
                "discount": {
                    "discount_amount": 0.96,
                    "discount_percentage": 1.5,
                    "discount_incl_tax": 0.98
                },
                "applied_taxes": [
                    {
                        "tax_amount": 0.99,
                        "tax_exempt_reason": "CONTACT",
                        "tax_rate": {
                            "id": "",
                            "name": "",
                            "tax_code": "VAT",
                            "percentage": 1
                        }
                    }
                ],
                "bundle_product": {
                    "id": "31f2e99d-a5cb-21c1-2866-1a1491989893",
                    "sku": "ICL-001",
                    "name": "Iced Latte",
                    "classification": "TRACEABLE_PHYSICAL_GOOD"
                }
            }
        ]
    },
    "service_delivery_estimate": [
        {
            "action_allowed": true,
            "allowed_execution_on": 12345678,
            "next_billing_date": 1235678,
            "next_payment_date": 12345678,
            "subscription": {
                "life_cycle_state": "ACTIVE",
                "terms": {
                    "billing_period": {
                        "duration": 1,
                        "uot": "MONTHS"
                    },
                    "billing_day": {
                        "day_of_month": 5,
                        "day_of_week": "MONDAY"
                    }
                }
            },
            "services_to_add": [
                {
                    "life_cycle_state": "EFFECTIVE",
                    "quantity": 5,
                    "product": {
                        "id": "",
                        "sku": "",
                        "name": "",
                        "classification": "TERMED_SERVICE"
                    },
                    "trial_period": {
                        "starts_on": 12345678,
                        "ends_on": 12345678
                    },
                    "components": [
                        {
                            "id": "b82648cb-e5f4-53b2-26b3-edca38e3e34f",
                            "sku": "",
                            "name": ""
                        }
                    ],
                    "dependencies": [
                        {
                            "item_type": "",
                            "item_id": "",
                            "item_name": ""
                        }
                    ]
                }
            ],
            "billing_estimate": {
                "billing_date": 12345678,
                "billed_period": {
                    "from_date": 12345678,
                    "to_date": 12345678
                },
                "totals": {
                    "total_amount": 9.99,
                    "tax_amount": 1.99,
                    "net_amount": 1.99,
                    "discount_amount": 1.99
                },
                "invoice_estimate": {
                    "issued_date": 123456789,
                    "due_date": 123456789,
                    "currency_code": "EUR",
                    "is_credit": true,
                    "wallet_funds_amount": 5.99,
                    "total_net_amount": 1,
                    "total_discount_amount": 1,
                    "total_discount_incl_tax": 1,
                    "total_tax_amount": 0.99,
                    "total_price": 1,
                    "total_amount": 9.99,
                    "amount_due": "",
                    "amount_to_collect": 1,
                    "taxes_breakdown": [
                        {
                            "tax_amount": 0.99,
                            "tax_rate": {
                                "id": "",
                                "name": "",
                                "tax_code": "VAT",
                                "percentage": 1
                            }
                        }
                    ],
                    "line_items": [
                        {
                            "quantity": 1,
                            "unit_price": 9.99,
                            "net_amount": 9.99,
                            "discount_amount": 1,
                            "sub_total": 9.99,
                            "pricing": 11.99,
                            "period": {
                                "from": 1651172405,
                                "to": 1653764405
                            },
                            "product": {
                                "id": "ba603bdc-f18f-1d4e-dd07-ad6b57c6e565",
                                "sku": "DEC1234",
                                "name": "Decoder",
                                "classification": "TRACEABLE_PHYSICAL_GOOD"
                            },
                            "discount": {
                                "discount_amount": 0.96,
                                "discount_percentage": 1.5,
                                "discount_incl_tax": 0.98
                            },
                            "applied_taxes": [
                                {
                                    "tax_amount": 0.99,
                                    "tax_exempt_reason": "CONTACT",
                                    "tax_rate": {
                                        "id": "",
                                        "name": "",
                                        "tax_code": "VAT",
                                        "percentage": 1
                                    }
                                }
                            ],
                            "bundle_product": {
                                "id": "31f2e99d-a5cb-21c1-2866-1a1491989893",
                                "sku": "ICL-001",
                                "name": "Iced Latte",
                                "classification": "TRACEABLE_PHYSICAL_GOOD"
                            }
                        }
                    ]
                }
            }
        }
    ],
    "milestone_plan": [
        {
            "stage": {
                "id": "b82648cb-e5f4-53b2-26b3-edca38e3e34f",
                "name": "Accepted",
                "order": 1
            },
            "percentage": "5.5",
            "amount": 1
        }
    ]
}
Purchase Estimates
POST /estimates/purchases

Preview purchase information (including awards and spends) before submitting a purchase customer event

Notes

PURCHASE ESTIMATES FLOW

Integrating purchase estimates in a “submit purchase” flow the following APIs should be called

  1. POST /estimates/purchases
  2. POST /purchases by providing the estimates identifier as return from previous API call

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
date
integer epoch nullable

The date that the customer event was performed

Example:
1622863554
classification
Object nullable

The purchase classification

id
string GUID required nullable

The customer event classification identifier

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

The customer event classification name

Example:
Delivery Purchase
products
Array

The purchased products. Applicable and required when net/tax/total amounts are not provided

Object
product_sku
string required nullable

The purchased product sku (product sku and product family are semi-optional)

Example:
FREDESPR001
product_name
string nullable

The purchased product name

Example:
Freddo Espresso
product_family
string required nullable

The purchased product family (product sku and product family are semi-optional)

Example:
Chocolates
net_amount
number required

The purchased product net amount

Example:
14.15
tax_amount
number required

The purchased product vat amount

Example:
1.04
total_amount
number required

The purchased product total amount (net and vat amount)

Example:
15.19
quantity
integer nullable

The purchased quantity

Default:
1
Example:
2
transaction_amounts
Object required nullable

Details about total transaction amounts (products and transaction amounts are semi-optional)

net
number required nullable

The net amount

Example:
12.11
tax
number required nullable

The tax amount

Example:
0.11
total
number required nullable

The total amount (net + tax)

Example:
11
discount
number nullable

The discount amount

Example:
1
organisation
Object

Details about the organisation that purchase was submitted from (id or taps are semi-optional)

id
string GUID required nullable

The organisation identifier

Example:
5eb64e17-154f-4e47-ab8b-14e56c0be3e8
merchant_tap
Object required nullable

The transaction acquiring point that the event was submitted from (id or code must be specified). TAP and Organisation (id) attributes are semi-optional

id
string GUID required nullable

The transaction acquiring point identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
code
string required nullable

The transaction acquiring point code

Example:
TAP001
venue_tap
Object required nullable

The transaction acquiring point that the event was submitted from (id or code must be specified). TAP and Organisation (id) attributes are semi-optional

id
string GUID required nullable

The transaction acquiring point identifier

Example:
4c01d5e4-02c9-ae89-4a3c-eaeb3174fcf0
code
string required nullable

The transaction acquiring point code

Example:
TAP001
contact
Object required nullable

Defines the contact for whom the purchase is created for (customer identification can be made either using contact id, contact code, cim, contact_token or contact masked card)

id
string GUID required nullable

The contact identifier

Example:
ff67c281-d408-5a10-494a-0bf5e4a86059
code
string required nullable

The contact code

Example:
CO12345
cim
string required nullable

The contact cim

Example:
93002149
otp
string required nullable

The contact OTP token

Example:
447212
spend_request
Object nullable

Information related with the spend request that should be created as part of the purchase

amount
number required nullable

The amount requested to be spent (spend, instant_spend and amount are semi-optional)

Example:
2.12
spend
boolean required nullable

Defines whether spend will be calculated across any available balance (e.g. instant offers and available wallet balance) (spend, instant_spend and amount are semi-optional)

Example:
false
instant_spend
boolean required nullable

Defines whether spend will be calculated only based on instant offers (e.g. free product, amount) (spend, instant_spend and amount are semi-optional)

Example:
true
restrict_fully_covered
boolean nullable

Defines whether the purchase will be posted successfully only if requested spend amount is fully covered by the available wallet balance

Example:
true
pass
Object nullable

Details about the pass

type
string

Defines the pass type

Enumeration:
PROMOTION
GIFT
TOP_UP
Default:
PROMOTION
code
string required

The pass code. For Promotion passes - a Promotion pass will be generated and redeemed as part of the process, the contact_id should also be provided

Example:
SI8276333
pin
string

The pass assocaited pin (if applicable) should be set here for validation

  • If validation is successful, the Purchase Event will be created and wallet funds will be consumed
  • If validation is unsuccessful, the Purchase Event won’t be created and wallet funds won’t be consumed
Example:
1234
otp
string nullable

The pass one time password (if applicable) - not implemented yet for passes

Example:
445729

Responses

201 Created

The request has succeeded

Body
application/json
Object
id
string GUID

The purchase estimates identifier (can be used on post purchase instead of re-submitting the whole purchase event)

Example:
cec7736c-75ba-93a0-56f5-6171ae8d4f02
rewards
Object

Details about reward amounts

spend
number

The total (actual) spent amount

Example:
1.72
open_spend
number

The spent amount from wallet’s open balance

Example:
1.01
commerce_spend
number

The spent amount from wallet’s commerce balance

Example:
0.71
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/estimates/purchases HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "date": 1622863554,
    "classification": {
        "name": "Delivery Purchase"
    },
    "products": [
        {
            "product_sku": "FREDESPR001",
            "product_name": "Freddo Espresso",
            "product_family": "Chocolates",
            "net_amount": 14.15,
            "tax_amount": 1.04,
            "total_amount": 15.19,
            "quantity": 2
        }
    ],
    "transaction_amounts": {
        "discount": 1
    },
    "organisation": {
        "venue_tap": {
            "code": "TAP001"
        }
    },
    "contact": {
        "otp": "447212"
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "cec7736c-75ba-93a0-56f5-6171ae8d4f02",
    "rewards": {
        "spend": 1.72
    }
}
Service Delivery
POST /estimates/service_delivery

Returns an estimation of a change perfromed on a subscription service, without making the change. The estimation is based on existing services owned by the customer plus any requested changes.

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
Example:
CHANGE_TERMS
contact_id
string nullable
organisation_id
string nullable
account_id
string required
subscription_id
string
scheduled_date
integer
Example:
12345678
number_of_days
integer
Example:
3
subscription_term_changes
Object
billing_day
Object
day_of_month
integer
Example:
1
day_of_week
string
Example:
MONDAY
payment_method_id
string
funding_source
string
Enumeration:
WALLET
ACCOUNT
services_to_add
Array
Object
product_id
string
price_terms_id
string
quantity
integer
components
Array
Object
product_id
string
price_terms_id
string
services_to_remove
Array
Object
id
string
services_to_change
Array
Object
from_service_id
string
to_service_product_id
string
to_price_terms_id
string
components
Array
Object
product_id
string
price_terms_id
string
service_term_changes
Array
Object
service_id
string
auto_renewal_preference
string
Example:
OPT_IN, OPT_OUT
contract_preference
string
Example:
RENEW, EXTEND
extend_by
Object
period
integer
Example:
3
uot
string
Example:
DAYS
quantity
integer
component_changes
Object

Applicable when amending a flexible service bundle. At least one components should be specifid as either to be added or removed

id
string required

The unique identifier of the service

to_be_added
Array nullable
Unique items: YES
Object
product_id
string
price_terms_id
string
to_be_removed
Array nullable
Unique items: YES
Object
id
string

The service components to be removed

Responses

200 OK
Body
Object
service_delivery_estimate
Array
Object
action_allowed
boolean
Example:
true
allowed_execution_on
integer
Example:
12345678
next_billing_date
integer
Example:
1235678
next_payment_date
integer
Example:
12345678
subscription
Object
life_cycle_state
string
Example:
ACTIVE
terms
Object
billing_period
Object
duration
integer
Example:
1
uot
string
Example:
MONTHS
billing_day
Object
day_of_month
integer
Example:
5
day_of_week
string
Example:
MONDAY
services_to_add
Array
Object
life_cycle_state
string
Example:
EFFECTIVE
product
Object
id
string
sku
string
name
string
trial_period
Object
starts_on
integer
Example:
12345678
ends_on
integer
Example:
12345678
dependencies
Array
Object
item_type
string
item_id
string
item_name
string
services_to_remove
Array
Object
id
string
life_cycle_state
string
Example:
CANCELLED
product
Object
id
string
sku
string
name
string
services_to_change
Array
Object
id
string
life_cycle_state
string
Example:
SWAPPED
product
Object
id
string
sku
string
name
string
change_to_product
Object
id
string
sku
string
name
string
dependencies
Array
Object
item_type
string
item_id
string
item_name
string
components_change
Object
service
Object
id
string
sku
string
name
string
components_added
Array
Object
id
string
sku
string
name
string
components_removed
Array
Object
id
string
sku
string
name
string
billing_estimate
Object
billing_date
integer
Example:
12345678
billed_period
Object
from_date
integer
Example:
12345678
to_date
integer
Example:
12345678
totals
Object
total_amount
number
Example:
9.99
tax_amount
number
Example:
1.99
net_amount
number
Example:
1.99
discount_amount
number
Example:
1.99
invoicing
Array
Object
issued_date
integer
Example:
123456789
due_date
integer
Example:
123456789
currency_code
string
Example:
EUR
is_credit
boolean
wallet_funds_amount
number
Example:
5.99
total_net_amount
integer
Example:
1
total_discount_amount
integer
Example:
1
total_discount_incl_tax
integer
Example:
1
total_tax_amount
number
Example:
0.99
total_price
number

Sum of all products’ prices as these are defined in the product catalog

total_amount
number

Total amount of the invoice that will be generated. Includes taxed and disoucnt amounts

Example:
9.99
amount_due
string

The amount that will be due at the time of the estimation

amount_to_collect
number

Amount that the customer needs to pay at the time of the estimation

taxes_breakdown
Array
Object
tax_amount
number
Example:
0.99
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
line_items
Array
Object
quantity
integer
Example:
1
unit_price
number
Example:
9.99
net_amount
number
Example:
9.99
discount_amount
number
Example:
1
sub_total
number
Example:
9.99
pricing
number

The price of the product as this is configured in the product catalog (including tax or not depending on the tax model)

Example:
11.99
period
Object
from
integer

The date from which the service is invoiced/credited

Example:
1651172405
to
integer

The date until which the service is invoiced/credited

Example:
1653764405
product
Object

Details about the product

id
string GUID

The product identifier

Example:
ba603bdc-f18f-1d4e-dd07-ad6b57c6e565
sku
string

The product SKU

Example:
DEC1234
name
string

The product name

Example:
Decoder
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
discount
Object

Details about the applied discount

discount_amount
number
Example:
0.96
discount_percentage
number
Example:
1.5
discount_incl_tax
number
Example:
0.98
applied_taxes
Array

Details about the applied taxes

Object
tax_amount
number
Example:
0.99
tax_exempt_reason
string
Example:
CONTACT
tax_rate
Object
id
string
name
string
tax_code
string
Example:
VAT
percentage
integer
Example:
1
bundle_product
Object

Defines the main product that the line item is component to it (applicable only when the line item is invoiced as a component of another product)

id
string GUID

The product identifier

Example:
31f2e99d-a5cb-21c1-2866-1a1491989893
sku
string

The product sku

Example:
ICL-001
name
string

The product name

Example:
Iced Latte
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
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/estimates/service_delivery HTTP/1.1 

Content-Type: application/json

{
    "action": "CHANGE_TERMS",
    "contact_id": "",
    "organisation_id": "",
    "account_id": "",
    "subscription_id": "",
    "scheduled_date": 12345678,
    "number_of_days": 3,
    "subscription_term_changes": { 
        "billing_day": {
            "day_of_month": 1,
            "day_of_week": "MONDAY"
        },
        "payment_method_id": "",
        "funding_source": "ACCOUNT"
    },
    "services_to_add": [
        {
            "product_id": "",
            "price_terms_id": "",
            "quantity": 1,
            "components": [
                {
                    "product_id": "",
                    "price_terms_id": ""
                }
            ]
        }
    ],
    "services_to_remove": [
        {
            "id": ""
        }
    ],
    "services_to_change": [
        {
            "from_service_id": "",
            "to_service_product_id": "",
            "to_price_terms_id": "",
            "components": [
                {
                    "product_id": "",
                    "price_terms_id": ""
                }
            ]
        }
    ],
    "service_term_changes": [
        {
            "service_id": "",
            "auto_renewal_preference": "OPT_IN, OPT_OUT",
            "contract_preference": "RENEW, EXTEND",
            "extend_by": {
                "period": 3,
                "uot": "DAYS"
            },
            "quantity": 1
        }
    ],
    "component_changes": {
        "id": "",
        "to_be_added": [
            {
                "product_id": "",
                "price_terms_id": ""
            }
        ],
        "to_be_removed": [
            {
                "id": ""
            }
        ]
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "service_delivery_estimate": [ 
        {
            "action_allowed": true,
            "allowed_execution_on": 12345678,
            "next_billing_date": 1235678,
            "next_payment_date": 12345678,
            "subscription": {
                "life_cycle_state": "ACTIVE",
                "terms": {
                    "billing_period": {
                        "duration": 1,
                        "uot": "MONTHS"
                    },
                    "billing_day": {
                        "day_of_month": 5,
                        "day_of_week": "MONDAY"
                    }
                }
            },
            "services_to_add": [
                {
                    "life_cycle_state": "EFFECTIVE",
                    "product": {
                        "id": "",
                        "sku": "",
                        "name": ""
                    },
                    "trial_period": {
                        "starts_on": 12345678,
                        "ends_on": 12345678
                    },
                    "dependencies": [
                        {
                            "item_type": "",
                            "item_id": "",
                            "item_name": ""
                        }
                    ]
                }
            ],
            "services_to_remove": [
                {
                    "id": "",
                    "life_cycle_state": "CANCELLED",
                    "product": {
                        "id": "",
                        "sku": "",
                        "name": ""
                    }
                }
            ],
            "services_to_change": [
                {
                    "id": "",
                    "life_cycle_state": "SWAPPED",
                    "product": {
                        "id": "",
                        "sku": "",
                        "name": ""
                    },
                    "change_to_product": {
                        "id": "",
                        "sku": "",
                        "name": ""
                    },
                    "dependencies": [
                        {
                            "item_type": "",
                            "item_id": "",
                            "item_name": ""
                        }
                    ]
                }
            ],
            "components_change": {
                "service": {
                    "id": "",
                    "sku": "",
                    "name": ""
                },
                "components_added": [
                    {
                        "id": "",
                        "sku": "",
                        "name": ""
                    }
                ],
                "components_removed": [
                    {
                        "id": "",
                        "sku": "",
                        "name": ""
                    }
                ]
            },
            "billing_estimate": {
                "billing_date": 12345678,
                "billed_period": {
                    "from_date": 12345678,
                    "to_date": 12345678
                },
                "totals": {
                    "total_amount": 9.99,
                    "tax_amount": 1.99,
                    "net_amount": 1.99,
                    "discount_amount": 1.99
                },
                "invoicing": [
                    {
                        "issued_date": 123456789,
                        "due_date": 123456789,
                        "currency_code": "EUR",
                        "is_credit": true,
                        "wallet_funds_amount": 5.99,
                        "total_net_amount": 1,
                        "total_discount_amount": 1,
                        "total_discount_incl_tax": 1,
                        "total_tax_amount": 0.99,
                        "total_price": 1,
                        "total_amount": 9.99,
                        "amount_due": "",
                        "amount_to_collect": 1,
                        "taxes_breakdown": [
                            {
                                "tax_amount": 0.99,
                                "tax_rate": {
                                    "id": "",
                                    "name": "",
                                    "tax_code": "VAT",
                                    "percentage": 1
                                }
                            }
                        ],
                        "line_items": [
                            {
                                "quantity": 1,
                                "unit_price": 9.99,
                                "net_amount": 9.99,
                                "discount_amount": 1,
                                "sub_total": 9.99,
                                "pricing": 11.99,
                                "period": {
                                    "from": 1651172405,
                                    "to": 1653764405
                                },
                                "product": {
                                    "id": "ba603bdc-f18f-1d4e-dd07-ad6b57c6e565",
                                    "sku": "DEC1234",
                                    "name": "Decoder",
                                    "classification": "TRACEABLE_PHYSICAL_GOOD"
                                },
                                "discount": {
                                    "discount_amount": 0.96,
                                    "discount_percentage": 1.5,
                                    "discount_incl_tax": 0.98
                                },
                                "applied_taxes": [
                                    {
                                        "tax_amount": 0.99,
                                        "tax_exempt_reason": "CONTACT",
                                        "tax_rate": {
                                            "id": "",
                                            "name": "",
                                            "tax_code": "VAT",
                                            "percentage": 1
                                        }
                                    }
                                ],
                                "bundle_product": {
                                    "id": "31f2e99d-a5cb-21c1-2866-1a1491989893",
                                    "sku": "ICL-001",
                                    "name": "Iced Latte",
                                    "classification": "TRACEABLE_PHYSICAL_GOOD"
                                }
                            }
                        ]
                    }
                ]
            }
        }
    ]
}
Products Recommendation
GET /products/recommendation

Use the Web API to get recommendations from CRM.COM:

  • Who is ordering product s(physical goods and services)

Request parameters

contact_id
string optional
account_id
string optional
organisation_id
string optional
subscription_id
string optional
service_id
string optional
product_id
string optional

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
cross_sells
Array
Object
id
string
Example:
string
sku
string
Example:
string
name
string
Example:
string
description
string
Example:
string
upsells
Array
Object
id
string
Example:
string
sku
string
Example:
string
name
string
Example:
string
description
string
Example:
string
service_changes
Array
Object
id
string
Example:
string
sku
string
Example:
string
name
string
Example:
string
description
string
Example:
string
pricing
string
prices
Array
Object
id
string
Example:
string
label
string
Example:
string
is_default
boolean
Example:
true
price_model
string
Example:
TIERED
tiers
integer
Example:
3
upper_tier
integer
Example:
5
price
number
Example:
9.99
out_contract_price
number
Example:
11.99
curreny_code
string
Example:
EUR
tax_model
string
Example:
TAX_INCLUSIVE
price_terms
Object
billing_period
Object
duation
integer
Example:
1
uot
string
Example:
MONTH
contract_period
Object
duation
integer
Example:
12
uot
string
Example:
MONTH
trial_period
Object
duation
integer
Example:
7
uot
string
Example:
DAYS
billing_model
string
Example:
PRE_BILL
components
Array
Object
item_type
string
Example:
PRODUCT
item_id
string
Example:
8c939607-2262-544d-99ef-4634c6e8836d
name
string
Example:
Milk Options Cappuccino Massimo
dispay_name
string
Example:
Milks & Alternatives
mandatory
boolean
Example:
true
price_inclusive
boolean
Example:
true
minimum_quantity
integer
Example:
1
maximum_quantity
integer
Example:
3
products
Array
Object
id
string
Example:
8c939607-2262-544d-99ef-4634c6e8836d
sku
string
Example:
string
name
string
Example:
string
description
string
Example:
string
is_included
boolean
Example:
true
pricing
Object
id
string
Example:
string
price
number
Example:
9.99
currency
string
Example:
EUR
price_model
string
Example:
FLAT
tax_model
string
Example:
TAX_INCLUSIVE
supply_method
string
Example:
DELIVERY
paging
string
Example:
123
Example 1
GET https://sandbox.crm.com/backoffice/v2/products/recommendation HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "recommendation_type":"NEW-UPGRADE-DOWNGRADE-UPSELL",
            "id": "",
            "sku": "",
            "name": "",
            "pricing": [
                {
                    "id":"",
                    "price":9.99,
                    "out_contract_price":11.99,
                    "curreny_code":"EUR",
                    "price_terms":{
                        "billing_period":{
                            "duation":1,
                            "uot":"MONTH"
                        },
                        "contract_period":{
                            "duation":12,
                            "uot":"MONTH"
                        },
                       "trial_period":{
                            "duation":7,
                            "uot":"DAYS"
                        }
                    }
                }
            ]
        }
    ],
    "paging": "123"
}
Journal Entries

Journal entries are records that keep track of the business’s financial transactions for its contacts. Through a journal entry a contact account or the contacts’ wallet is either debited or credited. Journal entries are generated automatically on various financial events such as Invoicing an account or on crediting the wallet. Journal entries can also be issued manually.

POST /contacts/{id}/journals
GET /journals/{id}
GET /journals
Create Journal
POST /contacts/{id}/journals

Create a new journal entry that either debits or credits an account or a wallet. Journal entries generated by CRM.COM via various financial or wallet events are always related to an entity for example an Invoice or an Award. Using this Web API however, a manual journal entry is generated having no relation to any financial/wallet event previously submitted within CRM.COM

Path variables

id
string required

The unique identifier of the contact

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
code
string

Journal entry’s code. If not specified, then a unique and random 16-digit code will be generated

Example:
5554330232221234
action
string required

A Journal either debits or credits the account/wallet

Enumeration:
DEBIT
CREDIT
Example:
DEBIT
entity
string required

The entity on which the action is performed. The journal is created against an account or the wallet.

Enumeration:
ACCOUNT
WALLET
Example:
ACCOUNT
amount
number required

The journal’s amount

Example:
9.99
currency_code
string required
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
commerce_pool_id
string

Commerce pool restricting how the amount can be spent. Applicable if action=credit & process=wallet, if specified the wallet commerce balance will be credited.

Example:
82177c61-5800-4053-9be1-ba4e6c64cfeb
posted_date
integer

Journal’s issuing date

Example:
1618298816
notes
string

Additional notes about the journal

Example:
Amount credited to the customer in settlement of complaint no.1012

Responses

201 Created
Body
Object
id
string

Journal’s unique identifier

Example:
82177c61-5800-4053-9be1-ba4e6c64cfeb
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
POST https://sandbox.crm.com/backoffice/v2/contacts/{id}/journals HTTP/1.1 

Content-Type: application/json

{
    "code": "5554330232221234",
    "action": "DEBIT",
    "entity": "ACCOUNT",
    "amount": 9.99,
    "currency_code": "EUR",
    "commerce_pool_id": "82177c61-5800-4053-9be1-ba4e6c64cfeb",
    "posted_date": 1618298816,
    "notes": "Amount credited to the customer in settlement of complaint no.1012"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "82177c61-5800-4053-9be1-ba4e6c64cfeb"
}
Get Journal
GET /journals/{id}

Retrieve details of an existing journal entry.

Path variables

id
string required

Journal identifier

Responses

200 OK
Body
Object
code
string

The Journal’s code. This is a unique and random 16-digit code, generated by CRM.COM

Example:
7461746837632706
entity
string

The Journal entry’s accounting entity

Enumeration:
ACCOUNT
WALLET
Example:
ACCOUNT
type
string

Journal either debits or credits an account or the wallet.

Enumeration:
DEBIT
CREDIT
Example:
DEBIT
amount
number

Journal’s amount

Example:
9.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
posted_date
integer

Journal’s issuing date

Example:
1583846865
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
organisation
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
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
wallet
Object
id
string

Wallet unique ID

Example:
b94a4516-f452-4bad-9d99-81016ab225fb
code
string

Wallet unique code

Example:
4444000545432222
commerce_pool
Object

Restrictions on how the journal’s amount can be spent. Applicable only when issuing a Credit jounal for the Wallet.

id
string

Commerce pool identifier

Example:
d6dc2b8e-831a-41d4-a8e7-d5c57b668937
name
string

Commerce pool name

Example:
Spend within 3 months
financial_event
Object

Journal entries created because of a financial event performed on an entity.

type
string

The type of the event

Enumeration:
INVOICE

Financial transaction, triggered by an Order, or an invoice created to charge a Contact (e.g. via the backend)

CREDIT_NOTE

Financial transaction, credit note issued for a Contact’s account

PAYMENT

Financial transaction, a contact payment for an invoice or an external debit

REFUND

Financial transaction, debiting a Contact’s account

PAYOUT

Financial transaction posted against an account

TOPUP

Financial transaction, crediting a Contact’s account

TRANSFER

Financial transaction, transfer of funds to another accountwallet of the same contact, or another Contact’s account/wallet

PASS_REDEMPTION

Redeeming a pass (credits the Contact’s open/commerce wallet balance)

AD_HOC_RETURN

An amount returned for a non specified purchase

SPEND

A spend originating from a Purchase Event

AWARD

Award from one or more offers

PURCHASE_CANCELLATION

Reverse a purchase transaction

BACKEND_SPEND

Backend process can debit a wallet, credit a customer account, credit an organisation account after a refund

WALLET_FEE

Wallet fees applied based on configuration

USE_WALLET_FUNDS

Wallet funds used to pay for an Order when an order is placed (not from a purchase event)

ACHIEVEMENT_CANCELLATION

Reverse an achievement customer event (for award only, not for spend)

MANUAL_JOURNAL

Manual journal entry created to credit/debit and account/wallet

id
string

The entity’s identifier. Use this identifier in other GET Web APIs to retrieve detailed information for the entity/financial event it self.

Example:
d6dc2b8e-831a-41d4-a8e7-d5c57b668937
number
string

The entity’s unique number or code.

Example:
I1000001
notes
string

Additional nots on why the journal was issued.

Example:
Amount credited to the customer in settlement of complaint no.1012
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
GET https://sandbox.crm.com/backoffice/v2/journals/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "code": "7461746837632706",
    "entity": "ACCOUNT",
    "type": "DEBIT",
    "amount": 9.99,
    "currency_code": "EUR",
    "posted_date": 1583846865,
    "contact": {
        "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
        "name": "John Doe",
        "code": "C123"
    },
    "organisation": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "account": {
        "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
        "name": "AC123456 John Doe",
        "number": "AC123456"
    },
    "wallet": {
        "id": "b94a4516-f452-4bad-9d99-81016ab225fb",
        "code": "4444000545432222"
    },
    "commerce_pool": {
        "id": "d6dc2b8e-831a-41d4-a8e7-d5c57b668937",
        "name": "Spend within 3 months"
    },
    "financial_event": {
        "type": "TOPUP",
        "id": "d6dc2b8e-831a-41d4-a8e7-d5c57b668937",
        "number": "I1000001"
    },
    "notes": "Amount credited to the customer in settlement of complaint no.1012"
}
List Journals
GET /journals

Retrieves a list of Journal entries using various filters.

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
entity
string optional

The journal entry’ accounting entity, for which one it was generated for

Enumeration:
ACCOUNT
WALLET
Example:
ACCOUNT
type
string optional

Journal’s accounting type

Enumeration:
DEBIT
CREDIT
Example:
DEBIT
event
array of Journal Entries Types (enum) optional

The financial event that aused the journal’s creation

Collection format: csv
Example:
[
    "INVOICE"
]
amount
string optional
Enumeration:
<amount>[gt]

Returns results where the given <amount> is greater than this value

&lt;amount>[gte]

Returns results where the given <amount> is greater than or equal to this value

&lt;amount>[lt]

Returns results where the given <amount> is less than this value

&lt;amount>[lte]

Returns results where the given <amount> is less then or equal to this value

posted_date
string optional
Enumeration:
&lt;date>[gt]

Returns results where the given <date> is greater than this value

&lt;date>[gte]

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

&lt;date>[lt]

Returns results where the given <date> is less than this value

&lt;date>[lte]

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

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

The number/code of the entity related to the financial event e.g. an Invoice’s number or a Top-up’s code. Invoices and Credit Notes are assigned a number based on a scheme on their posting. Any other financial event has a code only

Example:
I00010110
account_id
string optional

The account identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
wallet_id
string optional

The wallet identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
contact_id
string optional

The contact’s identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
organisation_id
string optional

The Organisation’s identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
reference_number
string optional

The transaction’s reference number. Applicable only for Invoices and Credit Notes i.e. the transactions that have a reference number and not a number while they are in Draft sate.

Example:
9545677777000981

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

Journal entry’s unique identifier

Example:
2f4ea11b-12a6-4321-92d1-f4ede511e203
code
string

Journal entry’s code. This is a unique and random 16-digit code, generated by CRM.COM on issuing the journal entry

Example:
99323451230005432
entity
string

Journal entry is issued for either an Account or a Wallet

Enumeration:
ACCOUNT
WALLET
Example:
ACCOUNT
type
string

Journal entry’s accounting type

Enumeration:
DEBIT
CREDIT
Example:
DEBIT
amount
number
Example:
9.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
posted_date
integer

Date on which the journal entry was created

Example:
1654584876
contact
Object

The contact owning the account/wallet for which the journal entry was issued. A journal entry is issued for either a Contact or an Organisation.

id
string

Contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

Contact full name

Example:
John Johnson
code
string

Contact code

Example:
C123
organisation
Object

The Organisation owning the account/wallet for which the journal entry was issued. A journal entry is issued for either a Contact or an Orgnaisation.

id
string

Organisation identifier

Example:
4248fab3-67d5-2eb1-eaf6-079ce18cd2ed
name
string

Organisation name

Example:
Bravo Coffee
account
Object

Journal entry issued for an account. An account might be owned by a Contact or an Organisation

id
string

Account unique identifier

Example:
2f4ea11b-12a6-4321-92d1-f4ede511e203
number
string

Account number

Example:
964AC123456
wallet
Object

Journal entry issued for a Wallet

id
string

Wallet identifier

Example:
2f4ea11b-12a6-4321-92d1-f4ede511e203
code
string

Wallet code

Example:
5434599999112300
financial_event
Object

Journal entries created because of a financial event performed on an entity.

type
string

The type of the event

Enumeration:
INVOICE

Financial transaction, triggered by an Order, or an invoice created to charge a Contact (e.g. via the backend)

CREDIT_NOTE

Financial transaction, credit note issued for a Contact’s account

PAYMENT

Financial transaction, a contact payment for an invoice or an external debit

REFUND

Financial transaction, debiting a Contact’s account

PAYOUT

Financial transaction posted against an account

TOPUP

Financial transaction, crediting a Contact’s account

TRANSFER

Financial transaction, transfer of funds to another accountwallet of the same contact, or another Contact’s account/wallet

PASS_REDEMPTION

Redeeming a pass (credits the Contact’s open/commerce wallet balance)

AD_HOC_RETURN

An amount returned for a non specified purchase

SPEND

A spend originating from a Purchase Event

AWARD

Award from one or more offers

PURCHASE_CANCELLATION

Reverse a purchase transaction

BACKEND_SPEND

Backend process can debit a wallet, credit a customer account, credit an organisation account after a refund

WALLET_FEE

Wallet fees applied based on configuration

USE_WALLET_FUNDS

Wallet funds used to pay for an Order when an order is placed (not from a purchase event)

ACHIEVEMENT_CANCELLATION

Reverse an achievement customer event (for award only, not for spend)

MANUAL_JOURNAL

Manual journal entry created to credit/debit and account/wallet

id
string

The entity’s identifier. Use this identifier in other GET Web APIs to retrieve detailed information for the entity/financial event it self.

Example:
2f4ea11b-12a6-4321-92d1-f4ede511e203
number
string

The entity’s unique number or code.

Example:
I000001
reference_number
string

The entity’s reference number. Applicable for Invoices and Credit Notees

Example:
INV-43243435-123445
initial_type
string

Applicable for wallet journal entries only and in cases where the wallet is credited because of an Award event. In such cases, the journal entry is indireclty related to a customer event as well.

Enumeration:
PURCHASE

Award is a result of a purchase event

ACHIEVEMENT

Award is a result of a reward achievement offer

Example:
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
Example 1
GET https://sandbox.crm.com/backoffice/v2/journals HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "2f4ea11b-12a6-4321-92d1-f4ede511e203",
            "code": "99323451230005432",
            "entity": "ACCOUNT",
            "type": "DEBIT",
            "amount": 9.99,
            "currency_code": "EUR",
            "posted_date": 1654584876,
            "contact": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "John Johnson",
                "code": "C123"
            },
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "account": {
                "id": "2f4ea11b-12a6-4321-92d1-f4ede511e203",
                "number": "964AC123456"
            },
            "wallet": {
                "id": "2f4ea11b-12a6-4321-92d1-f4ede511e203",
                "code": "5434599999112300"
            },
            "financial_event": {
                "type": "REFUND",
                "id": "2f4ea11b-12a6-4321-92d1-f4ede511e203",
                "number": "I000001",
                "reference_number": "INV-43243435-123445",
                "initial_type": "PURCHASE"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Financials

List of Web APIs related to creating and maintaining an account owner’s (Contact or Organisation) financial transactions i.e. Invoices, Credit Notes, Payments, Refunds and Payouts.

Invoices

An Invoice is a financial document that shows a list of services or physical goods bought by an account owner, as well as and the prices to be paid for them. Invoices debit the account and can be generated either by system processes or manually by users. An Invoice needs to be paid off by its due date. An Invoice might be cancelled through a Credit Note, if it was not issued correctly

POST /invoices
PUT /invoices/{id}
POST /invoices/{id}/actions
GET /invoices
GET /invoices/{id}
Create Invoice
POST /invoices

Create a new Invoice financial transaction for an account owner. A single Invoice can be created per Web API call. The Invoices debits the account of the contact/organisation for at least one product

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

The account on which the financial transaction will be posted against to. The account might be owned by a Contact or an Organisation.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
type_id
string GUID

The unique identifier of the financial transaction type id. If not specified, then the default Invoice type will be set based on Financial settings

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

The reference number of the financial transaction to be created. if not specified, then a unique and random 16-digit code will be generated to represent the Invoices reference number.

Example:
6554900212234544
due_date
integer epoch

The due date of the financial transaction. The default value is provided based on settings but the user can provide a different one. The due date mus tbe greater than or equa to the Invoice’s posted date.

Example:
1583846865
issued_date
integer epoch

The issued date of the financial transaction. Defaults to current date.

Example:
1583846865
posted_date
integer epoch

The posted date of the financial transaction. Defaults to current date. If not specified, then it will be set on Posting the Invoice

Example:
1583846865
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
notes
string

Any notes related to the financial transaction

issued_for
Object

The CRM.COM entity for which the Invoice was issued for

entity
string required
Enumeration:
ORDERS
SERVICE_REQUESTS
SUBSCRIPTIONS
Example:
ORDERS
id
string

The unique identifier of the entity

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
lines
Array required nullable
Object
product_id
string GUID required

The product’s unique identifier to be included in the financial transaction

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

The quantity of the product. Defaults to 1. Quantity can be set as a Number only for service products

Example:
1.5
unit_price
number required

The price per unit of the product

Example:
9.99
discount
Object

Provide an ad hoc discount to the Invoice that can be set an a specific amount or a percentage

amount
number nullable

The discount amount of the line

Example:
20
percentage
number nullable

The discount percentage of the line

Example:
20
sub_total
number

The sub total of the financial transaction line. If the line’s sub-total is specified, then the line’s amounts are calculated from right to left, i.e. the process will re-calculate the unit price , net, tax and discount amounts

Example:
99.99
devices
Array

The IDs of the devices to be sold in case of a stockable/traceable product

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

Responses

201 Created

Successful Request

Body
Object
id
string GUID

The unique identifier of the financial transaction

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/invoices HTTP/1.1 

Content-Type: application/json

{
    "account_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "reference_number": "6554900212234544",
    "due_date": 1583846865,
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "state": "POSTED",
    "notes": "",
    "issued_for": {
        "entity": "ORDERS",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "lines": [
        {
            "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "quantity": 1.5,
            "unit_price": 9.99,
            "discount": {
                "amount": 20,
                "percentage": 20
            },
            "sub_total": 99.99,
            "devices": [
                "4dc0809f-ed91-4b68-b912-5bd6064d901e"
            ]
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Invoice
PUT /invoices/{id}

Update an Invoice financial transaction. An Invoice can be updated but its state defines which information can be updated

  • While in Draft state, any Invoice information can be updated
  • Once Posted, then only its notes, delivery and billing addresses can be updated

Path variables

id
string required

The id of the Invoice to be updated

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

The unique identifier of the financial transaction type id

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
due_date
integer epoch

The due date of the financial transaction. The default value is provided based on Financial settings but the user can provide a different one. The due date cannot be set before the invoice’s posted date

Example:
1583846865
issued_date
integer epoch

The issued date of the financial transaction.

Example:
1583846865
billing_address_id
string GUID

The Invoice’s billing address which defaults to the account’s billing address. The new address must still be one of the account owner’s addresses.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
delivery_address_id
string GUID

The Invoice’s delivery address. Applicable only when Invoice was issued for a Delivery Order. The new address must still be one of the account owner’s addresses.

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

Any notes related to the financial transaction

Example:
Manual Invoice
lines
Array

Invoice Lines. At least one line must be included in an Invoice

Min items: 1
Object
id
string GUID required

The unique identifier of an existing line to be updated

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
product_id
string GUID required

The unique identifier of the product to be provided on new lines

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
quantity
number required

The quantity of the product

Default:
1
Example:
2.5
unit_price
number required

The price per unit of the product

Example:
9.99
discount
Object

The line’s discount that can be specified as an amount or a percentage

amount
number

The discount amount of the line

Example:
1.99
percentage
number

The discount percentage of the line

Example:
2.5
sub_total
number

The sub total of the financial transaction line. If specified, then the line’s amounts will be re-calcualted so as to result ton this sub-total

Example:
19.98
devices
Array of string

The IDs of the devices to be sold in case of a stockable/traceable product

Unique items: YES

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the Invoice

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/invoices/{id} HTTP/1.1 

Content-Type: application/json

{
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "due_date": 1583846865,
    "issued_date": 1583846865,
    "billing_address_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "delivery_address_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "notes": "Manual Invoice",
    "lines": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "quantity": 2.5,
            "unit_price": 9.99,
            "discount": {
                "amount": 1.99,
                "percentage": 2.5
            },
            "sub_total": 19.98,
            "devices": [
                ""
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Invoice Actions
POST /invoices/{id}/actions

Perform actions to an existing Invoice like Posting a draft Invoice or Crediting it. The action is performed on a single Invoice.

Path variables

id
string GUID required

The unique identifier of the invoice on which the action is performed

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

Request body

Object
action
string required

The action to be performed on the Invoice

Enumeration:
CREDIT

Issues a credit note based on the specified invoice. Applicable only for Posted Invoices.

POST

Posts a Draft Invoice

REJECT

Rejects a Draft Invoice

notes
string

The invoice notes available to provide any addtional information on the performed action

Example:
Reject to incorrect pricing options
amount
number

Applicable only when Crediting the Invoice. The amount must be less than or equal to the Invoice’s total amount. If not specified when performing the action, then the Invoice is fully Credited.

Example:
9.99

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the invoice

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/invoices/4dc0809f-ed91-4b68-b912-5bd6064d901e/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "CREDIT",
    "notes": "Reject to incorrect pricing options",
    "amount": 9.99
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Invoices
GET /invoices

Returns a list of invoices. Use the Web APIs filters to retrieve the required Invoices.

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

The value of the search across number or reference number

Example:
I123456
contact_id
string GUID optional

The unique ID of the contact whose Invoices belong to one of the cotnact’s accounts

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
organisation_id
string optional

Uiue identifier of the Organisations for which Invoices were posted.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
account_id
string GUID optional

The unique ID of the account against which Invoices were posted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
is_unsettled
boolean optional

If set to true, then only the unsettled Invoices will be retreived

Example:
true
service_request_id
string optional

Unique identifier of the Service Request for which the invoice was issued

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
order_id
string optional

Filter based on order

state

Filter based on the life cycle state

Collection format: csv
type_id
array of string GUID optional

The Invoice’s type identifier

Collection format: csv
due_date
string optional

Search using the Invoice’s due date

Enumeration:
&lt;date>[gt]

Returns results where the given <date> is greater than this value

&lt;date>[gte]

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

&lt;date>[lt]

Returns results where the given <date> is less than this value

&lt;date>[lte]

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

posted_date
string optional

Search using th eInvoice’s posted date

Enumeration:
&lt;date>[gt]

Returns results where the given <date> is greater than this value

&lt;date>[gte]

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

&lt;date>[lt]

Returns results where the given <date> is less than this value

&lt;date>[lte]

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

OK

Body
Object
content
Array
Object
id
string

The unique identifier of the Invoice

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

The financial transaction number

Example:
INV00010
reference_number
string

The financial transaction’s reference number

Example:
1234563211112309
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
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
organisation
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
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
issued_date
integer epoch

The date that the financial transaction was issued

Example:
1583846865
posted_date
integer epoch

The date that the financial transaction was posted

Example:
1583846865
due_date
integer epoch

The due date of the financial transaction

Example:
1583846865
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
total
number 99.99

The total amount of the financial transaction

overdue_amount
number

The unpaid amount that passed the Invoice’s due date

Example:
9.99
unsettled_amount
number 9.99

Invoice financial transaction

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/invoices HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "number": "INV00010",
            "reference_number": "1234563211112309",
            "type": {
                "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
                "name": "Internal Transaction"
            },
            "account": {
                "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
                "name": "ACR1234 John Doe",
                "number": "AC123456"
            },
            "contact": {
                "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
                "name": "John Doe",
                "code": "C123"
            },
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "state": "PENDING",
            "issued_date": 1583846865,
            "posted_date": 1583846865,
            "due_date": 1583846865,
            "currency_code": "EUR",
            "total": 1,
            "overdue_amount": 9.99,
            "unsettled_amount": 1
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Invoice
GET /invoices/{id}

Retrieve detailed information for an Invoice

Path variables

id
string required

The id of the Invoice to be retrieved

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 Invoice

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

The Invoice number

Example:
INV00014
reference_number
string

The Invoice’s reference number

Example:
1234569098887670
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
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
organisation
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
notes
string

Any notes of the financial transaction

issued_date
integer epoch

The date that the Invoice was issued

Example:
1583846865
posted_date
integer epoch

The date that the Invoice was posted

Example:
1583846865
due_date
integer epoch

The due date of the Invoice

Example:
1583846865
net
number

The total net amount of the financial transaction

Example:
150
discount
number

The total discount amount of the financial tranasction

Example:
50
tax
number

Total tax amount

Example:
2.99
total
number

The total amount of the financial transaction

Example:
100
overdue_amount
number

The unpaid amount that passed the financial transaction’s due date

Example:
0
unsettled_amount
number

The unpaid amount of the financial transaction

Example:
100
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
net_term_days
integer

The account owner’s payment terms based on which the Invoice’s Due date was calculated

Example:
7
issued_for
Object

The entity that initiated the Invoice. An Invoice is issued for an Order or Service Request or because of recurring billing, i.e. issued for a Subscription

entity
string

The entitiy for which the Invoice was issued

Enumeration:
SUBSCRIPTIONS
ORDERS
SERVICE_REQUESTS
Example:
ORDERS
id
string

The unique identifier of the initiating entity

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

The entity’s number/code

Example:
O10000101
billing_address
Object
name
string

Account owner’s name

Example:
John Smith
phone
string

Account owner’s phone number

Example:
0035799999999
email
string

Account owner’s email address

Example:
jsmith@emailaddress.com
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
delivery_address
Object
name
string

Account owner’s name

Example:
John Smith
phone
string

Account owner’s phone number

Example:
0035799999999
email
string

Account owner’s email address

Example:
jsmith@emailaddress.com
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
lines
Array

List of Invoice Lines. At least one line exists per Invoice

Object
id
string GUID

The unique ID of the financial transaction line

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

The invoiced product

id
string

The product’s unique identifier

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

The product’s SKU

Example:
abc-12345
name
string

The product’s name

Example:
Decoder
is_stockable
boolean

Shows whether the invoiced product is stockable or not. For stockable products, warehouse transactions are issued on posting the invoice

Example:
true
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
quantity
number

The quantity of the product

Example:
1
unit_price
number

The price per unit of the product

Example:
10.99
net
number

The net amount

Example:
1.99
discount
Object

The applied discount. IF a percentage was applied, then retrieving the line’s discount will return both the discount amount and the percentage

amount
number

The discount amount of the line. This is the discount excluding the taxed amount for the disocunt

Example:
2.99
percentage
number

The discount percentage of the line

Example:
1.5
amount_incl_tax
number

The applied discount including applied taxes.

Example:
3.99
tax
number

Total taxed amount for the product

Example:
1.5
sub_total
number

The sub total of the financial transaction line

Example:
200
bundle_product
Object

Applicableonly when the invoiced item was provided as part of a bundle product

id
string

Product identifier

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

Product SKU

Example:
FILMS
name
string

Product name

Example:
Films
period
Object
from
integer

The date from which the service is invoiced/credited

Example:
1651172405
to
integer

The date until which the service is invoiced/credited

Example:
1653764405
applied_taxes
Array
Object
tax_rate
Object

The applied tax rate

id
string

Unique identifier of the tax rate

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

Tax rate name

Example:
Standard VAT
tax_code
string
Enumeration:
VAT
SALES_TAX
TAX_EXEMPT
OTHER
Default:
VAT
percentage
number

Tax rate’s percentage that was valid on the date on which he tax was applied

Example:
20
tax_amount
number

Total applied tax amount

Example:
9.99
tax_exempt_reason
string

Applicable only when a Tax Exempt rate was applied. Shows whether the tax exempt rate was applied because the Contact or the Product was marked as tax exempt.

Enumeration:
CONTACT
PRODUCT
Example:
PRODUCT
applied_discounts
Array
Object
amount
number

The discounted amount

Example:
0.99
type
string

Type of discount applied

Enumeration:
AD_HOC
PROMOTION
Example:
PROMOTION
promotion
Object

The applied Promotion. Applicable when discount type is Promotion

id
string

Promotion identifier

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

Promotion name

Example:
Xmas Offers
applied_tiers
Array
Object
lower_tier
integer

The starting tier of the price tier

Example:
1
upper_tier
integer

The ending tier of the price tier

Example:
5
units_invoiced
integer

Number of items invoiced/credited based on this tier range

unit_price
number

The unit price per invoiced item

Example:
1.99
devices
Array

The devices that were sold through this invoice

Object
id
string GUID

The ID of the device

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

The serial number of the device

Example:
STB123456
taxes_breakdown
Array
Object
tax_amount
number

Total applied tax amount

Example:
9.99
tax_rate
Object

The applied tax rate

id
string

Unique identifier of the tax rate

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

Tax rate name

Example:
Standard VAT
tax_code
string
Enumeration:
VAT
SALES_TAX
TAX_EXEMPT
OTHER
Default:
VAT
percentage
number

Tax rate’s percentage that was valid on the date on which he tax was applied

Example:
20
discounts
Array
Object
amount
number

The discounted amount

Example:
0.99
type
string

Type of discount applied

Enumeration:
AD_HOC
PROMOTION
Example:
PROMOTION
promotion
Object

The applied Promotion. Applicable when discount type is Promotion

id
string

Promotion identifier

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

Promotion name

Example:
Xmas Offers
credits
Array

List of credit financial transactions that were allocated to the Invoice

Object
classification
string

The classification of the transaction whch can either be a Payment or a Credit Note.

Enumeration:
PAYMENT
CREDIT_NOTE
Example:
PAYMENT
id
string

The unique identifier of the Payment/Credit Note

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

The number of the financal transaction. For Credit Notes a numbe rif returned whereas for Payments, the Paument’s code is returned

Example:
CI0000010
reference_number
string

The transaction’s reference number

Example:
3234556545550091
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/invoices/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "number": "INV00014",
    "reference_number": "1234569098887670",
    "type": {
        "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
        "name": "Internal Transaction"
    },
    "state": "POSTED",
    "account": {
        "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
        "name": "AC123456 John Doe",
        "number": "AC123456"
    },
    "contact": {
        "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
        "name": "John Doe",
        "code": "C123"
    },
    "organisation": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "notes": "",
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "due_date": 1583846865,
    "net": 150,
    "discount": 50,
    "tax": 2.99,
    "total": 100,
    "overdue_amount": 1,
    "unsettled_amount": 100,
    "currency_code": "EUR",
    "net_term_days": 7,
    "issued_for": {
        "entity": "ORDERS",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "number": "O10000101"
    },
    "billing_address": {
        "name": "John Smith",
        "phone": "0035799999999",
        "email": "jsmith@emailaddress.com",
        "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"
        }
    },
    "delivery_address": {
        "name": "John Smith",
        "phone": "0035799999999",
        "email": "jsmith@emailaddress.com",
        "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"
        }
    },
    "lines": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "abc-12345",
                "name": "Decoder",
                "is_stockable": true,
                "classification": "TRACEABLE_PHYSICAL_GOOD"
            },
            "quantity": 1,
            "unit_price": 10.99,
            "net": 1.99,
            "discount": {
                "amount": 2.99,
                "percentage": 1.5,
                "amount_incl_tax": 3.99
            },
            "tax": 1.5,
            "sub_total": 200,
            "bundle_product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "FILMS",
                "name": "Films"
            },
            "period": {
                "from": 1651172405,
                "to": 1653764405
            },
            "applied_taxes": [
                {
                    "tax_rate": {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "name": "Standard VAT",
                        "tax_code": "VAT",
                        "percentage": 20
                    },
                    "tax_amount": 9.99,
                    "tax_exempt_reason": "PRODUCT"
                }
            ],
            "applied_discounts": [
                {
                    "amount": 0.99,
                    "type": "PROMOTION",
                    "promotion": {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "name": "Xmas Offers"
                    }
                }
            ],
            "applied_tiers": [
                {
                    "lower_tier": 1,
                    "upper_tier": 5,
                    "units_invoiced": 1,
                    "unit_price": 1.99
                }
            ],
            "devices": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "serial_number": "STB123456"
                }
            ]
        }
    ],
    "taxes_breakdown": [
        {
            "tax_amount": 9.99,
            "tax_rate": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Standard VAT",
                "tax_code": "VAT",
                "percentage": 20
            }
        }
    ],
    "discounts": [
        {
            "amount": 0.99,
            "type": "PROMOTION",
            "promotion": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Xmas Offers"
            }
        }
    ],
    "credits": [
        {
            "classification": "PAYMENT",
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "number": "CI0000010",
            "reference_number": "3234556545550091"
        }
    ]
}
Credit Notes

A Credit Note is a financial document issued by a business against an account to correct mistakes or adjust the amount that an account owenr was invoiced (in cases for example where the customer changes the purchased services an/or physical goods). A credit note is usually issued for the same or lower amount than an Invoice, and sets it off against the outstanding balance from the same or other financial transactions.

POST /credit_notes
PUT /credit_notes/{id}
POST /credit_notes/{id}/actions
GET /credit_notes
GET /credit_notes/{id}
Create Credit Note
POST /credit_notes

Create a new Credit Note to credit an account. A Credit Note must include at least one line. A single Credit Note can be created per Web API call.

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

The account against which the financial transaction will be posted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
type_id
string GUID

The unique identifier of the Credit Note type. If not specified, the default Credit Note type will be set.

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

The reference number of the financial transaction to be created. if not specified, a random and unique 16-digit code will be assigned.

Example:
1234565455000032
issued_date
integer epoch

The issued date of the financial transaction. Defaults to current date.

Example:
1583846865
posted_date
integer epoch

The posted date of the financial transaction. Defaults to current date

Example:
1583846865
notes
string

Any notes related to the financial transaction

Example:
Credit note due to wrong Invoice charges
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
lines
Array

Set of Credit Note line items. At least one must be specified

Min items: 1
Object
product_id
string GUID

The product’s unique identifier to be included in the financial transaction

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

The quantity of the product

Example:
1
unit_price
number

The price per unit of the product

Example:
10
discount
Object
amount
number nullable

The discount amount of the line

Example:
20
percentage
number nullable

The discount percentage of the line

Example:
20
sub_total
number

The sub total of the financial transaction line

Example:
200
devices
Array of string GUID

The IDs of the devices to be returned back to the business in case of a stockable/traceable product

Unique items: YES
invoices_credited
Array

The Invoice financial transactions to be credited by this Credit Note

Object
id
string

Unique identifier of the Invoice to be credited

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

A Credit Note might be issued during the invoicing process of another entity

entity
string

The entity for which the Credit Note was issued

Enumeration:
ORDERS
SUBSCRIPTIONS
id
string

The unique identifier of the entity

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

Responses

201 Created

Successful Request

Body
Object
id
string GUID

The unique identifier of the financial transaction

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/credit_notes HTTP/1.1 

Content-Type: application/json

{
    "account_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "reference_number": "1234565455000032",
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "notes": "Credit note due to wrong Invoice charges",
    "state": "DRAFT",
    "lines": [
        {
            "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "quantity": 1,
            "unit_price": 10,
            "discount": {
                "amount": 20,
                "percentage": 20
            },
            "sub_total": 200,
            "devices": [
                ""
            ]
        }
    ],
    "invoices_credited": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "issued_for": {
        "entity": "ORDERS",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Credit Note
PUT /credit_notes/{id}

Update a Draft Credit Note financial transaction

Path variables

id
string required

The id of the Credit Note to be updated

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

The unique identifier of the financial transaction id

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
issued_date
integer epoch

The issued date of the financial transaction. Defaults to current date.

Example:
1583846865
notes
string

Any notes related to the financial transaction

Example:
Credit Note to credit wrong invoice charges
lines
Array

List of Credit Note line items.

Object
id
string GUID

The unique identifier of an existing line to be updated

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
product_id
string GUID

The unique identifier of the product to be provided on new lines

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

The price per unit of the product

Example:
10
quantity
number

The quantity of the product

Example:
2
discount
Object
amount
number

The discount amount of the line

Example:
20
percentage
number

The discount percentage of the line

Example:
5
sub_total
number

The sub total of the financial transaction line

Example:
200
devices
Array

The IDs of the devices to be returned back to the business in case of a stockable/traceable product

string GUID
Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
invoices_credited
Array

The Invoice financial transactions to be credited by this Credit Note

Object
id
string

Unique identifier fo the Invoices to be credited

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

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the financial transaction

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/credit_notes/{id} HTTP/1.1 

Content-Type: application/json

{
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "issued_date": 1583846865,
    "notes": "Credit Note to credit wrong invoice charges",
    "lines": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "unit_price": 10,
            "quantity": 2,
            "discount": { 
                "amount": 20,
                "percentage": 5
            },
            "sub_total": 200,
            "devices": [
                "CAD1E31269B76D7A65ACCE45B2E68DFD"
            ]
        }
    ],
    "invoices_credited": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Credit Note Actions
POST /credit_notes/{id}/actions

Perform actions on an existing Credit Note

Path variables

id
string GUID required

The unique identification of the credit note that the actions will be performed against to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
action
string

The action to be performed on the Credit Note

Enumeration:
POST
REJECT
Example:
POST
notes
string

The credit note notes available to provide any information on the performed action

Example:
Posting Credit Note on customer request

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the credit note

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/credit_notes/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "POST",
    "notes": "Posting Credit Note on customer request"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Credit Notes
GET /credit_notes

List Credit Notes. Use filters to retrieve required list of Credit Notes across all accounts.

Request parameters

account_id
string GUID optional

The unique ID of the account whose Credit Notes belong to

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
contact_id
string GUID optional

The unique ID of the contact whose Credit Notes belong to

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
organisation_id
string optional

The organisation aganst which the Credit Note was posted

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

The state of the Credit Notes to be retrieved

Collection format: csv
order_id
string GUID optional

The Order for which the Credit Note was issued

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
search_value
string optional

The value of the search across number and reference number

Example:
123456
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
type_id
array of string optional

List of Credit notes financial transaction types

Collection format: csv

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

OK

Body
Object
content
Array
Object
id
string

The unique identifier of the Credit Note

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

The financial transaction number

Example:
CR0001
reference_number
string

The financial transaction’s reference number

Example:
1234566545556780
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
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
organisation
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
total
number

The total amount of the financial transaction

Example:
100.5
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
issued_date
integer epoch

The date that the financial transaction was issued

Example:
1583846865
posted_date
integer epoch

The date that the financial transaction was posted

Example:
1583846865
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/credit_notes HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        { 
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "number": "CR0001",
            "reference_number": "1234566545556780",
            "type": {
                "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
                "name": "Internal Transaction"
            },
            "account": {
                "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
                "name": "ACR1234 John Doe",
                "number": "AC123456"
            },
            "contact": {
                "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
                "name": "John Doe",
                "code": "C123"
            },
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "total": 100.5,
            "currency_code": "EUR",
            "state": "DRAFT",
            "issued_date": 1583846865,
            "posted_date": 1583846865
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Credit Note
GET /credit_notes/{id}

Get a Credit Note

Path variables

id
string required

The id of the Credit Note to be retrieved

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 Crdit Note

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
number
string

The financial transaction number

Example:
CR0001
reference_number
string

The financial transaction’s reference number

Example:
1234568777667098
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
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
organisation
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
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
issued_date
integer epoch

The date that the financial transaction was issued

Example:
1583846865
posted_date
integer epoch

The date that the financial transaction was posted

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

The total net amount of the financial transaction

Example:
150.5
discount
number

The total discount amount of the financial tranasction

Example:
50.5
tax
number

The total applied tax amount

Example:
1.5
total
number

The total amount of the financial transaction

Example:
100.5
notes
string

Any notes of the financial transaction

Example:
manual invoice
lines
Array

Lis tof Credit Note line items. At least one is returned

Object
id
string GUID

The unique ID of the financial transaction line

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

The credited product

id
string GUID

The product’s identifier

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

The product’s SKU

Example:
ABD12345
name
string

The product’s name

Example:
3Play
is_stockable
boolean

Defines whethe rthe credite product is stockable or not

Example:
true
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
quantity
number

The quantity of the product

Example:
1
unit_price
number

The price per unit of the product

Example:
10
net
number

Total net amount credited

Example:
20.5
tax
number

Total taxed amount for this product

Example:
0.1
discount
Object

Total discount amount credited

amount
number

The discount amount of the line

Example:
20.5
percentage
number

The discount percentage of the line

Example:
20.5
amount_incl_tax
number

The discount amount including the taxed amount

Example:
15.5
sub_total
number

The sub total of the financial transaction line

Example:
200.5
bundle_product
Object

The bunle through which the product was credited

id
string

Product identifier

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

Product SKU

Example:
ALARM001
name
string

Product name

Example:
Alarm
period
Object
from
integer

The date from which the service is invoiced/credited

Example:
1651172405
to
integer

The date until which the service is invoiced/credited

Example:
1653764405
applied_taxes
Array
Object
tax_rate
Object

The applied tax rate

id
string

Unique identifier of the tax rate

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

Tax rate name

Example:
Standard VAT
tax_code
string
Enumeration:
VAT
SALES_TAX
TAX_EXEMPT
OTHER
Default:
VAT
percentage
number

Tax rate’s percentage that was valid on the date on which he tax was applied

Example:
20
tax_amount
number

Total applied tax amount

Example:
9.99
tax_exempt_reason
string

Applicable only when a Tax Exempt rate was applied. Shows whether the tax exempt rate was applied because the Contact or the Product was marked as tax exempt.

Enumeration:
CONTACT
PRODUCT
Example:
PRODUCT
applied_tiers
Array
Object
lower_tier
integer

The starting tier of the price tier

Example:
1
upper_tier
integer

The ending tier of the price tier

Example:
5
units_invoiced
integer

Number of items invoiced/credited based on this tier range

unit_price
number

The unit price per invoiced item

Example:
1.99
devices
Array

List of devices returned through the Credit Note

Object
id
string

Device identifier

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

Device serial number

Example:
ADES-2243333
taxes_breakdown
Array
Object
tax_rate
Object

The applied tax rate

id
string

Unique identifier of the tax rate

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

Tax rate name

Example:
Standard VAT
tax_code
string
Enumeration:
VAT
SALES_TAX
TAX_EXEMPT
OTHER
Default:
VAT
percentage
number

Tax rate’s percentage that was valid on the date on which he tax was applied

Example:
20
tax_amount
number

Total applied tax amount

Example:
9.99
tax_exempt_reason
string

Applicable only when a Tax Exempt rate was applied. Shows whether the tax exempt rate was applied because the Contact or the Product was marked as tax exempt.

Enumeration:
CONTACT
PRODUCT
Example:
PRODUCT
invoices_credited
Array

The financial transactions that are credited by the Credit Note

Object
id
string

The unique identifier of the Invoice that was credited

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
number
string

Invoice number

Example:
I1000101
reference_number
string

Invoice reference number

Example:
4345550002321234
posted_date
integer

Posted date

Example:
1655817643
due_date
integer

Due date

Example:
1655817643
total_amount
number

Total invoiced amount. The Invoice’s amount is in the same currency as the Credit Note

Example:
19.99
issued_for
Object

The entity that initiated the Credit Note. A Credit Note is issued for an Order or because of recurring billing, i.e. issued for a Subscription

entity
string

The entity for which the Credit Note was issued

Enumeration:
ORDERS
SUBSCRIPTIONS
Example:
ORDERS
id
string

The entity’s unique identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
number
string

The entity’s number

Example:
O0000123
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/credit_notes/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
    "number": "CR0001",
    "reference_number": "1234568777667098",
    "account": {
        "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
        "name": "AC123456 John Doe",
        "number": "AC123456"
    },
    "type": {
        "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
        "name": "Internal Transaction"
    },
    "contact": {
        "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
        "name": "John Doe",
        "code": "C123"
    },
    "organisation": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "state": "REJECTED",
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "currency_code": "EUR",
    "net": 150.5,
    "discount": 50.5,
    "tax": 1.5,
    "total": 100.5,
    "notes": "manual invoice",
    "lines": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "ABD12345",
                "name": "3Play",
                "is_stockable": true,
                "classification": "TRACEABLE_PHYSICAL_GOOD"
            },
            "quantity": 1,
            "unit_price": 10,
            "net": 20.5,
            "tax": 0.1,
            "discount": {
                "amount": 20.5,
                "percentage": 20.5,
                "amount_incl_tax": 15.5
            },
            "sub_total": 200.5,
            "bundle_product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "ALARM001",
                "name": "Alarm"
            },
            "period": {
                "from": 1651172405,
                "to": 1653764405
            },
            "applied_taxes": [
                {
                    "tax_rate": {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "name": "Standard VAT",
                        "tax_code": "VAT",
                        "percentage": 20
                    },
                    "tax_amount": 9.99,
                    "tax_exempt_reason": "PRODUCT"
                }
            ],
            "applied_tiers": [
                {
                    "lower_tier": 1,
                    "upper_tier": 5,
                    "units_invoiced": 1,
                    "unit_price": 1.99
                }
            ],
            "devices": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "serial_number": "ADES-2243333"
                }
            ]
        }
    ],
    "taxes_breakdown": [
        {
            "tax_rate": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Standard VAT",
                "tax_code": "VAT",
                "percentage": 20
            },
            "tax_amount": 9.99,
            "tax_exempt_reason": "PRODUCT"
        }
    ],
    "invoices_credited": [
        {
            "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
            "number": "I1000101",
            "reference_number": "4345550002321234",
            "posted_date": 1655817643,
            "due_date": 1655817643,
            "total_amount": 19.99
        }
    ],
    "issued_for": {
        "entity": "ORDERS",
        "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
        "number": "O0000123"
    }
}
Payments

A Payment is a financial document issued by a customer to a business to settle an outstanding balance. A payment is usually issued for the same or lower amount of a specific invoice, and sets it off against the outstanding balance of that invoice or any other unsettled transactions.

POST /payments
PUT /payments/{id}
GET /payments
GET /payments/{id}
POST /payments/{id}/actions
Create Payment
POST /payments

Crediting the account to either settle an invoice or payment against the account. If no invoices are specified then the allocation is FIFO. A single payment can be created per Web API call, against a Contact or an Organisation

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
code
string

Code that uniquely identifies the payment. If not specified, then a random and unique 16-digits code will be automatically assigned.

Example:
9554443434296054
contact_id
string GUID required nullable

The contact on which the financial transaction will be posted against to (contact and organisation are semi-optional)

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
organisation_id
string GUID required nullable

The organisation on which the financial transaction will be posted against to (contact and organisation are semi-optional)

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
type_id
string GUID

The unique identifier of the financial transaction type. Only financial transaction types for Payments can be selected. If not specified, then the default Payment financial transaction type will be used.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
issued_date
integer epoch

The issued date of the financial transaction. Defaults to current date.

Example:
1583846865
posted_date
integer epoch

The posted date of the financial transaction. Defaults to current date

Example:
1583846865
amount
number required

The amount of the payment

Example:
9.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
notes
string

Any notes related to the financial transaction

state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
payment_method
Object
type
string required

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
id
string nullable

The unique identifier of the contac’ts payment method. Applicable and required when the select payment method type is either a Card, an Account Debit or a Wallet.

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

A number that provides a form of identification for the payment. Usually a number that represents the payment in an external system. Can also be used to register the cheque’s number in the corresponding payment method type.

invoices_paid
Array nullable

An array of unique IDs of Invoices to be paid. Either Invoices or External references must be specified (only one of the two)

Object
id
string

The unique identifier of the Invoice to be paid

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
external_payable
Array nullable

An array of reference numbers of external debits to be paid. Either Invoices or External references must be specified (only one of the two)

Object
reference
string

The external reference

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

Successful Request

Body
Object
id
string

The unique identifier of the Payment

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/payments HTTP/1.1 

Content-Type: application/json

{
    "code": "9554443434296054",
    "contact_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "organisation_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "amount": 9.99,
    "currency_code": "EUR",
    "notes": "",
    "state": "POSTED",
    "payment_method": {
        "type": "WALLET",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "backoffice_code": "",
    "invoices_paid": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "external_payable": [
        {
            "reference": "I0001231"
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Payment
PUT /payments/{id}

Update an existing draft payment financial transaction

Path variables

id
string required

The id of the Payment to be updated

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

The unique identifier of the financial transaction type id

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
issued_date
integer epoch

The issued date of the financial transaction. Defaults to current date.

Example:
1583846865
posted_date
integer epoch

The posted date of the financial transaction. Defaults to current date

Example:
1583846865
amount
number

The amount of the payment

Example:
9.99
notes
string

Any notes related to the financial transaction

Example:
Paid in Cash
payment_method
Object
type
string required

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
id
string nullable

The unique identifier of the contac’ts payment method. Applicable and required when the select payment method type is either a Card, an Account Debit or a Wallet.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
invoices_paid
Array nullable

An array of unique IDs of Invoices to be paid. Invoices or External References must be specified (one of the two only)

Object
id
string

Unique identifier of the Invoice to be paid

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
external__payable
Array nullable

An array of reference numbers of external debits to be paid. Invoices or External References must be specified (one of the two only)

Object
reference
string

The external debit transactions reference number

Example:
INV000123
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 200

Successful Request

Body
Object
id
string

The unique identifier of the payment

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/payments/{id} HTTP/1.1 

Content-Type: application/json

{
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "amount": 9.99,
    "notes": "Paid in Cash",
    "payment_method": { 
        "type": "CHEQUE",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "invoices_paid": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "external__payable": [
        {
            "reference": "INV000123"
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Payments
GET /payments

List all Payments

Request parameters

account_id
string GUID optional

The unique ID of the account whose Payments belong to

Example:
4AD9C84FA60F9FE407140E20F707726A
contact_id
string GUID optional

The unique ID of the contact whose Payments belong to

Example:
4AD9C84FA60F9FE407140E20F707726A
organisation_id
string optional

The unique ID of the organisation whose Payments belong to

state

The state of the Payments to be retrieved

Collection format: csv
custom_fields
string optional

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

Example:
key;value
search_value
string optional

Search for payments based on their codes

Example:
123456
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
type_id
array of string GUID optional

Search using Payment transaction type(s)

Collection format: csv
posted_date
string optional

Search using the Payment’s posted date

Enumeration:
&lt;date>[gt]

Returns results where the given <date> is greater than this value

&lt;date>[gte]

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

&lt;date>[lt]

Returns results where the given <date> is less than this value

&lt;date>[lte]

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

OK

Body
Object
content
Array
Object
id
string

The unique identifier of the payment

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

The payment’s code

Example:
6564443456760009
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
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
organisation
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
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
issued_date
integer epoch

The date that the financial transaction was issued

Example:
1583846865
posted_date
integer epoch

The date that the financial transaction was posted

Example:
1583846865
amount
number

The amount of the financial transaction

Example:
150.5
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
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/payments HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "code": "6564443456760009",
            "type": {
                "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
                "name": "Internal Transaction"
            },
            "contact": {
                "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
                "name": "John Doe",
                "code": "C123"
            },
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "state": "DRAFT",
            "issued_date": 1583846865,
            "posted_date": 1583846865,
            "amount": 150.5,
            "currency_code": "EUR",
            "payment_method": {
                "type": "CHEQUE",
                "identity": {
                    "id": "",
                    "identifier": "Visa *****1234 03/25"
                }
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Payment
GET /payments/{id}

Get detailed information of a Payment

Path variables

id
string required

The unique identifier of the to be retrieved

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 idnetifier of the payment

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

The payment’s unique code

Example:
4533340009897776
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
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
organisation
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
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
issued_date
integer epoch

The date that the financial transaction was issued

Example:
1583846865
posted_date
integer epoch

The date that the financial transaction was posted

Example:
1583846865
amount
number

The amount of the financial transaction

Example:
150
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
notes
string

Any notes of the financial transaction

invoices_paid
Array

The information of the financial transactions to be paid by the Payment

Object
id
string GUID

The unique ID of the Financial Transaction

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
number
string

The number of the Financial Transaction

Example:
INV123456
reference_number
string

The reference number of the Financial Transaction

Example:
123456
posted_date
integer epoch

The posted date of the Financial Transaction

Example:
1583846865
due_date
integer epoch

The due date of the Financial Transaction

Example:
1583846865
total
number

The total amount of the financial transaction

Example:
100.5
external_payable
Array

An array of reference numbers of external debits to be paid.

Object
reference
string

The external debit’s reference number

Example:
INV00010234
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
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/payments/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "code": "4533340009897776",
    "type": {
        "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
        "name": "Internal Transaction"
    },
    "account": {
        "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
        "name": "ACR1234 John Doe",
        "number": "AC123456"
    },
    "contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Johnson",
        "code": "C123"
    },
    "organisation": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "state": "POSTED",
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "amount": 150,
    "currency_code": "EUR",
    "payment_method": {
        "type": "CHEQUE",
        "identity": {
            "id": "",
            "identifier": "Visa *****1234 03/25"
        }
    },
    "notes": "",
    "invoices_paid": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "number": "INV123456",
            "reference_number": "123456",
            "posted_date": 1583846865,
            "due_date": 1583846865,
            "total": 100.5
        }
    ],
    "external_payable": [
        {
            "reference": "INV00010234"
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}
Payment Actions
POST /payments/{id}/actions

Perform actions on an existing Payment

Path variables

id
string GUID required

The unique identification of the payment that the actions will be performed against to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
action
string

The action to be performed on the Payment

Enumeration:
POST

Posts a Draft Payment

REJECT

Rejects a Draft Payment

REFUND

Refunds a Posted Payment. A Payment can be fully or partially refunded

Example:
POST
notes
string

The payment notes available to provide any information on the performed action

amount
number

Applicable only when refunding a payment. The refunded amount must be less than or equal to the Payment’s amount. If not specified, then the Payment is fully refunded

Example:
9.99

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the payment

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/payments/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "POST",
    "notes": "",
    "amount": 9.99
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Refunds

A Refund is a financial document issued by a business to a customer in order to fully or partially refund the customer’s payment. The refund transaction returns the money back to the customer’s account through which funds were initially taken because of the payment. Refunds are issued to customers who are not satisfied with their purchase or in cases where an order cannot be fully or partially delivered to the customer. Refunds are not issued to correct invoices.

POST /refunds
PUT /refunds/{id}
GET /refunds
GET /refunds/{id}
POST /refunds/{id}/actions
Create Refund
POST /refunds

Create a new Refund financial transaction. Through Refund transactions, the business returns money back to the contact/organisation based on a previously sumitted payment. So such transactions fully or partially refund a Payment.

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

The account that will be refunded.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
type_id
string GUID

The unique identifier of the Refund’s type. If not specified, then the default Refund financial transaction type will be set

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

The Refund’s code. If not specified, then a random and unique 6-digit code will be assigned to the new Refund

Example:
6779504440334213
amount
number required

The amount to be refunded. If not specified then it defaults to the payment’s amount. The amount should be less than or equal to the refunded entity’s amount. The amount’s currency is always in the refunded account’s currency

Example:
9.99
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
refunded_entity
Object required

The entity based on which the refund will be issued

type
string required

The type of the event

Enumeration:
PAYMENT

Issue refund based on a posted Payment

Example:
PAYMENT
id
string guid required

The unique identifier of the refunded entity

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
payment_method
Object
type
string required

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
id
string nullable

The unique identifier of the contac’ts payment method. Applicable and required when the select payment method type is either a Card, an Account Debit or a Wallet.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
issued_date
integer epoch

The issued date of the financial transaction. Defaults to current date.

Example:
1583846865
posted_date
integer epoch

The posted date of the financial transaction. Required when creating a Posted Refund

Example:
1583846865
notes
string

Any notes related to the financial transaction

Example:
Partially refund payment P0123456
issue_reason
string

The reason why the refunds was created

Example:
Refund money
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

Successful Request

Body
Object
id
string guid

The unique identifier of the new Refund

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/refunds HTTP/1.1 

Content-Type: application/json

{
    "account_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "code": "6779504440334213",
    "amount": 9.99,
    "state": "POSTED",
    "refunded_entity": {
        "type": "PAYMENT",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "payment_method": { 
        "type": "CARD",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "notes": "Partially refund  payment P0123456",
    "issue_reason": "Refund money",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}
Update Refund
PUT /refunds/{id}

Update a Draft Refund financial transaction

Path variables

id
string required

The id of the Refund to be updated

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

The unique identifier of the financial transaction type id

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

The amount to be refunded. The updated amount must be less than or equal to the refunded Payment’s amount. Amount’s curency is always in the account’s currency

Example:
200
payment_method
Object
type
string required

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
id
string nullable

The unique identifier of the contac’ts payment method. Applicable and required when the select payment method type is either a Card, an Account Debit or a Wallet.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
issued_date
integer epoch

The issued date of the financial transaction. Defaults to current date.

Example:
1583846865
notes
string

Any notes related to the financial transaction

Example:
Partially refund the account
issue_reason
string

The reason why the refund was created

Example:
Refund Money
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 200

Successful Request

Body
Object
id
string guid

The unique identifier of the financial transaction

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/refunds/{id} HTTP/1.1 

Content-Type: application/json

{
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "amount": 200, 
    "payment_method": {
        "type": "WALLET",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "issued_date": 1583846865,
    "notes": "Partially refund the account",
    "issue_reason": "Refund Money",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Refunds
GET /refunds

List all Refund transactions. Use various filters to retrieve a list of Refunds

Request parameters

account_id
string GUID optional

The unique ID of the account whose Refunds belong to

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
contact_id
string GUID optional

The unique ID of the contact whose Refunds belong to

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
organisation_id
string optional

The organisation tha was Refunded

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

The state of the Refunds to be retrieved

Collection format: csv
payment_id
string GUID optional

The Payment based on which a Refund was issued

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
custom_fields
string optional

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

Example:
key;value
search_value
string optional

The value of the search using the code

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

OK

Body
Object
content
Array
Object
id
string guid

The unique identifier of the Refund

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

The Refund’s code. This is a random and uniue, 16-digit code.

Example:
9945554321004453
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
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
organisation
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
issued_date
integer epoch

The date that the financial transaction was issued

Example:
1583846865
posted_date
integer epoch

The date that the financial transaction was posted

Example:
1583846865
amount
number

The amount of the financial transaction

Example:
150.5
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
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/refunds HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "code": "9945554321004453",
            "account": {
                "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
                "name": "ACR1234 John Doe",
                "number": "AC123456"
            },
            "type": {
                "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
                "name": "Internal Transaction"
            },
            "state": "POSTED",
            "contact": {
                "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
                "name": "John Doe",
                "code": "C123"
            },
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "issued_date": 1583846865,
            "posted_date": 1583846865,
            "amount": 150.5,
            "currency_code": "EUR",
            "payment_method": {
                "type": "CASH",
                "identity": {
                    "id": "",
                    "identifier": "Visa *****1234 03/25"
                }
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Refund
GET /refunds/{id}

Get detailed information for a Refund

Path variables

id
string guid required

The id of the financial transaction to be retrieved

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 guid

The unique identifier fo the Refund transaction

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

The financial transaction code

Example:
44400059654543322
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
amount
number

The amount of the financial transaction

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

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
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
organisation
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
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
issued_date
integer epoch

The date that the financial transaction was issued

Example:
1583846865
posted_date
integer epoch

The date that the financial transaction was posted

Example:
1583846865
issue_reason
string

The reason why the refund was created

Example:
Refund Money
notes
string

Any notes of the financial transaction

payment
Object

The Payment based on which the account was refunded

id
string guid

The unique identifier of the Payment

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

The payments code

Example:
9996545550123233
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
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/refunds/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "code": "44400059654543322",
    "account": {
        "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
        "name": "ACR1234 John Doe",
        "number": "AC123456"
    },
    "amount": 150.5,
    "currency_code": "EUR",
    "type": {
        "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
        "name": "Internal Transaction"
    },
    "contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Johnson",
        "code": "C123"
    },
    "organisation": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "state": "REJECTED",
    "payment_method": {
        "type": "CRM_WALLET",
        "identity": {
            "id": "",
            "identifier": "Visa *****1234 03/25"
        }
    },
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "issue_reason": "Refund Money",
    "notes": "",
    "payment": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "code": "9996545550123233"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}
Refund Actions
POST /refunds/{id}/actions

Perform actions on an existing Refund

Path variables

id
string GUID required

The unique identification of the refund that the actions will be performed against to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
action
string

The action to be performed on the Refund

Enumeration:
POST
REJECT
Example:
POST
notes
string

The refund available to provide any information on the performed action

Example:
Some notes

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the refund

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/refunds/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "POST",
    "notes": "Some notes"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Payouts

A payout is a financial document issued by a business to a customer in order to return back money directly to the customer’s funding source (bank account or card). Use Payouts to return back any amount of money to the customer.

POST /payouts
PUT /payouts/{id}
GET /payouts/{id}
GET /payouts
POST /payouts/{id}/actions
Create Payout
POST /payouts

Create a new Payout financial transaction against an Account. a single Payout can be issued within a Web API call.

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

The account on which the financial transaction will be posted against to

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
amount
number required

The amount of the payout. The amount’s is in the account’s currency

Example:
200
code
string

The Payout’s code. If not specified, then a unique and random 16-digit code will be assigned.

Example:
9994440593230796
payment_method
Object required

The payment method that will be used to return back money to the contact

type
string required

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
id
string required

The contact’s payment method identifier. Rerquired when an online payment method type is selected like Card, Account Debit or Wallet.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
type_id
string GUID

The unique identifier of the Payout financial transaction type. If not specified, then the default Payout fianncial trasnaction type will be automatically set.

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
issued_date
integer epoch

The issued date of the financial transaction. Defaults to current date.

Example:
1583846865
posted_date
integer epoch

The posted date of the financial transaction. Automatically set on posting the transaction

Example:
1583846865
notes
string

Any notes related to the financial transaction

Example:
Payout due to wrong payment amount
issue_reason
string

The reason why the payout was issued

Example:
Refund money
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the financial transaction

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/payouts HTTP/1.1 

Content-Type: application/json

{
    "account_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "amount": 200,
    "code": "9994440593230796",
    "payment_method": {
        "type": "CASH",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "type_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "state": "DRAFT",
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "notes": "Payout due to wrong payment amount",
    "issue_reason": "Refund money",
    "currency_code": "EUR"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Update Payout
PUT /payouts/{id}

Update a Draft Payout financial transaction

Path variables

id
string required

The id of the Payout to be updated

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

The unique identifier of the financial transaction id

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
issued_date
integer epoch

The issued date of the financial transaction. Defaults to current date.

Example:
1583846865
posted_date
integer epoch

The posted date of the financial transaction.

Example:
1583846865
amount
number

The amount of the payout

Example:
200
payment_method
Object
type
string required

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
id
string nullable

The unique identifier of the contac’ts payment method. Applicable and required when the select payment method type is either a Card, an Account Debit or a Wallet.

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

The reason why the Payout was created

Example:
Refund Money
notes
string

Any notes related to the Payout

Example:
Money to be returned back to contact's Credit ard

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the financial transaction

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/payouts/{id} HTTP/1.1 

Content-Type: application/json

{
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "amount": 200,
    "payment_method": {
        "type": "CHEQUE",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "issue_reason": "Refund Money",
    "notes": "Money to be returned back to contact's  Credit ard"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Get Payout
GET /payouts/{id}

REtrieved detailed infromation for a Payout.

Path variables

id
string required

The id of the financial transaction to be retrieved

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
code
string

The financial transaction code

Example:
44400059654543322
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
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
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
amount
number

The amount of the financial transaction

Example:
150.5
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
issued_date
integer epoch

The date that the financial transaction was issued

Example:
1583846865
posted_date
integer epoch

The date that the financial transaction was posted

Example:
1583846865
issue_reason
string

The reason why the refund was created

Example:
Refund Money
notes
string

Any notes of the financial transaction

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/payouts/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "code": "44400059654543322",
    "type": {
        "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
        "name": "Internal Transaction"
    },
    "contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Johnson",
        "code": "C123"
    },
    "account": {
        "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
        "name": "ACR1234 John Doe",
        "number": "AC123456"
    },
    "amount": 150.5,
    "currency_code": "EUR",
    "state": "PENDING",
    "payment_method": {
        "type": "ACCOUNT_DEBIT",
        "identity": {
            "id": "",
            "identifier": "Visa *****1234 03/25"
        }
    },
    "issued_date": 1583846865,
    "posted_date": 1583846865,
    "issue_reason": "Refund Money",
    "notes": ""
}
List Payouts
GET /payouts

Returns a list of Payout financial transactions. Use filters to search among all issued Payouts.

Request parameters

contact_id
string GUID optional

The unique ID of the contact whose Payouts belong to

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
account_id
string GUID optional

The unique ID of the account whose Payouts belong to

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

The life cycle state of the Payouts to be retrieved

Collection format: csv
search_value
string optional

The value of the search based on the code

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

OK

Body
Object
content
Array
Object
id
string

Unique identifier of the Payout financial transaction

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

The Payout’s unique and random code

Example:
4545556668909878
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
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
account
Object

Details about the related contact’s account

id
string GUID

The account identifier

Example:
8a025412-ec13-550a-4d82-6aef6562ac49
name
string

The account name

Example:
AC123456 John Doe
number
string

The account number

Example:
AC123456
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
issued_date
integer epoch

The date that the financial transaction was issued

Example:
1583846865
posted_date
integer epoch

The date that the financial transaction was posted

Example:
1583846865
amount
number

The amount of the financial transaction

Example:
150.5
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
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/payouts HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "code": "4545556668909878",
            "type": {
                "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
                "name": "Internal Transaction"
            },
            "contact": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "John Johnson",
                "code": "C123"
            },
            "account": {
                "id": "8a025412-ec13-550a-4d82-6aef6562ac49",
                "name": "ACR1234 John Doe",
                "number": "AC123456"
            },
            "state": "DRAFT",
            "issued_date": 1583846865,
            "posted_date": 1583846865,
            "amount": 150.5,
            "currency_code": "EUR",
            "payment_method": {
                "type": "CARD",
                "identity": {
                    "id": "",
                    "identifier": "Visa *****1234 03/25"
                }
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Payout Actions
POST /payouts/{id}/actions

Perform actions on an existing Payout

Path variables

id
string GUID required

The unique identification of the payout that the actions will be performed against to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
action
string

The action to be performed on the Payout

Enumeration:
POST

Posts a draft Payout

REJECT

Rejects a Draft Payout

Example:
POST
notes
string

Provide any information on the performed action

Example:
Some notes

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the Payout

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/payouts/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "POST",
    "notes": "Some notes"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Integrations
POST /integrations/
PUT /integrations/{id}
DELETE /integrations/{id}
GET /integrations/
GET /integrations/{id}
PUT /integrations/{id}/actions
GET /integrations/{id}/logs
Create Integration
POST /integrations/

Creates a new integration point between CRM.COM and a 3rd party tool/platform

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

Example:
Basic marketing tool
connector
string required

The 3rd party tool to integrate with

Enumeration:
MIXPANEL
MAILCHIMP
GOOGLE_PLACES
SETTLE
PLUGIN
type
string required

The implementation’s endpoint

Enumeration:
ADDRESS_REGISTRY
COMMUNICATIONS
MARKETING
PAYMENT_GATEWAYS
POINTS_OF_SALE
PROVISIONING_PROVIDERS
WIFI_PLATFORM
description
string nullable

The integration description

Example:
Utilise marketing tool
is_enabled
boolean nullable

Defines if integration is enabled or not

Default:
true
Example:
true
parameters
Array required

A set of parameters required for successfully integrating with the 3rd party platform (at least one is required)

Object
key
string required

The name of the parameter

Example:
API_key
value
string required

The value of the parameter

Example:
abc-123-dfe-22111
label
string required

The parameter’s label

Example:
API Key
type
string required

The parameter’s type

Enumeration:
STRING
NUMBER
INTEGER
is_plugin
boolean required

Defines whether the parameter is plugin related or not

Example:
false
values
Array nullable

Details about an array of mapped values between the internal (CRM) and external (integrator) systems

Object
external_reference
string required

The mapped external reference

Example:
12
value
string required

The mapped value

Example:
725b05ee-cfb3-c950-2db3-562dbbe0fdd4
headers
Array nullable

The (custom) headers that will be used as part of this integration

Object
key
string required

The header key

Example:
api_key
value
string required

The header value

Example:
b436956c-30d2-b1ce-ce98-b90ac2698bd9
plugin_type
string required

Defines the plugin type (release based or custom)

Example:
CUSTOM
authorisation_header
string

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The integration identifier

Example:
e5f0cbc9-e8a0-93cb-bb13-d6f5f20880fa
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/integrations/ HTTP/1.1 

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

{
    "name": "Basic marketing tool",
    "connector": "MAILCHIMP",
    "type": "PAYMENT_GATEWAYS",
    "description": "Utilise marketing tool",
    "is_enabled": "true",
    "parameters": [
        {
            "key": "API_key",
            "value": "abc-123-dfe-22111",
            "label": "API Key",
            "type": "NUMBER",
            "is_plugin": "false",
            "values": [
                {
                    "external_reference": "12",
                    "value": "725b05ee-cfb3-c950-2db3-562dbbe0fdd4"
                }
            ]
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "e5f0cbc9-e8a0-93cb-bb13-d6f5f20880fa"
}
Update Integration
PUT /integrations/{id}

Updates an existing integration

Path variables

id
string GUID required

The integration (identifier) that will be updated

Example:
a55700d4-e48c-616f-b3a4-06b722207276

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

Example:
Basic marketing tool
description
string nullable

The integration description

Example:
Utilise marketing tool
is_enabled
boolean nullable

Defines if integration is enabled or not.

Example:
true
parameters
Array nullable

A set of parameters required for successfully integrating with the 3rd party platform (at least one is required)

Object
key
string required

The name of the parameter

Example:
API_key
value
string required

The value of the parameter

Example:
abc-123-dfe-22111
label
string required

The parameter’s label

Example:
API Key
type
string required

The parameter’s type

Enumeration:
STRING
NUMBER
INTEGER
is_plugin
boolean required

Defines whether the parameter is plugin related or not

Example:
false
values
Array nullable

Details about an array of mapped values between the internal (CRM) and external (integrator) systems

Object
external_reference
string required

The mapped external reference

Example:
12
value
string required

The mapped value

Example:
725b05ee-cfb3-c950-2db3-562dbbe0fdd4
headers
Array nullable

The (custom) headers that will be used as part of this integration

Object
key
string required

The header key

Example:
api_key
value
string required

The header value

Example:
b436956c-30d2-b1ce-ce98-b90ac2698bd9

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The integration identifier

Example:
a55700d4-e48c-616f-b3a4-06b722207276
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/integrations/a55700d4-e48c-616f-b3a4-06b722207276 HTTP/1.1 

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

{
    "name": "Basic marketing tool",
    "description": "Utilise marketing tool",
    "enabled": "true",
    "parameters": [
        {
            "key": "API_key",
            "value": "3234234-324324-234",
            "label": "API Key",
            "type": "NUMBER",
            "is_plugin": "false",
            "values": [
                {
                    "external_reference": "201f2adb-174e-50d8-d0aa-f431711c8079",
                    "value": "12"
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a55700d4-e48c-616f-b3a4-06b722207276"
}
Delete Integration
DELETE /integrations/{id}

Remove an existing Integration

Path variables

id
string GUID required

The integration (identifier) that will be deleted

Example:
c1a1e2b6-ec65-18fc-d73b-29726f3df06f

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/integrations/c1a1e2b6-ec65-18fc-d73b-29726f3df06f HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Integrations
GET /integrations/

Retrieve a list of configured integration points between CRM.COM and 3rd party platforms based on search criteria (e.g. all enabled integrations)

Request parameters

connector
string optional

Filter based on connector

Enumeration:
MIXPANEL
MAILCHIMP
GOOGLE_PLACES
SETTLE
PLUGIN
type
string optional

Filter based on integration type

Enumeration:
ADDRESS_REGISTRY
COMMUNICATIONS
MARKETING
PAYMENT_GATEWAYS
POINTS_OF_SALE
PROVISIONING_PROVIDERS
WIFI_PLATFORM
is_enabled
boolean optional

Filter based on whether integrations are enabled or not

Example:
true
include_service_owner
boolean optional

If set, retrieve the integrations of the business as usual but if the business does not have configured or enabled an integration and its service owner does, then return the integration of the service owner

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 succeeded

Body
Object
content
Array
Object
id
string GUID

The integration identifier

Example:
8b724e8a-26a0-4c70-a959-b87d6acf8b50
name
string

The integration name

Example:
Twinsoft
description
string

The integration description

Example:
Twinsoft POS Integration
connector
string

The integration connector

Example:
TWINSOFT
type
string

The implementation’s endpoint

Enumeration:
ADDRESS_REGISTRY
COMMUNICATIONS
MARKETING
PAYMENT_GATEWAYS
POINTS_OF_SALE
PROVISIONING_PROVIDERS
WIFI_PLATFORM
is_enabled
boolean

Defines whether the integration is enabled or not

Example:
true
media_url
string

The media URL for the integration logo (applicable only for PLUGIN types)

Example:
crm.com/provider.png
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/integrations/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "8b724e8a-26a0-4c70-a959-b87d6acf8b50",
            "name": "Twinsoft",
            "description": "Twinsoft POS Integration",
            "connector": "TWINSOFT",
            "type": "PAYMENT_GATEWAYS",
            "is_enabled": true,
            "media_url": "crm.com/provider.png"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Integration
GET /integrations/{id}

Retrieve detailed information for an integration

Path variables

id
string GUID required

The integration (identifier) for which details will be retrieved

Example:
c0ec10d2-2549-3158-4e44-4fd9e833d000

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 integration’s identifier

Example:
c0ec10d2-2549-3158-4e44-4fd9e833d000
name
string

The integration’s name

Example:
Marketing tool
description
string

The integration’s description

Example:
Default marketing tool used for forwarding email campaigns
connector
string

The 3rd party tool to integrate with

Enumeration:
MIXPANEL
MAILCHIMP
GOOGLE_PLACES
SETTLE
PLUGIN
type
string

The implementation’s endpoint

Enumeration:
ADDRESS_REGISTRY
COMMUNICATIONS
MARKETING
PAYMENT_GATEWAYS
POINTS_OF_SALE
PROVISIONING_PROVIDERS
WIFI_PLATFORM
is_enabled
boolean

Defines whether the integration is enabled or not

Example:
true
parameters
Array

A list of parameters required for the integration

Object
key
string

The name of the parameter

Example:
API_Key
value
string

The value of the parameter

Example:
dacb48d8-3c1a-2321-b2b8-3b4a3f335a71
label
string

The parameter’s label

Example:
API Key
type
string

The parameter’s type

Enumeration:
STRING
NUMBER
INTEGER
is_plugin
boolean

Defines whether the parameter is plugin related or not

Example:
true
is_read_only
boolean

Defines whether the parameter is for read purposes or not

Default:
false
Example:
true
values
Array

Details about an array of mapped values between the internal (CRM) and external (integrator) systems

Object
external_reference
string

The mapped CRM external reference

Example:
201f2adb-174e-50d8-d0aa-f431711c8079
value
string

The mapped integrator value

Example:
12
media_url
string

The media URL for the integration logo (applicable only for PLUGIN types)

Example:
crm.com/provider.png
logo_media_url
string

The media (logo) URL for the integration logo (applicable only for PLUGIN types)

Example:
crm.com/logo-provider.png
headers
Array

The (custom) headers that will be used as part of this integration

Object
key
string

The header key

Example:
api+key
value
string

The header value

Example:
sdgkjhbwef-ikjwerhbg
authorisation_header
string
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/integrations/c0ec10d2-2549-3158-4e44-4fd9e833d000 HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c0ec10d2-2549-3158-4e44-4fd9e833d000",
    "name": "Marketing tool",
    "description": "Default marketing tool used for forwarding email campaigns",
    "connector": "PLUGIN",
    "type": "MARKETING",
    "is_enabled": "true",
    "parameters": [
        {
            "key": "API_Key",
            "value": "dacb48d8-3c1a-2321-b2b8-3b4a3f335a71",
            "label": "API Key",
            "type": "NUMBER",
            "is_plugin": "true",
            "is_read_only": "true",
            "values": [
                {
                    "external_reference": "201f2adb-174e-50d8-d0aa-f431711c8079",
                    "value": "12"
                }
            ]
        }
    ],
    "media_url": "crm.com/provider.png",
    "logo_media_url": "crm.com/logo-provider.png"
}
Perform Integration Actions
PUT /integrations/{id}/actions

Perform actions on an existing integration (e.g. change API Key)

Path variables

id
string GUID required

The integration (identifier) that actions will be performed

Example:
6346ff58-3691-05c9-513e-f996299a9186

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 action that will be applied on the integration

Enumeration:
API_KEY

Generate a new API Key for the integration

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The integration identifier

Example:
dad569a1-b5c0-eae2-4659-1753df6a8b7f
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/integrations/6346ff58-3691-05c9-513e-f996299a9186/actions HTTP/1.1 

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

{
    "action": "API_KEY"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "dad569a1-b5c0-eae2-4659-1753df6a8b7f"
}
List Integration Logs
GET /integrations/{id}/logs

Retrieve a list of logs (related to an integration plugin) based on search criteria (e.g. all post api requests)

Path variables

id
string GUID required

The integration (identifier) of which logs should be retrieved

Example:
2dae3ca9-62aa-2e0a-3029-a6ac9afc47c4

Request parameters

state
string optional

Filter based on the request state

Enumeration:
PENDING
SUCCESS
FAILED
contact_id
string GUID optional

Filter based on contact

Example:
88870513-fe6c-fd81-0f9b-2c407f8ca847
subscription_id
string GUID optional

Filter based on subscription

Example:
5be3891a-4740-bd73-22dc-3ff68c288682
user_id
string GUID optional

Filter based on user

Example:
7a62e27d-eeb8-1fea-8260-17a72110de51
submitted_date
integer epoch optional

Filter based on the date that such request was submitted

Example:
1655903906
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 request identifier

Example:
90f47a4a-344d-2433-234b-553ce143187e
state
string

The request state

Enumeration:
PENDING
SUCCESS
FAILED
submitted_date
integer epoch

The date that such request was made

Example:
1596093272
request_code
string

A code that describes the request

Example:
RC012323
body
string

The request body that was sent

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

The response that was sent

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

The error that is thrown

code
string

The error code

Example:
404
description
string

The error description

Example:
bad request
contact
Object

The contact that owns the subscription

id
string GUID

The contact’s identifier

Example:
437f21e8-f2e5-a774-101f-c1a8369d3ab0
name
string

The contact’s name

Example:
John Smith
code
string

The contact’s code

Example:
18235
reference_number
string

The request reference number

Example:
12
user
Object

The user who performed the event

id
string GUID

The user identifier

Example:
4eac7060-307f-3937-2762-2beed146101f
name
string

The user (full) name

Example:
Jane Smith
email
string

The user email address

Example:
jsmith@acompany.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

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/integrations/2dae3ca9-62aa-2e0a-3029-a6ac9afc47c4/logs HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "90f47a4a-344d-2433-234b-553ce143187e",
            "state": "SUCCESS",
            "submitted_date": 1596093272,
            "request_code": "RC012323",
            "body": "POST /crm.com/delivery HTTP/1.1 Host: staging.crm.com Content-Type: application/json api_key: 123456789012-1234-1234-1234-123456789012 Content-Type: text/plain  {     \"contact_id\": \"123456789012-ABCD-ABCD-ABCD-123456789012\",     \"amount\": 20.45 }",
            "response": "{     \"status\": {         \"code\": \"COM.CRM.EXCEPTION.INVALIDTOKENEXCEPTION\",         \"description\": \"The specific token is not valid.\",         \"message\": \"The token is invalid, please obtain a new one.\"     } }",
            "error": {
                "code": "404",
                "description": "bad request"
            },
            "contact": {
                "id": "437f21e8-f2e5-a774-101f-c1a8369d3ab0",
                "name": "John Smith",
                "code": "18235"
            },
            "reference_number": "12",
            "user": {
                "id": "4eac7060-307f-3937-2762-2beed146101f",
                "name": "Jane Smith",
                "email": "jsmith@acompany.com"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Mixpanel
GET /cohorts
POST /cohorts/{id}/user_profiles
List Cohorts
GET /cohorts

Returns a list of Cohorts configured in Mixpanel. Any Cohort will then be available to be imported in CRM.COM as a segment

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 cohort identifier

Example:
fb47dde9-7de4-f88f-5430-384ea51ad480
name
string

The cohor name

Example:
Great buyers
description
string

The cohor description

Example:
Customers with moe then £500 purchases during the last month
count
integer

The number of cohors

Example:
159
created_date
integer epoch

The cohor created date

Example:
332222331111
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/cohorts HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "fb47dde9-7de4-f88f-5430-384ea51ad480",
            "name": "Great buyers",
            "description": "Customers with moe then £500 purchases during the last month",
            "count": 159,
            "created_date": 332222331111
        }
    ]
}
Import User Profiles
POST /cohorts/{id}/user_profiles

Creates a new (single) segment within CRM.COM that includes all user profiles of a Mixpanel cohort

Path variables

id
string GUID required

The Mixpanel Cohort (identifier) whose user profiles will be included in the segment

Example:
aef5b1c2-d407-e018-6563-d5dfa17870fb

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

201 Created

The request has succeeded

Body
Object
id
string GUID

The segment identifier

Example:
bb1ac256-8334-731d-d1f2-f30d95ab61e0
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/cohorts/aef5b1c2-d407-e018-6563-d5dfa17870fb/user_profiles HTTP/1.1 

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

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "bb1ac256-8334-731d-d1f2-f30d95ab61e0"
}
Mailchimp
POST /lists
Create List
POST /lists

Create a new segment in Mailchimp based on a CRM.COM segment

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
id
string GUID required

The segment’s identifier

Example:
0d56b98e-9ff0-e114-664e-54e4afe49c9a

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/v1/lists HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "id": "87A08449A8784063814398C104452B27"
}

HTTP/1.1 200 OK 
Address Registry
GET /addresses
Address Lookup
GET /addresses

Returns a list of addresses based on the external address registry systems that CRM.COM integrates with

Request parameters

integration
string optional

The address registry that lookup will be performed

Enumeration:
GOOGLE
address
string required

The address that lookup will be performed against (address and latlng are semi-optional)

Example:
The address that lookup will be performed against
latlon
string optional

The lat and lng coordinates that lookup will be performed against (address and latlng are semi-optional)

Example:
40.714224,-73.961452

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
address
string

The full address as returned by the address registry

Example:
Elia Papakyriakou, Egkomi, 2415, Nicosia, Cyprus
address_line_1
string

The address information

Example:
Elia Papakyriakou 21
address_line_2
string

Additional address information about the address

Example:
7 Tower Stars
state_province_county
string

The state/province/county of the address

Example:
Egkomi
town_city
string

The town/city of the address

Example:
Nicosia
postal_code
string

The postal code of the address

Example:
2415
country_code
string

The country code of the address

Example:
CY
lan
number

The latitude of the address

Example:
12.98
lon
number

The longitude of the address

Example:
22.98
google_place_id
string

The Google textual identifier that uniquely identifies a location

Example:
ad23rwef2323f23f2f
types
Array

The Google types that will be retrieved

string
Examples:
BakeryAccounting
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/addresses?address=The address that lookup will be performed against HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "address": "Elia Papakyriakou, Egkomi, 2415, Nicosia, Cyprus",
            "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",
            "lan": 12.98,
            "lon": 22.98,
            "googlePlaceId": "ad23rwef2323f23f2f",
            "types": [
                "Accounting"
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "address": "Elia Papakyriakou, Egkomi, 2415, Nicosia, Cyprus",
            "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",
            "lan": 12.98,
            "lon": 22.98,
            "googlePlaceId": "ad23rwef2323f23f2f",
            "types": [
                "Accounting"
            ]
        }
    ]
}
Provisioning Providers
GET /provisioning/ird_commands
POST /provisioning/ird_commands
POST /provisioning/utility
Get IRD Commands
GET /provisioning/ird_commands

Retrieve a list of Integrated Receiver/Decoder (IRD) commands (of a device) as implemetned in a provisoning adapter. Either the provisioning adapter’s unique identifier must be specified or the external reference (usually the serial number) of the device

Request parameters

integration_id
string GUID optional

Filter based on the provisioning provider (integration)

Example:
dfaee4a1-770a-bf61-2f01-a37eab2a6496
external_reference
string optional

Filter based on the device external reference

Example:
SN0012-QWE1

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

The command name

Example:
Reset PIN
label
string

The command label (can be used as a tooltip in the UI)

Example:
Reset Device PIN
code
string

The command (unique) code. It’s value can be vary according to the implemented IRD commands per provisioning provider.

Enumeration:
RESET_PIN
REFRESH
description
string

The command description (can be used as a tooltip in the UI)

Example:
Resets the PIN to a given value
metadata_attributes
Array

Defines a list of extra information that might be required to be provided when sending the command to the provider

Object
key
string

The parameter (unique) key

Example:
pin
label
string

The parameter label (used for UI purposes)

Example:
PIN
description
string

The parameter description

Example:
the new pin
field
string

The parameter field type (used for UI purposes)

Enumeration:
SELECTION
TEXT
is_mandatory
boolean

Indicates whether the parameter is mandatory in order to be send the command successfully

Default:
false
Example:
true
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/provisioning/ird_commands HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "name": "Reset PIN",
            "label": "Reset Device PIN",
            "code": "RESET_PIN",
            "description": "Resets the PIN to a given value",
            "metadata_attributes": [
                {
                    "key": "pin",
                    "label": "PIN",
                    "description": "the new pin",
                    "field": "SELECTION",
                    "is_mandatory": true
                }
            ]
        }
    ]
}
Send IRD command
POST /provisioning/ird_commands

Send an Integrated Receiver/Decoder (IRD) command for a device over to the provisoning adapter. The supported commands as well as detailed information on how to call them such as the required input paramters, can be retrieved from the plugin integration via the GET provisionig/ird_commands Web API.

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

The device external reference (e.g. serial number) to which the IRD command will be sent

Example:
STB00013929322
code
string required

The IRD command’s unique code as this is implemented by the provisioning plugin

Example:
RESET_PIN
device_location
string nullable

The device’s location (required only when sending a command related to the device’s physical locatin/region)

Example:
master room
metadata_attributes
Array nullable

Defines a list of extra paramters (apart from the external reference) that is required to successfully send the command. Mandatory input paramters must be specified, otherwise default values set up in Provisioning Providers configuration will be used

Object
key
string required

The parameter’s key

Example:
pin
value
string required

The parameter’s value

Example:
1234

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

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
POST https://sandbox.crm.com/backoffice/v2/provisioning/ird_commands HTTP/1.1 

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

{
    "external_reference": "STB00013929322",
    "code": "RESET_PIN",
    "device_location": "master room",
    "metadata_attributes": [
        {
            "key": "pin",
            "value": "1234"
        }
    ]
}

HTTP/1.1 204 No Content 
Provisioning Utility
POST /provisioning/utility

Send an Integrated Receiver/Decoder (IRD) command to a group of devices over to the provisoning adapter. The supported commands as well as detailed information on how to call them such as the required input paramters, can be retrieved from the plugin integration via the GET provisioning/ird_commands Web API.

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

The device external reference (e.g. serial number) to which the IRD command will be sent

Example:
STB00013929322
code
string required

The IRD command’s unique code as this is implemented by the provisioning plugin

Example:
RESET_PIN
metadata_attributes
Array nullable

Defines a list of extra paramters (apart from the external reference) that is required to successfully send the command. Mandatory input paramters must be specified, otherwise default values set up in Provisioning Providers configuration will be used

Object
key
string required

The parameter’s key

Example:
pin
value
string required

The parameter’s value

Example:
1234
contacts
Array nullable

A list of contact (unique) identifiers. The IRD commad is sent to all devices owned/rented by the specified contacts

Unique items: YES
string GUID
Example:
9f316c86-e6a1-aa28-a0ab-640e29ad5d7d
services
Array of string nullable

A list of service product identifiers. The IRD command will be sent to the devices on whicch at least one of the specified service is enabled on.

Unique items: YES
products
Array of string nullable

A list of physical good products (the product of a device). The IRD command is sent only to devices whose product is one of the specified ones

Unique items: YES
devices
Array of string nullable

A list of devices external references (e.g. device serial number). Only the specified devices will receive the IRD command

Unique items: YES

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/v1/provisioning/ird_commands HTTP/1.1 

Content-Type: application/json

{
    "external_reference": "STB00013929322",
    "code": "RESET_PIN",
    "device_location": "master room",
    "metadata_attributes": [
        {
            "key": "pin",
            "value": "1234"
        }
    ]
}

HTTP/1.1 201 Created 
Payment Gateways
GET /payment_gateways
List Payment Gateways
GET /payment_gateways

Retrieves a list of configured payment gateway integration points in CRM.COM

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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The integration identifier

Example:
8b724e8a-26a0-4c70-a959-b87d6acf8b50
name
string

The integration name

Example:
PayPal
description
string

The integration description

Example:
PayPal payment gateway
connector
string

The integration connector

Example:
PLUGIN
type
string

The implementation’s endpoint

Enumeration:
ADDRESS_REGISTRY
COMMUNICATIONS
MARKETING
PAYMENT_GATEWAYS
POINTS_OF_SALE
PROVISIONING_PROVIDERS
WIFI_PLATFORM
is_enabled
boolean

Defines whether the integration is enabled or not

Example:
true
media_url
string

The media URL for the integration logo (applicable only for PLUGIN types)

Example:
crm.com/provider.png
classifications
Array

Defines the supported transaction classifications of such integration

string
Enumeration:
PAYMENTS
REFUNDS
PAYOUTS
payment_methods
Array

Defines the supported payment methods of such integration

string
Enumeration:
CARD
WALLET
ACCOUNT_DEBIT
details
Object

Required details per supported pament method

account_debit
Array nullable

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

string
Enumeration:
IBAN

IBAN code

NAME

Account name

NUMBER

Account Numer

BANK

Bank name

BANK_CODE

Bank code

BRANCH

Branch name

SWIFT
SORT_CODE
MANDATE
TYPE

Account type (Savings, Chekings)

COUNTRY
CURRENCY
card
string nullable

roadmap

wallet
Array nullable
string
Enumeration:
PHONE
EMAIL
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/payment_gateways HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "8b724e8a-26a0-4c70-a959-b87d6acf8b50",
            "name": "PayPal",
            "description": "PayPal payment gateway",
            "connector": "PLUGIN",
            "integration_type": "COMMUNICATIONS",
            "enabled": true,
            "media_url": "crm.com/provider.png",
            "classifications": [
                "PAYMENTS"
            ],
            "payment_method_types": [
                "CARD"
            ],
            "details": {
                "account_debit": [
                    "SWIFT"
                ],
                "card": "",
                "wallet": [
                    "PHONE"
                ]
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Inventory
GET /warehouses/stock
POST /warehouses/transactions
GET /warehouses/transactions
GET /warehouses/transactions/{id}
GET /warehouses/stock/reserved
Get Stock Balance
GET /warehouses/stock

Retrieves the stock balance of the current (business) inventory located into its warehouse

Request parameters

product_id
string GUID optional

The product for which the stock will be retrieved

Example:
6A24D2B5E44F44B28451FE021FCAD51E
product_type_id
string GUID optional

The product type for which the stock will be retrieved

Example:
6A24D2B5E44F44B28451FE021FCAD51E
product_family_id
string GUID optional

The product family for which the stock will be retrieved

Example:
6A24D2B5E44F44B28451FE021FCAD51E
is_traceable
boolean optional

Filter based on whether products to be retrieved should be traceable or not

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 succeeded

Body
Object
content
Array
Object
product
Object
id
string GUID

The ID of the product

Example:
6A24D2B5E44F44B28451FE021FCAD51E
sku
string

The sku of the product

Example:
sku
name
string

The name of the product

Example:
Set-top-box
is_traceable
boolean

Defines whether the product is traceable

Example:
true
number_of_variants
integer

Applicable only for Composite products. Defines the number of variant products also available in stock

Example:
3
composite_product
Object

Applicable only for variant products as it shpws the composite product

id
string
sku
string
name
string
stock_balance
integer

Defines the quantity of products that exist in the warehouse

Example:
100
latest_cost_per_unit
number

Defines the latest cost per unit sold on most recent invoice

Example:
9.99
average_cost_per_unit
number

Defines the average cost per unit

Example:
3.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
reserved
integer

Warehouse items reserved by various processes like non-completed Orders/Service Requests and in Draft Invoices

Example:
10
dispatched
integer

Warehouse items owned by the business but given out to contacts and not yet invoiced. These items are not located in the warehouse.

Example:
105
rented
integer

Warehouse items owned by the business and given out to contacts as Rentals. These items are not located in the warehouse.

Example:
5
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/warehouses/stock HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "product": {
                "id": "6A24D2B5E44F44B28451FE021FCAD51E",
                "sku": "sku",
                "name": "Set-top-box",
                "is_traceable": "true",
                "number_of_variants": 3,
                "composite_product": {
                    "id": "",
                    "sku": "",
                    "name": ""
                }
            },
            "stock_balance": 100,
            "latest_cost_per_unit": 9.99,
            "average_cost_per_unit": 3.99,
            "currency_code": "EUR",
            "reserved": 10,
            "dispatched": 105,
            "rented": 5
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Create Warehouse Transaction
POST /warehouses/transactions

Creates a new warehouse transaction. Warehouse transactions of any type can be created with this Web API call.

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
type
string required
Enumeration:
STOCK_IN

Moves items to the warehouse

STOCK_OUT

Removes items from warehouse

STOCK_ADJUSTMENT

Used to adjust the stock in the warehouse

code
string nullable

The transaction’s code (if not specified, then a unique random 16-digit code is assigned)

Example:
5467778889098987
supplier
string required

The supplier of the products (applicable and required only for stock in transactions)

Example:
AluxSat Provider
description
string nullable

The transaction’s description

Example:
A stock in transaction to import modems
contact_id
string GUID required nullable

The contact (identifier) that the device is sold/rented to (applicable only for stock out transactions, when not sold/rented to other organisations)

Example:
1aeaca44-132b-3fa6-685a-dbd757f1dfb7
organisation_id
string GUID required nullable

The organisation (identifier) that the device is sold/rented to (applicable only for stock out transactions, when not sold/rented to contacts)

Example:
7a31ab39-d4e2-9d75-aadc-3d44d0484fb5
initiated_by
Object nullable
entity
string
Enumeration:
INVOICE

Triggers Stock Out transactions

CREDIT_NOTE

Triggers Stock In transactions

ORDER

Items dispatched to consumers

SERVICE_REQUEST

Items dispatched to consumers

SUBSCRIPTION

Item added as a Rental on a subscription (when Stocked Out) or rental item returned back to the warehouse when removed from Subscription (Stock ins)

Example:
INVOICE
id
string GUID

The initiating entity identifier

Example:
7cddd084-b07d-7bb7-0233-b244a25ed879
items
Array required

The items to be included in the transaction

Object
product_id
string GUID required

The product (identifier) of the transaction item. (only traceable or not stockable physical goods can be specified)

Example:
7d39062b-5fd9-c4e5-1078-b1dd9186a936
quantity
integer nullable

The quantity to stock in/out. (required for non-traceable physical goods, where for traceable physical goods the quantity is calculated based on the number of device serial numbers)

Example:
10
unit_cost
number nullable

The cost per unit (applicable only for stock in transaction)

Example:
10.5
adjust_type
string required

Defines how the stock balance will be adjusted by this transaction. Applicable only for Stock Adjustments.

Enumeration:
+

Stock will be increased

-

Stock will be decreased

Example:
+
devices
Array nullable

Defines the devices that will be included in the transaction

Object
serial_number
string required

The device serial number

Example:
SN092478234
electronic_id
string nullable

The device electronic id

Example:
EI09243ijh2EW

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The warehouse transaction identifier

Example:
e3743be1-54d5-5f67-b187-887b0b47040f
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/warehouses/transactions HTTP/1.1 

Content-Type: application/json

{
    "type": "STOCK_OUT",
    "code": "5467778889098987",
    "supplier": "AluxSat Provider",
    "description": "A stock in transaction to import modems",
    "organisation_id": "7a31ab39-d4e2-9d75-aadc-3d44d0484fb5",
    "items": [
        {
            "product_id": "7d39062b-5fd9-c4e5-1078-b1dd9186a936",
            "quantity": 10,
            "unit_cost": 10.5,
            "adjust_type": "+",
            "item_id": "e4d3b37f-81a4-7f79-38e7-77fafff64078"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "e3743be1-54d5-5f67-b187-887b0b47040f"
}
List Warehouse Transactions
GET /warehouses/transactions

Search for warehouse transactions. Transactions of a single warehouse can be retreived.

Request parameters

search_value
string optional

Filter based on search value (case insensitive) across transaction’s code

Example:
WT-001
type
string optional

Filter based on warehouse transaction’s type

Enumeration:
STOCK_IN

Moves items to the warehouse

STOCK_OUT

Removes items from warehouse

STOCK_ADJUSTMENT

Used to adjust the stock in the warehouse

product_id
string GUID optional

Filter based on products that exist on transactions

Example:
c919a691-b324-ba82-9acb-a010a16cc839
transaction_date
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:
date[gt]

Returns results where the performed date is greater than this value

date[gte]

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

date[lt]

Returns results where the performed date is less than this value

date[lte]

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

initiated_by
string optional

Filter based on the entity (type) that initiated the transaction

Enumeration:
INVOICE

Triggers Stock Out transactions

CREDIT_NOTE

Triggers Stock In transactions

ORDER

Items dispatched to consumers

SERVICE_REQUEST

Items dispatched to consumers

SUBSCRIPTION

Item added as a Rental on a subscription (when Stocked Out) or rental item returned back to the warehouse when removed from Subscription (Stock ins)

Example:
INVOICE
initiated_by_id
string GUID optional

Filter based on the entity (identifier) that initiated the transaction (requires initiated_by)

Example:
f49c8554-d540-9925-d508-ffa64d8ff6f6
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
product_type_id
string GUID optional

Filter based on product type

Example:
092d1e40-2044-8b3b-72e0-68f5e7913c7f
user_id
string GUID optional

Filter based on user (that submitted such transaction)

Example:
73a2c9ea-ab73-d5e0-9289-5ab145d3bd96

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 transaction’s identifier

Example:
99cd9de0-93e7-4d73-5ac8-16fa45819c32
code
string

The transaction’s code

Example:
4345600003321234
description
string

The transaction’s description

Example:
A stock in transaction to import modems
type
string
Enumeration:
STOCK_IN

Moves items to the warehouse

STOCK_OUT

Removes items from warehouse

STOCK_ADJUSTMENT

Used to adjust the stock in the warehouse

number_of_items
integer

The number of items (products) moved due to the transaction

Example:
1000
performed_date
integer epoch

The date on which the transaction was performed

Example:
1618857652
performed_by
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@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/warehouses/transactions HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "99cd9de0-93e7-4d73-5ac8-16fa45819c32",
            "code": "4345600003321234",
            "description": "A stock in transaction to import modems",
            "type": "STOCK_OUT",
            "number_of_items": 1000,
            "performed_date": 1618857652,
            "performed_by": {
                "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
                "name": "John Smith",
                "username": "johnsmith@crm.com"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "99cd9de0-93e7-4d73-5ac8-16fa45819c32",
            "code": "4345600003321234",
            "description": "A stock in transaction to import modems",
            "type": "STOCK_ADJUSTMENT",
            "number_of_items": 1000,
            "performed_date": 1618857652,
            "performed_by": {
                "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
                "name": "John Smith",
                "username": "johnsmith@crm.com"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Warehouse Transaction
GET /warehouses/transactions/{id}

Get details for a specific warehouse transaction

Path variables

id
string GUID required

The warehouse transaction (identifier) to be retrieved

Example:
c52e6ac3-5889-6006-4d7c-0a43c6cfefec

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

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

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

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The transaction’s identifier

Example:
c52e6ac3-5889-6006-4d7c-0a43c6cfefec
code
string

The transaction’s code

Example:
434000321934812
description
string

The transaction’s description

Example:
Stock in HD Receivers April 2021
supplier
string

The supplier that stocked in transaction was made from

Example:
AluxSat Provider
type
string
Enumeration:
STOCK_IN

Moves items to the warehouse

STOCK_OUT

Removes items from warehouse

STOCK_ADJUSTMENT

Used to adjust the stock in the warehouse

total_cost
number

The total cost of the warehouse transaction

Example:
99.99
currency
string

The twarehose transaction’s currency

Example:
EUR
performed_date
integer

The date on which the transaction was performed

Example:
1618859668
performed_by
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
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
organisation
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
items
Array

The list of items included in the warehouse transaction

Object
product
Object
id
string GUID

The product identifier

Example:
e283a863-18e1-7cae-48c4-7433bf28cf97
sku
string

The product SKU code

Example:
ABC-12345
name
string

The product name

Example:
ABC
quantity
integer

The products’s quantity (applicable for stock in/out transactions)

Example:
10
unit_cost
number

The unit cost per product (applicable for stock in/out transactions)

Example:
10.99
total_cost
number

The total cost per transaction item (applicable for stock in/out transactions)

Example:
109.9
adjust_type
string

Indicates whether the specified products are added or removed from the warehouse’s stock balance (applicable for stock adjustments)

Enumeration:
+
-
Example:
+
devices
Array

The devices that were part of the transaction

Object
serial_number
string

The device serial number

Example:
sn20948kojsdf
electronic_id
string

The device electronic id

Example:
ed3894uyrtehrf
initiated_by
Object

The entity that triggered the transaction

type
string
Enumeration:
INVOICE

Triggers Stock Out transactions

CREDIT_NOTE

Triggers Stock In transactions

ORDER

Items dispatched to consumers

SERVICE_REQUEST

Items dispatched to consumers

SUBSCRIPTION

Item added as a Rental on a subscription (when Stocked Out) or rental item returned back to the warehouse when removed from Subscription (Stock ins)

Example:
INVOICE
id
string GUID

The unique identifier of the entity e.g. Service Request, Subscription or a financial transaction

Example:
321c4a1f-066d-a321-3b5b-f386a9750e4c
number
string

The number of the entity

Example:
AT1234RE
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/warehouses/transactions/c52e6ac3-5889-6006-4d7c-0a43c6cfefec HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c52e6ac3-5889-6006-4d7c-0a43c6cfefec",
    "code": "434000321934812",
    "description": "Stock in HD Receivers April 2021",
    "supplier": "AluxSat Provider",
    "type": "STOCK_ADJUSTMENT",
    "total_cost": 99.99,
    "currency": "EUR",
    "performed_date": 1618859668,
    "performed_by": {
        "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
        "name": "John Smith",
        "username": "johnsmith@crm.com"
    },
    "contact": {
        "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
        "name": "John Doe",
        "code": "C123"
    },
    "organisation": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "items": [
        {
            "product": {
                "id": "e283a863-18e1-7cae-48c4-7433bf28cf97",
                "sku": "ABC-12345",
                "name": "ABC"
            },
            "quantity": 10,
            "unit_cost": 10.99,
            "total_cost": 109.9,
            "adjust_type": "+"
        }
    ],
    "initiated_by": {
        "type": "INVOICE",
        "id": "321c4a1f-066d-a321-3b5b-f386a9750e4c",
        "number": "AT1234RE"
    }
}
Get Reserved Stock
GET /warehouses/stock/reserved

Retrieves the reserved (traceable & non-traceable) products with the reserved by entity and quantity

Request parameters

product_id
string GUID optional

The product for which the stock will be retrieved

Example:
6A24D2B5E44F44B28451FE021FCAD51E
product_type_id
string GUID optional

The product type for which the stock will be retrieved

Example:
6A24D2B5E44F44B28451FE021FCAD51E
product_family_id
string GUID optional

The product family for which the stock will be retrieved

Example:
6A24D2B5E44F44B28451FE021FCAD51E
is_traceable
boolean optional

Filter based on whether products to be retrieved should be traceable or not

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
order_id
string GUID optional

Filter based on the order that such products are reserved by

Example:
4feedb00-5a99-e559-581c-5cbb5b146b3e
service_request_id
string GUID optional

Filter based on the service request that such products are reserved by

Example:
bf360690-783b-d8a5-ec6f-ecdab0786c7f
invoice_id
string GUID optional

Filter based on the invoice that such products are reserved by

Example:
7d8f7ef8-b0b0-dd09-ee6a-6d7528d0194a

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

The product identifier

Example:
e283a863-18e1-7cae-48c4-7433bf28cf97
sku
string

The product SKU code

Example:
ABC-12345
name
string

The product name

Example:
ABC
reserved_by
Object

The business entity from which the device is reserved

type
string

The business entity from which the device is reserved for

Enumeration:
ORDERS
SERVICE_REQUESTS
INVOICES
id
string GUID

The business entity identifier that such device is reserved by

Example:
370324b5-5f55-7f84-43e5-5699cc2ae26d
number
string

The business entity number that such device is reserved by

Example:
N1234
quantity
integer

The number of reserved products

Example:
12
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/warehouses/stock/reserved HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "product": {
                "id": "e283a863-18e1-7cae-48c4-7433bf28cf97",
                "sku": "ABC-12345",
                "name": "ABC"
            },
            "reserved_by": {
                "type": "SERVICE_REQUESTS",
                "id": "370324b5-5f55-7f84-43e5-5699cc2ae26d",
                "number": "N1234"
            },
            "quantity": 12
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Leads

A (sales) lead, is a prospect customer who is interested in the products or services your company has to offer. Each new lead is assigned to a queue with stages, the lead progresses through the stages in a predefined order until it’s won or lost.

POST /leads
PUT /leads/{id}
DELETE /leads/{id}
GET /leads
GET /leads/{id}
GET /leads/{id}/queues/stages
POST /leads/{id}/actions
POST /leads/bulk
Create Lead
POST /leads

Create a new lead, the state of the lead and the pipeline stage will automatically set to ‘new’.

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

Title of the lead, titles must be unique across all leads

Example:
Watch It - new subscriptions lead (London)
queue_id
string required

The id of the queue assigned to the lead

Example:
da60dd8f-b124-439d-a7fe-e1bdbd484c71
description
string

A description of the lead.

Example:
The client has an existing software but is looking for a better solution due to expansion.
value
number

The potential value of the lead if it’s won, the value is always in the base currency of the system

Example:
10000
expected_close_date
integer epoch

The expected closing date for the lead

Example:
98765342
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
Examples

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The id of the lead created

Example:
8ade0c06-6ba3-4ed0-9e04-228201e1b30c
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/leads HTTP/1.1 

Content-Type: application/json

{
    "queue_id": "da60dd8f-b124-439d-a7fe-e1bdbd484c71",
    "title": "Watch It - new subscriptions lead (London)",
    "description": "The client has an existing software but is looking for a better solution due to expansion.",
    "value": 10000,
    "expected_close_date": 98765342,
    "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": "8ade0c06-6ba3-4ed0-9e04-228201e1b30c"
}
Update Lead
PUT /leads/{id}
  • Update basic information for a single lead
  • Transfer the lead to another queue and assign a new stage within the queue

Path variables

id
string required

The GUID of the lead to be updated

Example:
6f279898-d873-4175-941f-77eec76709c1

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

The unique title of the lead

Example:
Baker's Group of Companies - rewards lead
description
string

Brief description of the lead

Example:
The customer is keen to implement the rewards software in time for their opening.
contact_id
string GUID

The id of the contact linked to the Lead (optional)

Example:
ee814b4b-894d-4353-9a98-485f2b821ff8
value
number

The potential value of the lead if it’s won. Value is specified in the business’s base currency

Example:
10000
expected_close_date
integer epoch

The expected closing date for the lead.

Example:
98765342
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
queue
Object

Transfer the lead to another queue, and optionally select a new stage within the queue for the lead. NOT to be used for progressing the lead to another stage within the same queue.

id
string required

The new queue to transfer the lead to

Example:
2f7ab71a-c70e-4a92-ae6d-3d86091eedba
stage_id
string

The id of the stage in the new queue to be acquired by the lead, should only be used in conjunction with queue id. If not specified, then the lead moves into the first stage of the new queue.

Example:
ca6f8248-b0dc-4f58-b30b-babacc7533b8
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
Examples

Responses

200 OK
Body
Object
id
string GUID

Id of the lead updated

Example:
6f279898-d873-4175-941f-77eec76709c1
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/leads/6f279898-d873-4175-941f-77eec76709c1 HTTP/1.1 

Content-Type: application/json

{
    "title": "Baker's Group of Companies - rewards lead",
    "description": "The customer is keen to implement the rewards software in time for their opening.",
    "contact_id": "ee814b4b-894d-4353-9a98-485f2b821ff8",
    "value": 10000,
    "expected_close_date": 98765342,
    "assign_to": {
        "user_id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
        "team_id": "a43f08ca-998b-afbc-6ed4-c9dc2d136935"
    },
    "queue": {
        "id": "2f7ab71a-c70e-4a92-ae6d-3d86091eedba",
        "stage_id": "ca6f8248-b0dc-4f58-b30b-babacc7533b8"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "6f279898-d873-4175-941f-77eec76709c1"
}
Delete Lead
DELETE /leads/{id}

Delete a single lead, a lead can be deleted if it’s not in a ‘won’ or ‘lost’ state.

Path variables

id
string GUID required

The GUID of the lead to be deleted

Example:
4AD9C84FA60F9FE407140E20F707726A

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

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
DELETE https://sandbox.crm.com/backoffice/v2/leads/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1 

HTTP/1.1 204 No Content 
List Leads
GET /leads

Retrieve leads based on filtering parameters

Request parameters

page
integer optional

The page number that should be retrieved

Default:
1
size
integer optional

The size (total records) of each page

Default:
10
sort
string optional

Defines the attribute to be used for sorting the results

Enumeration:
TITLE
NAME
STAGE

Stage of the lead within the queue

CLOSE_DATE
OWNER
search_value
string optional

Search for a lead using Title, Organisation, Contact person’s name

Example:
Baker's Group of Companies
queue_id
string optional

The queue id (to view leads in this queue)

Example:
9959a75d-226f-4136-b68f-1318c0831808
stage_id
string GUID optional

The queue stage id (to view leads in this stage)

Example:
fb6be70f-6e34-47ae-b14a-d889514c9677
states
array of string optional

Filter leads based on lead state - comma separated (NEW, IN PROGRESS, WON, LOST)

Collection format: csv
expected_close_date
string optional

Filter based on the lead expected close date

Enumeration:
expected_close_date[gt]

Returns results where the expected close date is greater than this value

expected_close_date[gte]

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

expected_close_date[lt]

Returns results where the expected close date is less than this value

expected_close_date[lte]

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

is_overdue
boolean optional

Display those leads whose expected closing date has passed, but still have a status of NEW or IN PROGRESS.

Example:
true
contact_id
string optional

The id of the Contact associated to the Lead (if it exists)

Example:
3b4d6190-0c91-4788-839f-9c53c2eefc1a
tag_ids
array of string optional

The ids of the tags to filter by

Collection format: csv
include_tags
boolean optional

Defines whether tags should be retrieved or not

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
include_tags
boolean optional

Defines whether tags should be retrieved or not

Example:
false
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array
Object
id
string GUID

The lead unique identifier

Example:
9d1da6fc-e97c-4e1a-94e3-68ce1dafb899
title
string

The title of the lead

Example:
Burger Time Restaurants (chain)
state
string

The order life cycle state

Enumeration:
NEW
IN_PROGRESS
WON
LOST
queue
Object

Lead queue information

id
string GUID

Queue id

Example:
6f279898-d873-4175-941f-77eec76709c1
name
string

Queue name

Example:
New large-scale business rewards lead
stage
Object

Lead stage (within the queue) information

id
string GUID

Current stage id

Example:
43528b33-25a1-41b3-8629-431ca3fd58ec
name
string

Current stage name

Example:
Proposal submitted
colour
string

Stage colour hex code

Example:
#2c8ef8
description
string

A brief description of the lead

Example:
Interested in loyalty programs, group of companies
contact
Object

Details of the contact linked to the lead (if applicable)

id
string

The id of the Contact linked to the Lead

Example:
1fffae21-47ce-41b2-8de8-1be69c67fc89
code
string

The contact’s code

Example:
C0001234
name
string

The full name of the contact linked to the lead

Example:
John Smith
value
number

The potential value of the lead to the business (if it’s won)

currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
expected_close_date
integer epoch

The expected closing date of the lead

Example:
98765342
assigned_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
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/leads HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "9d1da6fc-e97c-4e1a-94e3-68ce1dafb899",
            "title": "Burger Time Restaurants (chain)",
            "state": "IN_PROGRESS",
            "queue": {
                "id": "6f279898-d873-4175-941f-77eec76709c1",
                "name": "New large-scale business rewards lead"
            },
            "stage": {
                "id": "43528b33-25a1-41b3-8629-431ca3fd58ec",
                "name": "Proposal submitted",
                "colour": "#2c8ef8"
            },
            "description": "Interested in loyalty programs, group of companies",
            "contact": {
                "id": "1fffae21-47ce-41b2-8de8-1be69c67fc89",
                "code": "C0001234",
                "name": "John Smith"
            },
            "value": 1,
            "currency_code": "EUR",
            "expected_close_date": 98765342,
            "assigned_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"
                }
            },
            "tags": {
                "id": "609a369e-3f10-492a-8332-679ecbe56b65",
                "name": "Maintenance",
                "colour": "FR547F"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Lead
GET /leads/{id}

Retrieve the information for a specific lead.

Path variables

id
string required

The lead identifier (GUID) of the lead to be retrieved

Example:
9d1da6fc-e97c-4e1a-94e3-68ce1dafb899

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 lead GUID

Example:
9d1da6fc-e97c-4e1a-94e3-68ce1dafb899
title
string

The title of the lead, mandatory and unique.

Example:
Burger Time Restaurants (chain)
state
string

The order life cycle state

Enumeration:
NEW
IN_PROGRESS
WON
LOST
queue
Object

Lead queue information

id
string GUID

Queue id

Example:
6f279898-d873-4175-941f-77eec76709c1
name
string

Queue name

Example:
New large-scale business rewards lead
stage
Object

Stage information within the queue

id
string GUID

Current stage id

Example:
43528b33-25a1-41b3-8629-431ca3fd58ec
name
string

Current stage name

Example:
In Negotiation
colour
string

Stage colour hex code

Example:
#2c8ef8
description
string

A brief description of the lead

Example:
Mitchell & Sons - group of companies
contact
Object

Details of the Contact linked to the Lead (if applicable)

id
string GUID

Contact id

Example:
c0295421-2de8-49c3-accf-6b9a86b903e1
code
string

Cotnact code

Example:
C00000123455
name
string

Contact full name

Example:
John Brown
value
number

The potential value of the lead if it’s won

Example:
15000
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
expected_close_date
integer epoch

The expected closing date of the lead

Example:
98765342
lost_reason
Object

Lost reason information (applicable if state = LOST)

id
string

Lost reason id

Example:
eba0a22c-adec-402c-be8e-f1d61e4f4bff
name
string

The reason for losing the lead

Example:
Lead has lost interest
assigned_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’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345
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/leads/9d1da6fc-e97c-4e1a-94e3-68ce1dafb899 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9d1da6fc-e97c-4e1a-94e3-68ce1dafb899",
    "title": "Burger Time Restaurants (chain)",
    "state": "WON",
    "queue": {
        "id": "6f279898-d873-4175-941f-77eec76709c1",
        "name": "New large-scale business rewards lead"
    },
    "stage": {
        "id": "43528b33-25a1-41b3-8629-431ca3fd58ec",
        "name": "In Negotiation",
        "colour": "#2c8ef8"
    },
    "description": "Mitchell & Sons - group of companies",
    "contact": {
        "id": "c0295421-2de8-49c3-accf-6b9a86b903e1",
        "code": "C00000123455",
        "name": "John Brown"
    },
    "value": 15000,
    "currency_code": "EUR",
    "expected_close_date": 98765342,
    "lost_reason": {
        "id": "eba0a22c-adec-402c-be8e-f1d61e4f4bff",
        "name": "Lead has lost interest"
    },
    "assigned_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": "0001-12345"
        }
    ]
}
List Lead Queue Stages
GET /leads/{id}/queues/stages

Retrieve all the queue stages that a specific lead has progressed through until now.

Path variables

id
string required

The GUID of the lead whose queue stages will be retrieved

Example:
1fda2322-ed57-4f2b-93e2-9198eebcea07

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

History of lead stages progression

Object
id
string

Queue stage id

Example:
2eb909cf-2467-4827-81ca-498ad4b2421f
name
string

Stage name

Example:
Proposal Submitted
date
integer epoch

Date of achieving this stage

Example:
98765342
colour
string

Stage colour hex code

Example:
#2c8ef8
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/leads/1fda2322-ed57-4f2b-93e2-9198eebcea07/queues/stages HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "2eb909cf-2467-4827-81ca-498ad4b2421f",
            "name": "Proposal Submitted",
            "date": 98765342,
            "colour": "#2c8ef8"
        }
    ]
}
Lead Actions
POST /leads/{id}/actions

Action a lead by:

  • changing the state of a lead (e.g. from ‘in progress’ to ‘won’)
  • changing the queue stage of a lead (e.g. progress a lead to the next stage in the queue).
  • merging two leads into one, any data not available on the lead to be kept will be copied from the source lead (specified in the body)

Path variables

id
string required

The GUID of the lead for which an action will be taken against, must be one of the following:

  • id of the lead whose state will be changed
  • id of the lead whose queue stage will be changed
  • id of the lead to be kept when merged
Example:
6f279898-d873-4175-941f-77eec76709c1

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

Action to be performed

Enumeration:
START_PROGRESS

Change the lead state to In Progress (from New)

WON

Change the lead state to Won

LOST

Change the lead state to Lost

PROGRESS

Progress/regress a lead to another stage in the queue

MERGE

Merge two leads into one

Example:
START_PROGRESS
lost_reason_id
string GUID

Id of the lost reason, optional and applicable only if action = LOST (i.e. the state of the lead becomes 'Lost)

Example:
1fda2322-ed57-4f2b-93e2-9198eebcea07
stage_id
string GUID

The new queue stage id, applicable and required if action = PROGRESS

Example:
6f279898-d873-4175-941f-77eec76709c1
source_id
string GUID

The id of the lead to be merged (with the lead id specified in path variables) and then deleted. Applicable and required if action = MERGE

Example:
54166dd3-cd16-49a6-be97-559aac425914
Examples

Responses

200 OK
Body
Object
id
string

The GUID of the lead for which an action was taken

Example:
6f279898-d873-4175-941f-77eec76709c1
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
Example 2
Example 3
Example 4

Changing the lead state

POST https://sandbox.crm.com/backoffice/v2/leads/6f279898-d873-4175-941f-77eec76709c1/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "LOST",
    "lost_reason_id": "1fda2322-ed57-4f2b-93e2-9198eebcea07"
}

Progressing the lead to another stage in the queue

POST https://sandbox.crm.com/backoffice/v2/leads/6f279898-d873-4175-941f-77eec76709c1/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "PROGRESS",
    "stage_id": "6f279898-d873-4175-941f-77eec76709c1"
}

Merging two leads into one

POST https://sandbox.crm.com/backoffice/v2/leads/6f279898-d873-4175-941f-77eec76709c1/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "MERGE",
    "source_id": "54166dd3-cd16-49a6-be97-559aac425914"
}

Changing the lead queue and assigning a new stage

POST https://sandbox.crm.com/backoffice/v2/leads/6f279898-d873-4175-941f-77eec76709c1/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "QUEUE",
    "queue": {
        "id": "e18ee2bc-c6f3-49e1-8e05-763386378017",
        "stage_id": "78b79217-0c14-4285-9c7b-e1701d31f18c"
    }
}
Bulk Update Leads
POST /leads/bulk

Change the lead queue stage, the assignee, expected close date for one or more leads that have been selected as part of a bulk update action. The request must include at least one of these three attributes to be updated in bulk mode.

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
leads
Array GUID

Selected leads for bullk update

Object
id
string

A list of lead unique ids to be updated

Example:
6f279898-d873-4175-941f-77eec76709c1
stage_id
string GUID nullable

The new queue stage id (optional)

Example:
c8079ee1-8081-4be1-ab09-5091f55b2d4e
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
expected_close_date
integer epoch nullable

The new expected close date (optional)

Example:
98765342
Examples

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The 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/leads/bulk HTTP/1.1 

Content-Type: application/json

{
    "leads": [
        {
            "id": "6f279898-d873-4175-941f-77eec76709c1"
        }
    ],
    "stage_id": "c8079ee1-8081-4be1-ab09-5091f55b2d4e",
    "assign_to": {
        "user_id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
        "team_id": "a43f08ca-998b-afbc-6ed4-c9dc2d136935"
    },
    "expected_close_date": 98765342
}

HTTP/1.1 200 OK 
Lead Notes

Notes for internal use only can be added to a lead. Notes can be pinned to always appear at the top of the list.

POST /leads/{id}/notes
PUT /leads/{id}/notes/{note_id}
DELETE /leads/{id}/notes/{note_id}
GET /leads/{id}/notes
Create Lead Note
POST /leads/{id}/notes

Create a new note for a lead

Path variables

id
string required

Lead GUID for which the note is to be created

Example:
8ade0c06-6ba3-4ed0-9e04-228201e1b30c

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

The note contents

Example:
After my telephone conversation with Zack this morning, it was decided that....
pinned
boolean

Pinned notes appear at the top of the notes list. True = pin note, false = don’t pin note

Example:
true
Examples

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The identifier for the note created

Example:
1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf
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/leads/8ade0c06-6ba3-4ed0-9e04-228201e1b30c/notes HTTP/1.1 

Content-Type: application/json

{
    "note": "After my telephone conversation with Zack this morning, it was decided that....",
    "pinned": true
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf"
}
Update Lead Note
PUT /leads/{id}/notes/{note_id}

Update a note for a lead. Only the user who created the note can edit it.

Path variables

id
string required

The lead GUID

Example:
8ade0c06-6ba3-4ed0-9e04-228201e1b30c
note_id
string required

The note GUID

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

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
note
string

The actual note contents

Example:
After my telephone conversation with Zack this morning, it was decided that....
pinned
boolean

Pinned notes appear at the top of the notes list.

Example:
true
Examples

Responses

200 OK
Body
Object
id
string

The GUID of the updated note

Example:
1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf
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
PUT https://sandbox.crm.com/backoffice/v2/leads/8ade0c06-6ba3-4ed0-9e04-228201e1b30c/notes/1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf HTTP/1.1 

Content-Type: application/json

{
    "note": "After my telephone conversation with Zack this morning, it was decided that....",
    "pinned": true
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf"
}
Delete Lead Note
DELETE /leads/{id}/notes/{note_id}

Delete a single note for a lead. Only the user who created the note can delete it.

Path variables

id
string GUID required

The GUID of the lead

Example:
8ade0c06-6ba3-4ed0-9e04-228201e1b30c
note_id
string required

The GUID of the note to be deleted

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

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

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/leads/8ade0c06-6ba3-4ed0-9e04-228201e1b30c/notes/1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf HTTP/1.1 

HTTP/1.1 204 No Content 
List Lead Notes
GET /leads/{id}/notes

Retrieve all notes for a single lead.

Path variables

id
string required

The GUID of the lead whose notes are to be retrieved

Example:
8ade0c06-6ba3-4ed0-9e04-228201e1b30c

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 200

Successful Request

Body
Object
content
Array
Object
id
string GUID

The note unique identifier

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

The note contents

Example:
After my telephone conversation with Zack this morning, it was decided that....
created_by
Object

Details of the user who created the note

id
string

The GUID of the user who created the note

Example:
c8079ee1-8081-4be1-ab09-5091f55b2d4e
username
string

The name of the user who created the note

Example:
Sam Jackson
created_on
string epoch

Date and time the note was created

Example:
9876577501
updated_on
string epoch

Date and time the note was updated

Example:
9876579547
pinned
boolean

Is note pinned so that it appears at the top of the notes list?

Example:
true
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/leads/8ade0c06-6ba3-4ed0-9e04-228201e1b30c/notes HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
            "note": "After my telephone conversation with Zack this morning, it was decided that....",
            "created_by": {
                "id": "c8079ee1-8081-4be1-ab09-5091f55b2d4e",
                "username": "Sam Jackson"
            },
            "created_on": "9876577501",
            "updated_on": "9876579547",
            "pinned": "true"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Lead Tags

Add one or more tags to leads to be used for filtering purposes.

PUT /leads/{id}/tags
GET /leads/{id}/tags
Update Lead Tags
PUT /leads/{id}/tags

Update the tags associated with the lead

Path variables

id
string GUID required

The lead (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 lead 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/leads/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 Lead tags
GET /leads/{id}/tags

Retrieve a list of tags that are associated with the lead

Path variables

id
string GUID required

The lead (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/leads/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"
        }
    ]
}
Attachment Files

Upload files related to a Lead for easy referencing. Acceptable file types include: .png, .doc, .docx, .jpeg, .jpg, .pdf, .json, .log, .svg, .eml, . xls, .xslx, .msg, .txt, .csv. Maximum file size is 4GB.

POST /leads/{id}/attachments
DELETE /leads/{id}/attachments/{file_id}
GET /leads/{id}/attachments
Add Lead Attachment
POST /leads/{id}/attachments

Connect an uploaded attachment to an existing lead using the file id or url

Path variables

id
string GUID required

The lead (identifier) to which the file will be attached

Example:
66451204-4404-894c-4dc6-486c540ece40

Notes

FILE UPLOAD FLOW

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

  1. Upload File Signature
  2. Connect a file to a Service Request

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 nullable

The uploaded file signature (identifier) to be attached (file or link should be provided)

Example:
60556f0c-1c94-45b5-01b8-4dc7fa72001a
link
string required nullable

The URL endpoint to be attached (file or link should be provided)

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
description
string nullable

The file description

Example:
contact screenshot

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The attachment identifier

Example:
66451204-4404-894c-4dc6-486c540ece40
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/leads/66451204-4404-894c-4dc6-486c540ece40/files HTTP/1.1 

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

{
    "file_id": "30526723-24a3-e4e3-1a75-b26b1b41f05c",
    "url": "https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug",
    "description": "PowerPoint demo"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "66451204-4404-894c-4dc6-486c540ece40"
}
Delete Lead Attachment
DELETE /leads/{id}/attachments/{file_id}

Delete an attachment from a lead

Path variables

id
string GUID required

The lead (identifier) from which the attachment will be deleted

Example:
66451204-4404-894c-4dc6-486c540ece40
file_id
string GUID required

The attachment (identifier) to be deleted

Example:
04c0bebd-8bb0-0b3e-e1a6-716a0fd200b1

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/leads/66451204-4404-894c-4dc6-486c540ece40/files/04c0bebd-8bb0-0b3e-e1a6-716a0fd200b1 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Lead Attachments
GET /leads/{id}/attachments

Retrieve all attachment files for a specific lead

Path variables

id
string GUID required

The lead (identifier) for which files will be retrieved

Example:
66451204-4404-894c-4dc6-486c540ece40

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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The attachement identifier

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

The attachement description

Example:
Screenshot sent by customer
file
Object

The attached file

id
string GUID

The attached file identifier

Example:
0317868f-28f8-9f56-d248-5a78718b38cc
url
string

The attached file URL endpoint

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
name
string

The attached file name

Example:
img.png
mime
string

The mime type of the uploaded file

Enumeration:
csv
doc
docx
xls
xlsx
pdf
log
txt
png
jpg
jpeg
svg
link
string

The attached URL endpoint

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
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/leads/66451204-4404-894c-4dc6-486c540ece40/files HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "3ae9d64a-8a3b-f1e1-eed6-05b307f926fb",
            "mime": "docx",
            "description": "Screenshot sent by customer",
            "file": {
                "id": "0317868f-28f8-9f56-d248-5a78718b38cc",
                "url": "https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug",
                "name": "img.png"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Orders
POST /orders
PUT /orders/{id}
DELETE /orders/{id}
GET /orders
GET /orders/{id}
PUT /orders/{id}/actions
Make an Order
POST /orders

Creates a new Order for a contact or organisation(merchant or service provider). An Order can be placed only after an Order estimation. The estimatetion’s identifier is the basic input for this Web API since it includes the order’s details such as the ordered items, so it’s required to call POST /estimates/orders in advance to retrieve the order’s estimation_id.

Notes

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

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
estimation_id
string GUID required

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

Example:
37b56acf-665c-1112-93fc-163b3639bcbe
payments
Array

List of payments to pay off the order. An order might be paid off using multiple payments; one payment using a contact payment method or an offiline payment method type and a second payment when contacts want to partially pay their orders using CRM Wallet funds.

Object
amount
number required

The payment’s amount. If set to an amount less than th eorder’s total cost, then this implies that account funds will be used to pay off the order.

Example:
12.21
payment_method
Object
type
string required

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
id
string nullable

The unique identifier of the contac’ts payment method. Applicable and required when the select payment method type is either a Card, an Account Debit or a Wallet.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
notes
string nullable

The order general notes

Example:
Lorem Ipsum
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
devices
Array

A list of devices unique identifiers. Applicable when order includes traceable physical goods.

Unique items: YES
Example:
[
    "37b56acf-665c-1112-93fc-163b3639bcbe"
]
string
Example:
37b56acf-665c-1112-93fc-163b3639bcbe

Responses

201 201

Created

Body
Object
id
string GUID

The unique identifier of the new order

Example:
f3076649-5350-4215-9278-ba95452a72f7
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/orders HTTP/1.1 

Content-Type: application/json

{
    "estimation_id": "37b56acf-665c-1112-93fc-163b3639bcbe",
    "payments": [
        {
            "amount": 12.21,
            "payment_method": {
                "type": "CARD",
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
            }
        } 
    ],
    "notes": "Lorem Ipsum",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "devices": [
        "37b56acf-665c-1112-93fc-163b3639bcbe"
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "f3076649-5350-4215-9278-ba95452a72f7"
}
Update Order
PUT /orders/{id}

Updates an existing Order. Cancelled and Completed Orders cannot be updated.

Path variables

id
string GUID required

The order identifier that will be updated

Example:
f3076649-5350-4215-9278-ba95452a72f7

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
notes
string

Order notes

Example:
Lorem Ipsum
category_id
string GUID

Order category

Example:
f3076649-5350-4215-9278-ba95452a72f7
external_reference
string

A reference provided by external systems

Example:
REF1234
payment_method
Object
type
string required

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
id
string nullable

The unique identifier of the contac’ts payment method. Applicable and required when the select payment method type is either a Card, an Account Debit or a Wallet.

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

The updated stage of the Order. The updated stage must be one of the Order Queue’s stages. The new stage must be the next in lines compared to the current stage of the Order.

id
string required

Stage identifier.

Example:
f3076649-5350-4215-9278-ba95452a72f7
comment
string

The comment inserted when a new stage is achieved.

address
Object

The new address related to the Order. The address can only be changed for Delivery Orders.

id
string required nullable

One of the contact’s addresses at which the Order will be delivered to. Either a contact address on a one-off address can be specified

Example:
f3076649-5350-4215-9278-ba95452a72f7
other
Object nullable

The locastion at which the Order will be delivered. This is an one-off delivery address, not registere din CRM.COM but is speicifed manually be the contact on ordering. Either a contact address or a one-off address can be specified per Web API call.

address_line_1
string required

Address Line 1

Example:
Ydras 34
address_line_2
string

Address Line 2

Example:
Chaidari
state_province_country
string

State/Province/State

Example:
Attica
town_city
string

Town/City

Example:
Athens
postal_code
string required

Postal Code

Example:
1026
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
lat
string

Latitude

lon
string

Longitude

google_place_id
string

Gougle Place ID

discount
Object

Ad-hoc discount provided to Orders on their total cost.

type
string required

Determines if the discount is an amount or a percentage

Enumeration:
AMOUNT
PERCENTAGE
Example:
AMOUNT
amount
number required

The discount’s amount

Example:
1.99
items
Array

List of ordered items. At least one is included in Orders

Object
product_id
string GUID

Ordered product’s unique identifier. All products apart from Modifiers can be included in an Order.

Example:
f3076649-5350-4215-9278-ba95452a72f7
quantity
integer

Quantity of purchased items

Example:
1
notes
string

Order item’s notes

Example:
Lorem Ipsum
components
Array

List of produt components. Applicable only if the ordered item is a flexible bundle

Object
product_id
string GUID

Component product’s unique identifier

Example:
f3076649-5350-4215-9278-ba95452a72f7
quantity
integer

Component product quantity

Example:
2
milestones
Array

Order milestones can be updated on conditions. Milestones already reached or milestones for the order’s previous stages cannot be modified. New milestones for upcoming stages can be added and existing ones can be removed. The total amount among all milestones cannot be greater than the order’s total cost.

Object
id
string

Order milestone identifier

Example:
f3076649-5350-4215-9278-ba95452a72f7
stage_id
string

The milestone’s stage. Only stages with milestone setting sin the Order’s queue can be specified.

Example:
f3076649-5350-4215-9278-ba95452a72f7
percentage
number

Set a new milestone percentage.

Example:
5.5
amount
string

Set an updated milestone amount. This amount cannot be greater than the order’s cost

Example:
9.99
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
Examples

Responses

200 OK
Body
Object
id
string GUID

The order identifier

Example:
f3076649-5350-4215-9278-ba95452a72f7
approval_requests
Array

Determines whether approval reuqests are applied or not, if not null an approval is requested

Object
id
string GUID

The apporval request identifier

Example:
3a4aad81-e5c2-72b7-3a86-903239d08767
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/orders/f3076649-5350-4215-9278-ba95452a72f7 HTTP/1.1 

Content-Type: application/json

{
    "notes": "Lorem Ipsum",
    "category_id": "f3076649-5350-4215-9278-ba95452a72f7",
    "external_reference": "REF1234",
    "payment_method": {
        "type": "CARD",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "stage": {
        "id": "f3076649-5350-4215-9278-ba95452a72f7",
        "comment": ""
    },
    "address": {
        "id": "f3076649-5350-4215-9278-ba95452a72f7",
        "other": {
            "address_line_1": "Ydras 34",
            "address_line_2": "Chaidari",
            "state_province_country": "Attica",
            "town_city": "Athens",
            "postal_code": "1026",
            "country_code": "CYP",
            "lat": "",
            "lon": "",
            "google_place_id": ""
        }
    },
    "discount": {
        "type": "AMOUNT",
        "amount": 1.99
    },
    "items": [
        {
            "product_id": "f3076649-5350-4215-9278-ba95452a72f7",
            "quantity": 1,
            "notes": "Lorem Ipsum",
            "components": [
                {
                    "product_id": "f3076649-5350-4215-9278-ba95452a72f7",
                    "quantity": 2
                }
            ]
        }
    ],
    "milestones": [
        {
            "id": "f3076649-5350-4215-9278-ba95452a72f7",
            "stage_id": "f3076649-5350-4215-9278-ba95452a72f7",
            "percentage": 5.5,
            "amount": "9.99"
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "f3076649-5350-4215-9278-ba95452a72f7",
    "approval_requests": [
        {
            "id": "3a4aad81-e5c2-72b7-3a86-903239d08767"
        }
    ]
}
Delete Order
DELETE /orders/{id}

Deletes an Order. A single order is deleted per Web API call. Cancelled and Completed Orders cannot be deleted. An Order can be deleted if:

  • No items were dispatched to the contact
  • No Invoicing was performed.
  • Has not reached its Point of No Return (if any)

Path variables

id
string GUID required

The order identifier that will be deleted

Example:
f3076649-5350-4215-9278-ba95452a72f7

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/orders/f3076649-5350-4215-9278-ba95452a72f7 HTTP/1.1 

HTTP/1.1 204 No Content 
List Orders
GET /orders

Retrieve a list of orders based on search criteria (e.g. today’s new orders). Multiple Orders of different contacts/organisations can be retrieved.

Request parameters

account_id
string optional

The account agianst which Order was placed

Example:
9547012f-8d1a-3ec9-d3f5-2ba48788424c
contact_id
string GUID optional

Filters orders based on the contact that placed such orders

Example:
8b069359-3e76-e036-1d78-46a683620998
organisation_id
string optional

The organisation that placed the order

supply_method
string optional

Defines how order was/will be provided

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
state
array of Order State (enum) optional

Fitlers based on the order state

Collection format: csv
Unique items: YES
Example:
NEW
is_favorite
boolean optional

Filters orders based on whether are marked as favorite or not

Example:
true
created_on
string optional

Filters orders based on created date

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

fulfilled_by
string GUID optional

Filter orders based on the organisation that will fulfill such orders

Example:
9547012f-8d1a-3ec9-d3f5-2ba48788424c
fulfilled_by_tap_code
string optional

Filter orders based on the organisation’s tap code that will fulfill such orders (tap should be active)

Example:
TAP-001
include_address
boolean optional

Detemrines if the address will be returned or not

Default:
false
order_country
string optional

The country (code) in which the order was fulfilled by

Example:
CYP
queue_id
string optional

The order queue

Example:
9547012f-8d1a-3ec9-d3f5-2ba48788424c
stage_id
string optional

The status of the order

Example:
9547012f-8d1a-3ec9-d3f5-2ba48788424c
ponr_reached
boolean optional

Point of no return reached

Example:
true
custom_fields
string optional

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

Example:
key;value
search_value
string optional

Search for orders based on their number and contact name

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
include_approvals
boolean optional

Defines whether approval requests information should be retrieved or not

Example:
true
approval_state
string optional

Filter based on approval state

Enumeration:
PENDING
APPROVED
REJECTED
cancelled_on
string optional

The date on which an Order was cancelled.

Enumeration:
cancelled_on[gt]

Returns results where the date is greater than this value

cancelled_on[gte]

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

cancelled_on[lt]

Returns results where the date is less than this value

cancelled_on[lte]

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

completed_on
string optional

The date on which Orders were completed.

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

started_on
string optional

The date on which the Order’s processing started (went into In Progress state)

Enumeration:
started_on[gt]

Returns results where the date is greater than this value

started_on[gte]

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

started_on[lt]

Returns results where the date is less than this value

started_on[lte]

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

address
string optional

Search for an Order using its delivery address

Example:
Main street 34
address_name
string optional

Search for an order using the delivery address’s name

Example:
Main Store

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 GUID

The order identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
number
string

The order number

Example:
O11101
external_reference
string

A reference identifier (usually an id) provided by an external system that provisioned this order

Example:
23434232345
queue
Object

Details pertaining to the queue

id
string

Queue identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
name
string

Queue name

Example:
Installation process
stage
Object

The Order’s current stage

id
string

Stage identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
name
string

Stage name

Example:
In progress
colour
string

stage colour

state
string

The order life cycle state

Enumeration:
NEW
IN_PROGRESS
COMPLETED
CANCELLED
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
notes
string

The order general notes

Example:
Lorem Ipsum
milestones
integer

Number of milestones

Example:
1
number_of_items
integer

The number of items included in the Order

Example:
1
ponr_reached
boolean

Defines whether the point of no return has been reached or not

Example:
true
total
number

The total cost of all order items. The cost equals to the total cost of the order’s invoice, taxes and discounts included

Example:
9.99
sub_total
number

The order’s total amount before applying the discount. Includes the tax amount

Example:
11.99
wallet_funds
number

The amount that was used from wallet funds

Example:
1.59
amount_due
number

The Order’s amount due i.e. how much the contact/organisations needs to pay in order to fully pay off the order’s cost (order total minus any payments already posted for the order, if any)

Example:
8.4
discount
Object

Total discount amount provided to the ordered items. Ad-hoc discount provided in placing the Order is included

amount
number

Total discount amount excluding taxes. This amount equals to the sum of all discount amounts among all invoiced items. Note that this amount does not include the taxed amount.

Example:
1.99
amount_incl_tax
number

The total discount amount including taxes

Example:
2.99
currency_code
string

The Order’s currency

Example:
EUR
contact
Object

Contact who placed the Order

id
string GUID

The contact identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
code
string

The contact code

Example:
C0001
name
string

The contact name

Example:
John Doe
organisation
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
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
category
Object

Details about the event classification

id
string GUID

The category identifier

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

The category name

Example:
Delivery Purchase
cancellation_reason
Object

Details about the reason that cancelled the order

id
string GUID

The cancellation reason identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
name
string

The cvancellation reason

Example:
Void by customer
fulfilled_by
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
key_dates
Object
submitted_on
integer

Submitted date

Example:
1592809457
completed_on
integer

Completion date

Example:
1592809457
cancelled_on
integer

Cancellation date

Example:
1592809457
estimated_fulfillment
Object

When the order is estimated to be fulfilled

duration
string

How much time to fufill

Example:
30
uot
string

Unit of time to fulfilled time

Enumeration:
MINUTES
HOURS
DAYS
WEEKS
MONTHS
Example:
MINUTES
date
string

The actual date on which the order will be fulfilled

Example:
1649337036
started_on
integer epoch

Date when the Order’s processing started

Example:
1649337036
requested_date
integer epoch

Date on which the cotact requested for the order to be actually delivered

Example:
1649337036
available_for_printing
boolean

Defines whether the orders are configured to be printed

Example:
true
is_printed
boolean

Defines whether the order has been printed successfully

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

Details about order provision

available_for_provision
boolean

Defines whether the order is configured to be provisioned

Example:
true
is_provisioned
boolean

Defines whether the order has been provisioned successfully (applicable only if the order is available for provision)

Example:
false
provisioner
string

Defines the integration on which the order has been provisioned (applicable only if the order is available for provision)

Enumeration:
TWINSOFT
ALOHA
approvals
Object

Details about the application

state
string

The approval request state

Enumeration:
PENDING
APPROVED
REJECTED
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/orders HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "997f1287-3d83-827a-7199-e5df2c0e4e67",
            "number": "O11101",
            "external_reference": "23434232345",
            "queue": {
                "id": "997f1287-3d83-827a-7199-e5df2c0e4e67",
                "name": "Installation process"
            },
            "stage": {
                "id": "997f1287-3d83-827a-7199-e5df2c0e4e67",
                "name": "In progress",
                "colour": ""
            },
            "state": "NEW",
            "supply_method": "DELIVERY",
            "notes": "Lorem Ipsum",
            "milestones": 1,
            "number_of_items": 1,
            "ponr_reached": true,
            "total": 9.99,
            "sub_total": 11.99,
            "wallet_funds": 1.59,
            "amount_due": 8.4,
            "discount": {
                "amount": 1.99,
                "amount_incl_tax": 2.99
            },
            "currency_code": "EUR",
            "contact": {
                "id": "997f1287-3d83-827a-7199-e5df2c0e4e67",
                "code": "C0001",
                "name": "John Doe"
            },
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "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"
            },
            "category": {
                "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
                "name": "Delivery Purchase"
            },
            "cancellation_reason": {
                "id": "997f1287-3d83-827a-7199-e5df2c0e4e67",
                "name": "Void by customer"
            },
            "fulfilled_by": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "key_dates": {
                "submitted_on": 1592809457,
                "completed_on": 1592809457,
                "cancelled_on": 1592809457,
                "estimated_fulfillment": {
                    "duration": "30",
                    "uot": "MINUTES",
                    "date": "1649337036"
                },
                "started_on": 1649337036,
                "requested_date": 1649337036
            },
            "available_for_printing": "true",
            "is_printed": "true",
            "custom_fields": [
                {
                    "key": "back_office",
                    "value": "0001-12345"
                }
            ],
            "order_provision": {
                "available_for_provision": "true",
                "is_provisioned": "false",
                "provisioner": "TWINSOFT"
            },
            "approvals": {
                "state": "PENDING"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Order
GET /orders/{id}

Retrieves detailed information of an Order. A single Order is retrieved per Web API call

Path variables

id
string GUID required

The order (identifier) that will be retrieved

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67

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

Unique identifier of the Order

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
number
string

Order number

Example:
ORDER1234
external_reference
string

Order external reference as this was set by 3rd party systems

Example:
REF1234
state
string

The order life cycle state

Enumeration:
NEW
IN_PROGRESS
COMPLETED
CANCELLED
notes
string

Order notes

Example:
Lorem Ipsum
number_of_milestones
integer

Number of milestones planed for the Order

Example:
1
number_of_items
integer

Number of ordered items

Example:
6
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
total
number

The total cost of the order, i.e. how much the contact needs to pay

Example:
5.99
sub_total
number

The order’s total cost before applying any discounts.

Example:
11.99
wallet_funds
number

Wallet funds used to pay off the order

Example:
1.98
amount_due
number

Amount due to be paid in order to fully pay off the order.

Example:
3.01
discount
Object

Total discount applied to the order via Promotions and ad-hoc discount

amount
number

Discount excuding taxed amount

Example:
0.96
amount_incl_tax
number

Discount including tax

Example:
0.98
ad_hoc_discount
Object

Ad hoc discount applied

type
string

Discount type

Enumeration:
AMOUNT
PERCENTAGE
Example:
AMOUNT
amount
number

Discount amount

Example:
9.99
currency_code
string
Example:
EUR
payment_info
string

The type of the event

Enumeration:
NOT PAID - TO BE PAID IN CASH

No wallet funds used

PAID BY CARD *******&lt;last_4_card_digits>

No wallet funds used

FAILED TO BE PAID BY CARD

No wallet funds used

PARTIALLY PAID WITH WALLET FUNDS. AMOUNT DUE TO BE PAID IN CASH

Partially paid using wallet funds and another payment method

PARTIALLY PAID WITH WALLET FUNDS. AMOUNT DUE PAID BY CARD *******&lt;last_4_card_digits>

Partially paid using wallet funds and another payment method

FULLY PAID WITH WALLET FUNDS

Fully paid using wallet funds

Example:
NOT PAID - TO BE PAID IN CASH
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
is_favorite
boolean

ORder is the cotnact’s favourite or not

Example:
true
contact
Object

Contact that placed the Order. An order is placed for either a cotnact or an organisation

id
string

Contact unique identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
code
string

Contact code

Example:
1234
name
string

Contact full name

Example:
John Doe
email_address
string

Email address

Example:
sue@mymail.com
phone_number
string

Contact phone

Example:
0035799454543
country_code
string

Country of contact

Example:
CYP
organisation
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
queue
Object

Order queue

id
string

Queue unique identifier

Example:
4248fab3-67d5-2eb1-eaf6-079ce18cd2ed
name
string

Queue name

Example:
Ordering flow
stages
Array

List of Order queue stages through which the order has already been through

Object
id
string

Stage unique identifier

Example:
4248fab3-67d5-2eb1-eaf6-079ce18cd2ed
name
string

Stage name

Example:
New
date_achieved
integer

Date on which order updated into the stage

Example:
1649337035
colour
string

Stage colour

point_of_no_return
boolean

Defines if the stage is considered as the Point of no return (if any was set in the Queue)

Example:
true
comment
string

Comment specified when the order progressed into this stage

Example:
Contact delivery confirmation
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
category
Object

Details about the event classification

id
string GUID

The category identifier

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

The category name

Example:
Delivery Purchase
cancellation_reason
Object

Details about the reason that cancelled the order

id
string GUID

The cancellation reason identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
name
string

The cvancellation reason

Example:
Void by customer
fulfilled_by
Object

The Organisation that fulfills the order

id
string

Unique identifier of the organisation

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
name
string

Organisation name

Example:
Good Burgers
phone
string

Organisation phone number

Example:
0035799454532
address
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
key_dates
Object
submitted_on
integer

Submitted date

Example:
1592809457
completed_on
integer

Completion date

Example:
1592809457
cancelled_on
integer

Cancellation date

Example:
1592809457
estimated_fulfillment
Object

When the order is estimated to be fulfilled

duration
string

How much time to fufill

Example:
30
uot
string

Unit of time to fulfilled time

Enumeration:
MINUTES
HOURS
DAYS
WEEKS
MONTHS
Example:
MINUTES
date
string

The actual date on which the order will be fulfilled

Example:
1649337036
started_on
integer epoch

Date when the Order’s processing started

Example:
1649337036
requested_date
integer epoch

Date on which the cotact requested for the order to be actually delivered

Example:
1649337036
available_for_printing
boolean

Order can be printed

Example:
true
is_printed
boolean

Printed or not

Example:
true
order_provision
Object

Details about order provision

available_for_provision
boolean

Defines whether the order is configured to be provisioned

Example:
true
is_provisioned
boolean

Defines whether the order has been provisioned successfully (applicable only if the order is available for provision)

Example:
false
provisioner
string

Defines the integration on which the order has been provisioned (applicable only if the order is available for provision)

Enumeration:
TWINSOFT
ALOHA
items
Array

List of ordered items. At least one is included

Object
id
string

Order item unique identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
notes
string

Order item notes

Example:
Lorem Ipsum
quantity
integer

How many items were ordered

Example:
10
dispatched
string

How many items have been dispatched. Applicable ofor stockable products

Example:
5
invoiced
string

How many items have been invoiced so far.Number of invoiced items cannot exceed the number of dispatched items.

Example:
2
price
number

The product’s price

Example:
1.7
tax
number

Order item’s taxed amount

Example:
0.45
discount
Object

Applied discounton the ordered item

amount
number

Applied discount excluding taxed amount

Example:
0.99
amount_incl_tax
number

Applied discount including taxed amount

Example:
0.89
percentage
number

Applied discount percentage

Example:
1.5
sub_total
number

Order item’s total before applying discount

Example:
1.99
total
number

Order item’s total amount

Example:
3.4
product
Object

Product that was ordered

id
string

Product unique identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
sku
string

Product SKU

Example:
SKU1234
name
string

Product name

Example:
Iced Latte
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
composition
Object
item_type
string
Enumeration:
PRODUCT
TYPE
FAMILY
CATEGORY
COMPONENT_SET
Default:
PRODUCT
item_id
string

The unique identifier of the component’s entity (e.g. the product or product type identifier) as this is specified in “item_type”

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

Defines whether the component is mandatory or not. When mandatory, then the contact always gets the component by default on ordering it and there’s no option to remove it.

Default:
false
Example:
true
priority
integer

Priority shows the ordering of the components in UI/apps/portals for usability purposes

Example:
1
minimum_quantity
integer

Applicable for components that include more than one products like product types. It shows the minimum required number of items that must to be selected to be included in the product being ordered. Minimum quantity cannot be greater than the maximum allowed quantity

Example:
1
maximum_quantity
integer

Applicable for components that include more than one products like product types. It shows the maximum allowed number of items that must to be selected to be included in the product being ordered. Maximum quantity cannot be less than the minimum quantity

Example:
3
price_inclusive
boolean

When set to “true”, it shows that the item’s price is included within the bundle’s price. Therefore, cotnacts will not have to pay anything if included in the order and despite the fact that the item itself has its own price.

Example:
true
modifier_product_id
string

The product identifier of the product that is set as default modifier. Only products marked as modifiers can be set. Applicable only for item types that denote a group of products (like the product type or component set) and as long as within that group, there’s one or more products marked as “modifiers”. The default modifier must be one of these products. Use this setting to easily present to contacts a default option during th eordering flow.

Example:
56786309-7a21-8097-e107-6e9aec401840
is_stockable
boolean

Determines if the product is stockable or not

Example:
true
tags
Array

List of produc tags

Object
id
string

Tag unique identifier

Example:
80362b63-a576-3540-586b-0dc1f3ab3bfd
name
string

Tag name

Example:
Coffees
colour
string

Tag colour

components
Array

List of components/modifiers of the ordered product. Applicable for bundle and composite products. In these cases, at least one component was included on ordering the product

Object
id
string

Product unique identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
sku
string

Product SKU

Example:
B1234
name
string

Product name

Example:
Brown Sugar
quantity
integer

Ordered quantity

Example:
1
price
number

Product’s price

Example:
0.5
net
number

Ordered item’s net amount

Example:
1.55
tax
number

Taxed amount

Example:
0.15
discount
number

Applied discount

Example:
0.25
total
number

Order item’s total amount

Example:
1.45
tags
Array

List of product tags

Object
id
string

Tag unique identifier

Example:
9c134cf3-c274-ee73-4921-01fb34033d4c
name
string

Tag name

Example:
Condiment
colour
string

Tag colour

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
milestoness
Array

The Order’s milestones

Object
id
string

Order Milestone identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
amount
number

The order milestone’s actual amount to be invoiced. Each order milestone either has a percentage or a specific amount to be invoiced

Example:
9.99
percentage
number

The order milestone percentage. Each order milestone either has a percentage or a specific amount to be invoiced

Example:
5.5
date_achieved
integer

Date on which the milestone was achieved which is also the date on which the Orde rmodes to the milestone’s stage

Example:
1649337036
stage
Object

On reaching this stage, the milestone invoice was/will be issued automatically

id
string

Stage identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
name
string

Stage name

Example:
Approved
invoice
Object

Milestone Invoice issued on reaching the specified stage

id
string

Invoice identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
number
string

Invoice number

Example:
INV000001
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/orders/997f1287-3d83-827a-7199-e5df2c0e4e67 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
    "number": "ORDER1234",
    "external_reference": "REF1234",
    "state": "NEW",
    "notes": "Lorem Ipsum",
    "number_of_milestones": 1,
    "number_of_items": 6,
    "supply_method": "DELIVERY",
    "total": 5.99,
    "sub_total": 11.99,
    "wallet_funds": 1.98,
    "amount_due": 3.01,
    "discount": {
        "amount": 0.96,
        "amount_incl_tax": 0.98
    },
    "ad_hoc_discount": {
        "type": "AMOUNT",
        "amount": 9.99
    },
    "currency_code": "EUR",
    "payment_info": "NOT PAID - TO BE PAID IN CASH",
    "payment_method": {
        "type": "ACCOUNT_DEBIT",
        "identity": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "identifier": "Visa *****1234 03/25"
        }
    },
    "is_favorite": true,
    "contact": {
        "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
        "code": "1234",
        "name": "John Doe",
        "email_address": "sue@mymail.com",
        "phone_number": "0035799454543",
        "country_code": "CYP"
    },
    "organisation": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "queue": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Ordering flow"
    },
    "stages": [
        {
            "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
            "name": "New",
            "date_achieved": 1649337035,
            "colour": "",
            "point_of_no_return": true,
            "comment": "Contact delivery confirmation"
        }
    ],
    "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"
    },
    "category": {
        "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
        "name": "Delivery Purchase"
    },
    "cancellation_reason": {
        "id": "997f1287-3d83-827a-7199-e5df2c0e4e67",
        "name": "Void by customer"
    },
    "fulfilled_by": {
        "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
        "name": "Good Burgers",
        "phone": "0035799454532",
        "address": {
            "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"
        }
    },
    "key_dates": {
        "submitted_on": 1592809457,
        "completed_on": 1592809457,
        "cancelled_on": 1592809457,
        "estimated_fulfillment": {
            "duration": "30",
            "uot": "MINUTES",
            "date": "1649337036"
        },
        "started_on": 1649337036,
        "requested_date": 1649337036
    },
    "available_for_printing": true,
    "is_printed": true,
    "order_provision": {
        "available_for_provision": "true",
        "is_provisioned": "false",
        "provisioner": "ALOHA"
    },
    "items": [
        {
            "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
            "notes": "Lorem Ipsum",
            "quantity": 1,
            "price": 1.7,
            "tax": 0.45,
            "discount": {
                "amount": 0.99,
                "amount_incl_tax": 0.89,
                "percentage": 1.5
            },
            "sub_total": 1.99,
            "total": 3.4,
            "product": {
                "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
                "sku": "SKU1234",
                "name": "Iced Latte",
                "classification": "TRACEABLE_PHYSICAL_GOOD",
                "composition": {
                    "item_type": "PRODUCT",
                    "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "mandatory": true,
                    "priority": 1,
                    "minimum_quantity": 1,
                    "maximum_quantity": 3,
                    "price_inclusive": true,
                    "modifier_product_id": "56786309-7a21-8097-e107-6e9aec401840"
                },
                "is_stockable": true,
                "tags": [
                    {
                        "id": "80362b63-a576-3540-586b-0dc1f3ab3bfd",
                        "name": "Coffees",
                        "colour": ""
                    }
                ],
                "components": [
                    {
                        "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
                        "sku": "B1234",
                        "name": "Brown Sugar",
                        "quantity": 1,
                        "price": 0.5,
                        "net": 1.55,
                        "tax": 0.15,
                        "discount": 0.25,
                        "total": 1.45,
                        "tags": [
                            {
                                "id": "9c134cf3-c274-ee73-4921-01fb34033d4c",
                                "name": "Condiment",
                                "colour": ""
                            }
                        ]
                    }
                ],
                "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"
                            }
                        ]
                    }
                ]
            }
        }
    ],
    "milestoness": [
        {
            "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
            "amount": 9.99,
            "percentage": 5.5,
            "date_achieved": 1649337036,
            "stage": {
                "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
                "name": "Approved"
            },
            "invoice": {
                "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
                "number": "INV000001"
            }
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "Back Office"
        }
    ]
}
Order Actions
PUT /orders/{id}/actions

Updates a single order based on the preferred action.

Path variables

id
string GUID required

The order identifier on which actions are performed

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67

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 action that will be applied on the order

Enumeration:
START_PROGRESS

Takes a New Order into the first In progress stage

COMPLETE

Complete an Order

CANCEL

Cancel an Order

PRINT_ORDER

Print an order for preparation of order at a venue.

ORDER_PROVISION

Provision an order to a POS

cancellation_reason_id
string GUID nullable

The reason why an order is cancelled (applicable if action = CANCEL)

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
is_favorite
boolean nullable

Defines whether the order is a contact’s favourite one

Example:
true
provisioner
string nullable

Defines the integration on which the order has been provisioned (applicable only if the order is available for provision)

Enumeration:
TWINSOFT
ALOHA
Examples

Responses

200 OK
Body
Object
id
string GUID

The order (identifier) that was updated

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
approval_requests
Array

Determines whether approval reuqests are applied or not, if not null an approval is requested

Object
id
string GUID

The apporval request identifier

Example:
3a4aad81-e5c2-72b7-3a86-903239d08767
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/orders/997f1287-3d83-827a-7199-e5df2c0e4e67/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "START_PROGRESS",
    "cancellation_reason_id": "caf332bc-4e90-47b5-a05d-142b264897b9",
    "is_favorite": true,
    "provisioner": "ALOHA"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "997f1287-3d83-827a-7199-e5df2c0e4e67",
    "approval_requests": [
        {
            "id": "3a4aad81-e5c2-72b7-3a86-903239d08767"
        }
    ]
}
Attachment Files
POST /orders/{id}/attachments
DELETE /orders/{id}/attachments/{file_id}
GET /orders/{id}/files
Add Order Attachment
POST /orders/{id}/attachments

Connect an uploaded attachment to an existing order

Path variables

id
string GUID required

The order (identifier) that attachment will be attached

Example:
66451204-4404-894c-4dc6-486c540ece40

Notes

FILE UPLOAD FLOW

Integrating attachments upload for Orders should be based on the following APIs

  1. Upload File Signature
  2. Connect a file to an Order

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
file_id
string GUID required nullable

The uploaded file signature (identifier) to be attached (file or link should be provided)

Example:
60556f0c-1c94-45b5-01b8-4dc7fa72001a
link
string required nullable

The URL endpoint to be attached (file or link should be provided)

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
description
string nullable

The file description

Example:
contact screenshot

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The attachment identifier

Example:
66451204-4404-894c-4dc6-486c540ece40
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/orders/66451204-4404-894c-4dc6-486c540ece40/files HTTP/1.1 

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

{
    "file_id": "30526723-24a3-e4e3-1a75-b26b1b41f05c",
    "url": "https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug",
    "description": "Screenshot sent by customer"
}

HTTP/1.1 201 Created

Content-Type: application/json

{
    "id": "66451204-4404-894c-4dc6-486c540ece40"
}
Delete Order Attachment
DELETE /orders/{id}/attachments/{file_id}

Delete a specific order attachment

Path variables

id
string GUID required

The order (identifier) that file will be deleted

Example:
66451204-4404-894c-4dc6-486c540ece40
file_id
string GUID required

The attachment file (identifier) that will be deleted

Example:
04c0bebd-8bb0-0b3e-e1a6-716a0fd200b1

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/orders/66451204-4404-894c-4dc6-486c540ece40/files/04c0bebd-8bb0-0b3e-e1a6-716a0fd200b1 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Order Attachments
GET /orders/{id}/files

Retrieve all attachments for a specific order

Path variables

id
string GUID required

The order (identifier) that files will be retrieved

Example:
66451204-4404-894c-4dc6-486c540ece40

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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The attachement identifier

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

The attachement description

Example:
Screenshot sent by customer
file
Object

The attached file

id
string GUID

The attached file identifier

Example:
0317868f-28f8-9f56-d248-5a78718b38cc
url
string

The attached file URL endpoint

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
name
string

The attached file name

Example:
img.png
mime
string

The mime type of the uploaded file

Enumeration:
csv
doc
docx
xls
xlsx
pdf
log
txt
png
jpg
jpeg
svg
link
string

The attached URL endpoint

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
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/orders/66451204-4404-894c-4dc6-486c540ece40/files HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "3ae9d64a-8a3b-f1e1-eed6-05b307f926fb",
            "mime": "png",
            "description": "this is a brief description of this image",
            "file": {
                "id": "0317868f-28f8-9f56-d248-5a78718b38cc",
                "name": "img.png"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Pass Plans & Passes

Passes (conventional vouchers) can be used to credit a contact’s wallet in order to pay for future purchases, or to provide a discount on a product or service being purchased.

Pass Plans

A pass plan defines the behaviour and characteristics of the passes to be generated. Pass plans can be created to generate Gift, Top-up or Promotion type passes in printed or electronic format.

POST /pass_plans
PUT /pass_plans/{id}
DELETE /pass_plans/{id}
GET /pass_plans
GET /pass_plans/{id}
POST /pass_plans/{id}/export
Create Pass Plan
POST /pass_plans

Create a pass plan of type Gift, Top-up or Promotion, along with the particulars which will be inherited by each pass generated for the pass plan. Any pass plan’s amounts are always set in the business’s base currency (all pass plans regardless of their classification, behaviours etc.). A pass plan is created with an ‘inactive’ state and must be activated using another API call.

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

The life cycle state of the pass plan

Enumeration:
ACTIVE

Pass plan in use, passes can be generated

INACTIVE

Pass plan not in use

Default:
INACTIVE
Example:
ACTIVE
name
string required

The name of the pass plan. The name must be uniue across all pass plans.

Example:
Gift voucher €50-€200
description
string

A description of the pass plan

Example:
Printed gift vouchers of variable value €50-€200
classification
string required

The classification of the pass type

Enumeration:
GIFT

Can be sent as a gift to either a registered or non-registered contact

TOP_UP

Used to top-up the wallet of a registered contact

PROMOTION

Must be related to a reward offer or a promotion

validity
Object
type
string

The validity type

Enumeration:
PERIOD

Passes can be redeemed within the set period of time (e.g. within 3 months of being created)

DATE

Passes will expire on a specific date (e.g. 31/12/2022)

ALWAYS

Passes will never expire (i.e. no validity period)

Example:
ALWAYS
period
integer

The validity period value, applicable only if validity type is PERIOD (e.g. expires in X days/months/years). Used in conjunction with ‘uot’ to set the validity period.

Example:
1
uot
string

The period unit of time, applicable only if validity type is PERIOD. Used in conjunction with ‘period’ to set the validity period.

Enumeration:
DAYS

(e.g. expires within 90 DAYS)

MONTHS

(e.g. expires within 6 MONTHS)

YEARS

(e.g. expires within 2 YEARS)

Example:
MONTHS
fixed_date
integer epoch

The fixed date by which passes can be redeemed, applicable only if validity type is DATE

Example:
1591703675
promotion_passes
Object
promotion_id
string GUID required nullable

The id of the promotion that the pass will consume, either promotion_id OR reward_offer_id must be specified

Example:
e2ade504-9b90-92be-0adb-3258475ff695
reward_offer_id
string GUID required nullable

The id of the reward offer that the pass will consume, either promotion_id OR reward_offer_id must be specified

Example:
64b8c34d-e7d8-44ff-8bf0-908a8689cbdf
pass_code_type
string required

The type of pass codes to be generated by the pass plan

Enumeration:
MULTIPLE

Unique pass codes will be generated for each pass

SINGLE

A single (same) code will be used for all passes

Example:
MULTIPLE
maximum_usage
integer

The maximum number of times that the pass can be used, 1 = single use pass, >1 = multiple uses

Example:
5
printed
boolean

Will passes be printed? printed = true, electronic = false, applicable only for pass plans with a classification of GIFT or TOP_UP (PROMOTION passes are only available in electronic format)

Example:
true
value
Object
type
string required

Will passes have a fixed or variable value? FIXED indicates that the pass value is predefined, VARIABLE allows the value of the pass to be set during creation (within a range of values)

Enumeration:
FIXED

(e.g. 70)

VARIABLE

(e.g. 50-250)

Example:
FIXED
fixed_amount
number

The fixed value of the pass (in the base currency of the system), applicable only if value type is FIXED.

Example:
70
minimum
number

The minimum allowed value of the pass, applicable only if value type is VARIABLE. Used in conjunction with ‘maximum’

Example:
50
maximum
number

The maximum allowed value of the pass, applicable only if value type is VARIABLE. Used in conjunction with ‘minimum’

Example:
250
number_of_passes
integer

For printed passes - this is the number of passes to create, for electronic passes - this is the maximum number of passes to be created (0 = unlimited)

Example:
100
code_format
Object
type
string required

The pass code type to be used

Enumeration:
ALPHANUMERIC

Pass codes created will be in alphanumeric format (e.g JB73B0L3916)

ALPHABETIC

Pass codes created will be in alphabetic format (e.g. AJKLMEQPCA)

NUMERIC

Pass codes created will be in numeric format (7956093213)

Example:
ALPHANUMERIC
prefix
string

Optional prefix for the pass code (appears at the beginning of the pass code)

Example:
CRM
suffix
string

Optional suffix for the pass code (appears at the end of the pass code)

Example:
COM
length
integer

The length of the code (min.7, max.16), not inlcuding prefix and suffix

Example:
10
pin_required
boolean

Defines whether the passes will be associated with a pin (not for PROMOTION type pass plans)

Default:
false
Example:
true
single_code
string

The single pass code to be used for all passes. Applicable only for PROMOTION type pass plans with pass_code_type = SINGLE

Example:
123456
credit_wallet_balance
string

Which wallet balance will be credited when the pass is redeemed? For TOP_UP and GIFT passes only

Enumeration:
OPEN

Open wallet balance - can be spent without restrictions

COMMERCE

Commerce wallet balance - spend conditions may apply

Example:
COMMERCE
commerce_pool_id
string

GUID of spend group if credit_wallet_balance is COMMERCE. For TOP-UP & GIFT passes only

Example:
64b8c34d-e7d8-44ff-8bf0-908a8689cbdf
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

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the newly created pass plan

Example:
954ce862-469e-4a6d-9b21-edbf51226c89
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/pass_plans HTTP/1.1 

Content-Type: application/json

{
    "state": "INACTIVE",
    "name": "Gift voucher €50-€200",
    "description": "Printed gift vouchers of variable value €50-€200",
    "classification": "TOP_UP",
    "validity": {
        "type": "ALWAYS",
        "period": 1,
        "uot": "MONTHS",
        "fixed_date": 1591703675
    },
    "promotion_passes": {
        "promotion_id": "e2ade504-9b90-92be-0adb-3258475ff695",
        "reward_offer_id": "64b8c34d-e7d8-44ff-8bf0-908a8689cbdf",
        "pass_code_type": "MULTIPLE",
        "maximum_usage": 5
    },
    "printed": "true",
    "value": {
        "type": "FIXED",
        "fixed_amount": 70,
        "minimum": 50,
        "maximum": 250
    },
    "number_of_passes": 100,
    "code_format": {
        "type": "ALPHANUMERIC",
        "prefix": "CRM",
        "suffix": "COM",
        "length": 10,
        "pin_required": "true",
        "single_code": "123456"
    },
    "credit_wallet_balance": "COMMERCE",
    "commerce_pool_id": "64b8c34d-e7d8-44ff-8bf0-908a8689cbdf",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "954ce862-469e-4a6d-9b21-edbf51226c89"
}
Update Pass Plan
PUT /pass_plans/{id}

Update specific details of a pass plan.

A pass plan can only be updated if it’s in ‘inactive’ state and no passes have been created yet

Path variables

id
string GUID required

The id of the pass plan to be updated

Example:
954ce862-469e-4a6d-9b21-edbf51226c89

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

The state of the pass plan

Enumeration:
ACTIVE

Pass plan can be used and passes can be generated

INACTIVE

Pass plan not in use yet

Example:
ACTIVE
name
string

The name of the pass plan. The name must be uniue across all pass plans.

Example:
Xmas Gift Cards
description
string

A description of the pass plan

Example:
Gift Cards for Christmas
validity
Object
type
string

The validity type

Enumeration:
PERIOD

Passes can be redeemed within the set period of time (e.g. within 3 months of being created)

DATE

Passes will expire on a specific date (e.g. 31/12/2022)

ALWAYS

Passes will never expire (i.e. no validity period)

Example:
ALWAYS
period
integer

The validity period value, applicable only if validity type is PERIOD (e.g. expires in X days/months/years). Used in conjunction with ‘uot’ to set the validity period.

Example:
1
uot
string

The period unit of time, applicable only if validity type is PERIOD. Used in conjunction with ‘period’ to set the validity period.

Enumeration:
DAYS

(e.g. expires within 90 DAYS)

MONTHS

(e.g. expires within 6 MONTHS)

YEARS

(e.g. expires within 2 YEARS)

Example:
MONTHS
fixed_date
integer epoch

The fixed date by which passes can be redeemed, applicable only if validity type is DATE

Example:
1591703675
promotion_passes
Object
promotion_id
string GUID required nullable

The id of the promotion that the pass will consume, either promotion_id OR reward_offer_id must be specified

Example:
e2ade504-9b90-92be-0adb-3258475ff695
reward_offer_id
string GUID required nullable

The id of the reward offer that the pass will consume, either promotion_id OR reward_offer_id must be specified

Example:
64b8c34d-e7d8-44ff-8bf0-908a8689cbdf
pass_code_type
string required

The type of pass codes to be generated by the pass plan

Enumeration:
MULTIPLE

Unique pass codes will be generated for each pass

SINGLE

A single (same) code will be used for all passes

Example:
MULTIPLE
maximum_usage
integer

The maximum number of times that the pass can be used, 1 = single use pass, >1 = multiple uses

Example:
5
printed
boolean

Will passes be printed? printed = true, electronic = false. Applicable only for pass plans with a classification of GIFT or TOP_UP (PROMOTION passes are only available in electronic format)

Example:
true
number_of_passes
integer

For printed passes - this is the number of passes to create, for electronic passes - this is the maximum number of passes to be created. If not specified, then an unlimited number of passes will be created.

code_format
Object
type
string required

The pass code type to be used

Enumeration:
ALPHANUMERIC

Pass codes created will be in alphanumeric format (e.g JB73B0L3916)

ALPHABETIC

Pass codes created will be in alphabetic format (e.g. AJKLMEQPCA)

NUMERIC

Pass codes created will be in numeric format (7956093213)

Example:
ALPHANUMERIC
prefix
string

Optional prefix for the pass code (appears at the beginning of the pass code)

Example:
CRM
suffix
string

Optional suffix for the pass code (appears at the end of the pass code)

Example:
COM
length
integer

The length of the code (min.7, max.16), not inlcuding prefix and suffix

Example:
10
pin_required
boolean

Defines whether the passes will be associated with a pin (not for PROMOTION type pass plans)

Default:
false
Example:
true
single_code
string

The single pass code to be used for all passes. Applicable only for PROMOTION type pass plans with pass_code_type = SINGLE

Example:
123456
credit_wallet_balance
string

Which wallet balance will be credited when the pass is redeemed? For TOP_UP and GIFT passes only

Enumeration:
OPEN

Open wallet balance - can be spent without restrictions

COMMERCE

Commerce wallet balance - spend conditions may apply

Example:
COMMERCE
commerce_pool_id
string

GUID of spend group if credit_wallet_balance is COMMERCE. For TOP-UP & GIFT passes only

Example:
64b8c34d-e7d8-44ff-8bf0-908a8689cbdf
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

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the pass plan updated

Example:
954ce862-469e-4a6d-9b21-edbf51226c89
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/pass_plans/954ce862-469e-4a6d-9b21-edbf51226c89 HTTP/1.1 

Content-Type: application/json

{
    "state": "ACTIVE",
    "name": "Xmas Gift Cards",
    "description": "Gift Cards for Christmas",
    "validity": {
        "type": "ALWAYS",
        "period": 1,
        "uot": "MONTHS",
        "fixed_date": 1591703675
    },
    "promotion_passes": {
        "promotion_id": "e2ade504-9b90-92be-0adb-3258475ff695",
        "reward_offer_id": "64b8c34d-e7d8-44ff-8bf0-908a8689cbdf",
        "pass_code_type": "MULTIPLE",
        "maximum_usage": 5
    },
    "printed": "true",
    "number_of_passes": 1,
    "code_format": {
        "type": "ALPHANUMERIC",
        "prefix": "CRM",
        "suffix": "COM",
        "length": 10,
        "pin_required": "true",
        "single_code": "123456"
    },
    "credit_wallet_balance": "COMMERCE",
    "commerce_pool_id": "64b8c34d-e7d8-44ff-8bf0-908a8689cbdf",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "954ce862-469e-4a6d-9b21-edbf51226c89"
}
Delete Pass Plan
DELETE /pass_plans/{id}

Delete an existing pass plan.

A pass plan can only be deleted if no passes have been created yet

Path variables

id
string GUID required

The id of the pass plan to delete

Example:
64b8c34d-e7d8-44ff-8bf0-908a8689cbdf

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/pass_plans/64b8c34d-e7d8-44ff-8bf0-908a8689cbdf HTTP/1.1 

HTTP/1.1 204 No Content 
List Pass Plans
GET /pass_plans

Retrieve all pass plans with selected details. Deleted pass plans are excluded.

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
search_value
string optional

Search for pass plans using the pass plan name

Example:
Xmas Gift Passes
classification
string optional

Search for pass plans using the classification

Enumeration:
GIFT

Can be sent as a gift to either a registered or non-registered contact

TOP_UP

Used to top-up the wallet of a registered contact

PROMOTION

Must be related to a reward offer or a promotion

state
string optional

Search for pass plans using a state

Enumeration:
ACTIVE

Pass plan in use, passes can be generated

INACTIVE

Pass plan not in use

Default:
INACTIVE
Example:
ACTIVE
pass_code_type
string optional

Search pass plans using the distribution method (for PROMOTION passes only)

Enumeration:
MULTIPLE

Unique pass codes are generated for each pass

SINGLE

A single (same) code is used for all passes

printed
boolean optional

Search for pass plans based on whether passes are printed or not (true=PRINTED, false=ELECTRONIC)

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

Successful Request

Body
Object
content
Array

Search results

Object
id
string GUID

The id of the pass plan

Example:
64b8c34d-e7d8-44ff-8bf0-908a8689cbdf
state
string

The life cycle state of the pass plan

Enumeration:
ACTIVE

Pass plan in use, passes can be generated

INACTIVE

Pass plan not in use

Default:
INACTIVE
Example:
ACTIVE
name
string

The name of the pass plan

Example:
Xmas Gift Cards
description
string

The description of the pass plan

Example:
Gift Cards for Christmas
classification
string

The classification of the pass type

Enumeration:
GIFT

Can be sent as a gift to either a registered or non-registered contact

TOP_UP

Used to top-up the wallet of a registered contact

PROMOTION

Must be related to a reward offer or a promotion

printed
boolean

Are the passes for the pass plan are printed? (true = PRINTED, false = ELECTRONIC)

Example:
false
created_passes
integer

Number of passes created to date for the pass plan

Example:
100
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/pass_plans HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "64b8c34d-e7d8-44ff-8bf0-908a8689cbdf",
            "state": "ACTIVE",
            "name": "Xmas Gift Cards",
            "description": "Gift Cards for Christmas",
            "classification": "PROMOTION",
            "printed": "false",
            "created_passes": 100
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Pass Plan
GET /pass_plans/{id}

Retrieves all details for a single pass plan

Path variables

id
string GUID required

The id of the pass plan whose details will be retrieved

Example:
af7e3a1b-40ca-46e2-8de5-d461ccb85e58

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
id
string

Pass plan id

Example:
af7e3a1b-40ca-46e2-8de5-d461ccb85e58
state
string

The life cycle state of the pass plan

Enumeration:
ACTIVE

Pass plan in use, passes can be generated

INACTIVE

Pass plan not in use

Default:
INACTIVE
Example:
ACTIVE
name
string

The name of the pass type

Example:
Xmas Gift Cards
description
string

The description of the pass type

Example:
Gift Cards for Christmas
classification
string

The classification of the pass type

Enumeration:
GIFT

Can be sent as a gift to either a registered or non-registered contact

TOP_UP

Used to top-up the wallet of a registered contact

PROMOTION

Must be related to a reward offer or a promotion

validity
Object
type
string

The validity type

Enumeration:
PERIOD

Passes can be redeemed within the set period of time (e.g. within 3 months of being created)

DATE

Passes will expire on a specific date (e.g. 31/12/2022)

ALWAYS

Passes will never expire (i.e. no validity period)

Example:
ALWAYS
period
integer

The validity period value, applicable only if validity type is PERIOD (e.g. expires in X days/months/years). Used in conjunction with ‘uot’ to set the validity period.

Example:
1
uot
string

The period unit of time, applicable only if validity type is PERIOD. Used in conjunction with ‘period’ to set the validity period.

Enumeration:
DAYS

(e.g. expires within 90 DAYS)

MONTHS

(e.g. expires within 6 MONTHS)

YEARS

(e.g. expires within 2 YEARS)

fixed_date
integer epoch

The fixed date by which passes can be redeemed, applicable only if validity type is DATE

Example:
1591703675
promotion_passes
Object
promotion_id
string GUID required

The id of the promotion that the pass will consume, either promotion_id OR reward_offer_id must be specified

Example:
e2ade504-9b90-92be-0adb-3258475ff695
reward_offer_id
string GUID required

The id of the reward offer that the pass will consume, either promotion_id OR reward_offer_id must be specified

Example:
64b8c34d-e7d8-44ff-8bf0-908a8689cbdf
name
string

Promotion name or reward offer name (depending on promotion_id or reward_offer_id received)

Example:
50% Birthday Offer
pass_code_type
string

The type of pass codes to be generated by the pass plan

Enumeration:
MULTIPLE

Unique pass codes will be generated for each pass

SINGLE

A single (same) code will be used for all passes

Example:
SINGLE
maximum_usage
integer

The maximum number of times that the pass can be used, 1 = single use pass, >1 = multiple uses

Example:
1
printed
boolean

Defines whether the passes will be printed (true = printed, false = electronic)

Example:
true
value
Object
type
string

Will passes have a fixed or variable value? FIXED indicates that the pass value is predefined, VARIABLE allows the value of the pass to be set during creation (within a range of values)

Enumeration:
FIXED

(e.g. 70)

VARIABLE

(e.g. 50-250)

Example:
FIXED
fixed_amount
number

The fixed pass value amount (in the base currency of the system), applicable only if value type is FIXED

Example:
70
minimum
number

The minimum allowed value of the pass, applicable only if value type is VARIABLE. Used in conjunction with ‘maximum’

Example:
50
maximum
number

The maximum allowed value of the pass, applicable only if value type is VARIABLE. Used in conjunction with ‘minimum’

Example:
250
currency_code
string

The base currency code of the system

Example:
EUR
number_of_passes
integer

For printed passes - this is the number of passes to create, for electronic passes - this is the maximum number of passes to be created

code_format
Object
type
string

The pass code type used

Enumeration:
ALPHANUMERIC

Pass codes are in alphanumeric format (e.g JB73B0L3916)

ALPHABETIC

Pass codes are in alphabetic format (e.g. AJKLMEQPCA)

NUMERIC

Pass codes are in numeric format (7956093213)

prefix
string

Optional pass code prefix (appears at the beginning of the pass code)

Example:
CRM
suffix
string

Optional pass code suffix (appears at the end of the pass code)

Example:
COM
length
integer

Pass code length (min.7, max.16), not inlcuding prefix and suffix

Example:
10
pin_required
boolean

Are passes associated with a pin? (not for PROMOTION type pass plans)

Default:
false
Example:
true
single_code
string

The single pass code to be used for all passes. Applicable only for PROMOTION type pass plans with pass_code_type = SINGLE

Example:
123456
credit_wallet_balance
string

The wallet balance to be credited when the pass is redeemed. For TOP_UP and GIFT passes only

Enumeration:
OPEN

Open wallet balance - can be spent without restrictions

COMMERCE

Commerce wallet balance - spend conditions may apply

Example:
COMMERCE
commerce_pool
Object

Details about spend condition

id
string GUID

The commerce pool identifier

Example:
dc01f65b-a482-48f1-9fda-c163df72f28f
name
string

The commerce pool name

Example:
Redeem Anywhere
description
string

The commerce pool description

Example:
Ability to redeem on any organisation/day/product
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
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/pass_plans/af7e3a1b-40ca-46e2-8de5-d461ccb85e58 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "af7e3a1b-40ca-46e2-8de5-d461ccb85e58",
    "state": "ACTIVE",
    "name": "Xmas Gift Cards",
    "description": "Gift Cards for Christmas",
    "classification": "GIFT",
    "validity": {
        "type": "ALWAYS",
        "period": 1,
        "uot": "YEARS",
        "fixed_date": 1591703675
    },
    "promotion_passes": {
        "promotion_id": "e2ade504-9b90-92be-0adb-3258475ff695",
        "reward_offer_id": "64b8c34d-e7d8-44ff-8bf0-908a8689cbdf",
        "name": "50% Birthday Offer",
        "pass_code_type": "SINGLE",
        "maximum_usage": 1
    },
    "printed": "true",
    "value": {
        "type": "FIXED",
        "fixed_amount": 70,
        "minimum": 50,
        "maximum": 250,
        "currency_code": "EUR"
    },
    "number_of_passes": 1,
    "code_format": {
        "type": "ALPHABETIC",
        "prefix": "CRM",
        "suffix": "COM",
        "length": 10,
        "pin_required": "true",
        "single_code": "123456"
    },
    "credit_wallet_balance": "COMMERCE",
    "commerce_pool": {
        "id": "dc01f65b-a482-48f1-9fda-c163df72f28f",
        "name": "Redeem Anywhere",
        "description": "Ability to redeem on any organisation/day/product"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}
Export Passes
POST /pass_plans/{id}/export

Export the passes of a pass plan to a .csv file and send it to the logged in user’s email

Path variables

id
string GUID required

The id of the pass plan whose passes will be exported

Example:
64b8c34d-e7d8-44ff-8bf0-908a8689cbdf

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
POST https://sandbox.crm.com/backoffice/v2/pass_plans/64b8c34d-e7d8-44ff-8bf0-908a8689cbdf/export HTTP/1.1 

HTTP/1.1 204 No Content 
Passes
POST /passes
PUT /passes/{id}
GET /passes
GET /passes/{id}
POST /passes/redeem
PUT /passes/{id}/actions
Create Pass
POST /passes

Request to create one or more passes:

  • For printed passes - create all the passes for a pass plan
  • For electronic pass - create a single pass for a contact and always on demand only via an integration system request, i.e. when an electronic pass is given out or sold to a contact.

Pass attributes are inherited from the pass plan

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

The id of the pass plan for which a pass will be created

Example:
Mobile data top-up €50
pass_value
number

The value of the pass (in the base currency of the system), applicable for pass plans configured for ‘variable’ value passes

Example:
50
recipient
Object

The recipient information. For Top-up passes this is the registered contact who will also be redeeming the pass. For Gift passes this is the registered/unregistered contact who will be redeeming the pass. For Promotion passes this is the contact who consumed the reward offer/promotion

name
string required

The recipient name

Example:
John Smith
medium_type
string required

The communication medium to be used to send the pass information to the recipient. Note: For electronic Gift passes - if the registered_contact information has been provided, then medium_type is not mandatory

Enumeration:
SMS
EMAIL
Example:
EMAIL
medium_value
string

The value of the communication medium to be used to send the pass information Note: For electronic Gift passes - if the registered_contact information has been provided then medium_value is not mandatory

Example:
j.smith@crm.com
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
registered_contact
Object

Details requried if the pass is being created for a registered contact.

contact_id
string GUID required nullable

Contact id of the existing Contact

Example:
acaae121-b4af-4663-8646-47bb541c971d
wallet_id
string GUID required nullable

Wallet id of the existing contact

Example:
4613eb36-e5e8-46e8-9517-b1a31e86c89c
gift_sender
Object

Gift sender information (for electronic Gift passes only).

name
string required

Gift sender name

Example:
Kelly Smith
message
string

A short message from the gift sender to accompany the gift pass

Example:
Happy birthday John, have a great day. Hope to see you soon. Kelly
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

Responses

200 200

Successful Request

Body

The response will only return pass details if a single electronic pass has been generated, if multiple printed passes have been generated then nothing is returned.

Object
id
string

The id of the newly generated pass (if a single electronic pass was generated)

Example:
aaf1ca4d-2480-453c-9de0-84acbcf320fd
pass_code
string

The pass code (if a single electronic pass was generated)

Example:
AX61YUSWVO
pin
string

4-digit pass PIN (if applicable, and if a single electronic pass was generated)

Example:
1234
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/passes HTTP/1.1 

Content-Type: application/json

{
    "pass_plan_id": "Mobile data top-up €50",
    "pass_value": 50,
    "recipient": {
        "name": "John Smith",
        "medium_type": "EMAIL",
        "medium_value": "j.smith@crm.com",
        "country_code": "CYP",
        "registered_contact": {
            "contact_id": "acaae121-b4af-4663-8646-47bb541c971d",
            "wallet_id": "4613eb36-e5e8-46e8-9517-b1a31e86c89c"
        }
    },
    "gift_sender": {
        "name": "Kelly Smith",
        "message": "Happy birthday John, have a great day. Hope to see you soon. Kelly"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "aaf1ca4d-2480-453c-9de0-84acbcf320fd",
    "pass_code": "AX61YUSWVO",
    "pin": "1234"
}
Update Pass
PUT /passes/{id}

Update the pass state, the expiration date, the initial value, the pin or custom fields of a single pass only.

Path variables

id
string required

The id of pass to be updated

Example:
a0f91720-0a8d-414c-a57c-82ea928be39e

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 nullable

The new state of the pass

Enumeration:
ACTIVE

Only a pass in ‘Draft’ state can be activated

CANCELLED

Only a pass in 'Draft or ‘Active’ state can be cancelled

Example:
CANCELLED
expiration_date
integer epoch nullable

The new expiration date

Example:
1592919625
initial_load
number nullable

The value that the pass should be loaded with (applicable only for printed passes of variable value, and whose initial value is ‘null’)

Example:
50
pin
string nullable

PIN has a dual purpose:

  1. If simply updating the PIN, then provide the new 4-digit PIN value
  2. If cancelling a redeemed Gift Pass (i.e. state = CANCELLED, and the pass type is Gift) then the pin must also be provided in order for cancellation to proceed.
Example:
1908
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

Responses

200 200

Successful Request

Body
Object
id
string

The id of the updated pass

Example:
a0f91720-0a8d-414c-a57c-82ea928be39e
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/passes/a0f91720-0a8d-414c-a57c-82ea928be39e HTTP/1.1 

Content-Type: application/json

{
    "state": "CANCELLED",
    "expiration_date": 1592919625,
    "initial_load": 50,
    "pin": "1908",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a0f91720-0a8d-414c-a57c-82ea928be39e"
}
List Passes
GET /passes

Returns a list of passes based on request parameters

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
expiration_date
string optional

Filter passes based on the expiration date

Enumeration:
expiration_date[gt]

Returns results where the expiration date is greater than this value

expiration_date[gte]

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

expiration_date[lt]

Returns results where the expiration date is less than this value

expiration_date[lte]

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

pass_plan_id
string GUID optional

Filter passes using the id of the pass plan

Example:
5e90226d-e192-43fe-9a69-f1c3bb29c575
contact_id
string GUID optional

Filer passes using the contact id

Example:
954ce862-469e-4a6d-9b21-edbf51226c89
pass_code
string optional

Retrieve the details of a specific pass code (either pass_code or pass_code_hash) can be used

Example:
SLHY678993109PWE
pass_code_hash
string optional

Retrieve the details of a hashed pass code (either pass_code or pass_code_hash) can be used

Example:
11f45e8377aad7bd38910f1a01b4ebda53605eb8
pin
string optional

If a pass_code has been specified then the relevant pass pin should be provided too (if applicable) in order to retrieve the information

Example:
5663
state
array of Pass - State (enum) optional

Retrieve passes of a particular state

Collection format: csv
Example:
[
    "REDEEMED"
]
printed
boolean optional

Filter based on whether passes are printed or not (printed = true, electronic = false)

Example:
true

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array

Passes information retrieved

Object
id
string GUID

The pass id

Example:
4139eabf-c3d7-4e88-a12e-b316f99099a3
code
string

The pass code

Example:
SIOQWHUFDW
value
number

The pass value (currency is the base currency of the system)

Example:
100
pass_plan
Object

Details about the pass plan

id
string GUID

The pass plan identifier

Example:
b2bbd932-4b1c-f3e0-54f7-dc15ef715d98
name
string

The pass plan name

Example:
Xmas Gift Card
expiration_date
string epoch

Date by which the pass must be redeemed, this is inherited from pass plan validity settings

Example:
1652887300
state
string

The pass life cycle state

Enumeration:
DRAFT

Pass is not ready for use, cannot be redeemed yet

ACTIVE

Pass is ready for use and can be redeemed

CANCELLED

Pass is cancelled, cannot be redeemed

REDEEMED

Pass has been redeemed and can no longer be used

recipient
Object
id
string

Id of the contact (if a registered contact)

Example:
cadbf723-fdc6-4598-8156-f6288e61f356
name
string

The recipient’s name

Example:
John Jonhson
code
string

The recipient’s contact code (if a registered contact)

Example:
1078033453632307
medium_type
string

The medium used to deliver the pass

Enumeration:
SMS
EMAIL
Example:
EMAIL
medium_value
string

The medium value for delivering the pass (i.e. email address or phone number)

Example:
john@mail.com
country_code
string

Applicable for medium_type ‘SMS’

Example:
CYP
promotion
Object
id
string

Promotion id

Example:
7d66cc0a-c5d6-491e-b034-96c09bc3f4d8
name
string

Promotion name

Example:
20% off new subscriptions for Kids Channel
reward_offer
Object

The reward offer that the promotion pass will consume.

id
string GUID

The reward offer identifier

Example:
c888dd7a-7476-538c-730a-9f924bd82d04
name
string

The reward offer name

Example:
Birthday Offer
printed
boolean

Defines whether the pass is printed (true), or electronic (false)

Example:
true
usage
Object

Pass usage details, applicable for Promotion passes only

allowed_usage
integer

How many times a Promotion type pass can be used

Example:
2
used_times
integer

The actual number of times that the pass has been used

Example:
1
redemption_entity
Object
type
string

The type of entity that the pass was redeemed against

Enumeration:
WALLET
ORDER
SUBSCRIPTION
Example:
WALLET
id
string

The id of the entity that the pass was redeemed against

Example:
d23cae12-02fe-4658-9fcb-8f54dcc07798
code
string

The code of the wallet or subscription, or the order number

Example:
W097832
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/passes HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4139eabf-c3d7-4e88-a12e-b316f99099a3",
            "code": "SIOQWHUFDW",
            "value": 100,
            "pass_plan": {
                "id": "b2bbd932-4b1c-f3e0-54f7-dc15ef715d98",
                "name": "Xmas Gift Card"
            },
            "expiration_date": "1652887300",
            "state": "DRAFT",
            "recipient": {
                "id": "cadbf723-fdc6-4598-8156-f6288e61f356",
                "name": "John Jonhson",
                "code": "1078033453632307",
                "medium_type": "EMAIL",
                "medium_value": "john@mail.com",
                "country_code": "CYP"
            },
            "promotion": {
                "id": "7d66cc0a-c5d6-491e-b034-96c09bc3f4d8",
                "name": "20% off new subscriptions for Kids Channel"
            },
            "reward_offer": {
                "id": "c888dd7a-7476-538c-730a-9f924bd82d04",
                "name": "Birthday Offer"
            },
            "printed": "true",
            "usage": {
                "allowed_usage": 2,
                "used_times": 1
            },
            "redemption_entity": {
                "type": "WALLET",
                "id": "d23cae12-02fe-4658-9fcb-8f54dcc07798",
                "code": "W097832"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Pass
GET /passes/{id}

Retrieves the details for a single pass.

Path variables

id
string required

The unique identifier of the pass to be retrieved

Example:
485ff648-38f0-4a0e-a99b-28cd293dfc7c

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
id
string GUID

The pass ID

Example:
4139eabf-c3d7-4e88-a12e-b316f99099a3
code
string

The pass code

Example:
TTGNPQJUN
value
Object

Pass value information

amount
number

Pass amount

Example:
250
currency_code
string

System base currency code which the pass was created in

Example:
EUR
pass_plan
Object

Details about the pass plan

id
string GUID

The pass plan identifier

Example:
b2bbd932-4b1c-f3e0-54f7-dc15ef715d98
name
string

The pass plan name

Example:
Xmas Gift Card
recipient
Object
id
string

Id of the contact (if a registered contact)

Example:
cadbf723-fdc6-4598-8156-f6288e61f356
name
string

The recipient’s name

Example:
John Jonhson
code
string

The recipient’s contact code (if a registered contact)

Example:
1078033453632307
medium_type
string

The medium used to deliver the pass

Enumeration:
SMS
EMAIL
Example:
EMAIL
medium_value
string

The medium value for delivering the pass (i.e. email address or phone number)

Example:
john@mail.com
country_code
string

Applicable for medium_type ‘SMS’

Example:
CYP
promotion
Object
id
string

Promotion id

Example:
7d66cc0a-c5d6-491e-b034-96c09bc3f4d8
name
string

Promotion name

Example:
20% off new subscriptions for Kids Channel
reward_offer
Object

The reward offer that the promotion pass will consume.

id
string GUID

The reward offer identifier

Example:
c888dd7a-7476-538c-730a-9f924bd82d04
name
string

The reward offer name

Example:
Birthday Offer
printed
boolean

Indicates a printed pass (true), or electronic pass (false)

Example:
true
state
string

The pass life cycle state

Enumeration:
DRAFT

Pass is not ready for use, cannot be redeemed yet

ACTIVE

Pass is ready for use and can be redeemed

CANCELLED

Pass is cancelled, cannot be redeemed

REDEEMED

Pass has been redeemed and can no longer be used

created_on
integer epoch

Pass creation date

Example:
1591796310
created_by
string GUID

Created by id

Example:
4AD9C84FA60F9FE407140E20F707726A
updated_on
integer epoch

Date of update

updated_by
string GUID

Updated by id

Example:
4AD9C84FA60F9FE407140E20F707726A
expiration_date
integer epoch

Date by which the pass must be redeemed, this is inherited from pass plan validity settings

Example:
1652887300
redemption_entity
Object
type
string

The type of entity that the pass was redeemed against

Enumeration:
WALLET
ORDER
SUBSCRIPTION
Example:
WALLET
id
string

The id of the entity that the pass was redeemed against

Example:
d23cae12-02fe-4658-9fcb-8f54dcc07798
code
string

The code of the wallet or subscription, or the order number

Example:
W097832
usage
Object

Applicable for Promotion type passes only

allowed_usage
integer

How many times the Promotion pass can be used

Example:
2
used_times
integer

The actual number of times that the pass has been used

Example:
1
pin
string

The pass pin

Example:
0558
commerce_pool
Object

Details about spend conditions

id
string

The commerce pool identifier

Example:
dc01f65b-a482-48f1-9fda-c163df72f28f
name
string

The commerce pool name

Example:
Spend within a year
description
string

The commerce pool description

Example:
Pass funds will expire 1 year after redemption
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
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/passes/485ff648-38f0-4a0e-a99b-28cd293dfc7c HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4139eabf-c3d7-4e88-a12e-b316f99099a3",
    "code": "TTGNPQJUN",
    "value": {
        "amount": 250,
        "currency_code": "EUR"
    },
    "pass_plan": {
        "id": "b2bbd932-4b1c-f3e0-54f7-dc15ef715d98",
        "name": "Xmas Gift Card"
    },
    "recipient": {
        "id": "cadbf723-fdc6-4598-8156-f6288e61f356",
        "name": "John Jonhson",
        "code": "1078033453632307",
        "medium_type": "EMAIL",
        "medium_value": "john@mail.com",
        "country_code": "CYP"
    },
    "promotion": {
        "id": "7d66cc0a-c5d6-491e-b034-96c09bc3f4d8",
        "name": "20% off new subscriptions for Kids Channel"
    },
    "reward_offer": {
        "id": "c888dd7a-7476-538c-730a-9f924bd82d04",
        "name": "Birthday Offer"
    },
    "printed": true,
    "state": "ACTIVE",
    "created_on": 1591796310,
    "created_by": "4AD9C84FA60F9FE407140E20F707726A",
    "updated_on": 1,
    "updated_by": "4AD9C84FA60F9FE407140E20F707726A",
    "expiration_date": 1652887300,
    "redemption_entity": {
        "type": "WALLET",
        "id": "d23cae12-02fe-4658-9fcb-8f54dcc07798",
        "code": "W097832"
    },
    "usage": {
        "allowed_usage": 2,
        "used_times": 1
    },
    "pin": "0558",
    "commerce_pool": {
        "id": "dc01f65b-a482-48f1-9fda-c163df72f28f",
        "name": "Spend within a year",
        "description": "Pass funds will expire 1 year after redemption"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}
Redeem a Pass
POST /passes/redeem

Redeem a single pass for a contact. For Gift & Top-up passes the contact’s business wallet blalance (open or commerce) will be credited with the value of the pass in the respective currency.

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

The pass code (either pass code or code_hash must be specified)

Example:
SLHY678993109PWE
code_hash
string required

The hashed pass code (either code or code_hash must be specified)

Example:
11f45e8377aad7bd38910f1a01b4ebda53605eb8
pin
string nullable

The pass pin. Required only if the pass is assiociated with a pin

Example:
1908
value
number

The value of the pass to be redeemed (in the base currency of the system), will only be considered if the initial pass value = null i.e. for variable value passes

Example:
100
contact_id
string GUID nullable

Id of the registered contact redeeming the pass. If no contact_id is provided then a new contact will be created using the pass code as the contact name (i.e. un-named contact)

Example:
d686eac8-fd56-4092-81a3-eefe0967456b
wallet_id
string GUID nullable

Id of contact’s wallet to be credited with the pass value (for Gift & Top-up passes)

Example:
d230a21b-75a3-45b4-ae67-88bc8d643bcb

Responses

200 200

Successful Request

Body
Object
id
string GUID

The id of the pass that has been successfully redeemed

Example:
5e90226d-e192-43fe-9a69-f1c3bb29c575
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/passes HTTP/1.1 

Content-Type: application/json

{
    "code": "SLHY678993109PWE",
    "code_hash": "11f45e8377aad7bd38910f1a01b4ebda53605eb8",
    "otp": "2345",
    "pin": "0587",
    "value": 100,
    "contact_id": "CEEE83D6E0804A30966F684B0269AD91",
    "wallet_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4AD9C84FA60F9FE407140E20F707726A"
}
Passes Actions
PUT /passes/{id}/actions

Update the state or the expiration date for all passes of a single pass plan

Path variables

id
string GUID required

The unique identifier of the pass plan whose passes will be updated

Example:
103ddee2-cc09-e790-0f77-773ebb3b6c8c

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 to be applied

Enumeration:
ACTIVATE

Activate all passes

CANCEL

Cancel all passes

EXPIRY_DATE

Change the expiration date of all passes

Example:
CANCEL
expiration_date
integer epoch nullable

The new expiration date (if action is EXPIRY_DATE)

Example:
1592919625

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
PUT https://sandbox.crm.com/backoffice/v1/passes/103ddee2-cc09-e790-0f77-773ebb3b6c8c/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "EXPIRY_DATE",
    "expiration_date": 1592919625
}
Payment Intents

Payment Intents are created to handle the whole process of collecting the money using an online payment method and via a Payment Gateway. The payment intent present’s the intention of collecting a specific amount of money from the payment method, before removing that amount from the consumer’s bank account. The payment intent is created by a trusted server and never by a front-end for security purposes. The intent goes through several states

  • Requires confirmation: Customer confirms that he/she is willing to pay using a specific payment method and for a specific amount
  • Processing: Indicates that the payment gateway is in the process of collecting the money from the customer’s account and move it to the merchant’s account
  • Succeeded: Money successfully moved to the merchant’s account
POST /payment_intents
PUT /payment_intents/{id}/actions
GET /payment_intents
GET /payment_intents/{id}
Create Payment Intent
POST /payment_intents

Creates a new payment intent. Payment intents are created using a payment method (either of a contact or an Organisation) and the required amount. CRM.COM’s default behaviour is to put the requested amount On hold on the Payment Gateway’s side until the process that generated the intention is actually completed.

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

The contact’s/organisation’s payment method that will be used for the payment. If a payment method is not specified, then the contact’s primary payment method will be selected.

Example:
2ac0809f-ed91-4b68-b912-5bd6064d901e
amount
number required

The amount intended to be retrieved from the consumer’s payment method

Example:
9.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
confirm
boolean

Payment intent is created and confirmed in one go. Applicable when consumers have already opt in to automatic payments using their registered payment methods

Default:
false
Example:
true
capture
string required

Determines the money capturing method at the Payment Gateway side.

Enumeration:
ON_HOLD

Money put On hold until the process that tirggered the intention is completed. Money is captured at a later stage

Default:
ON_HOLD
Example:
ON_HOLD
entity
Object

Payment intent generated because a CRM.COM events requires funds to be taken from an online payment method. This entity represents that event.

id
string

The entity’s uniqe identifier

Example:
2ac0809f-ed91-4b68-b912-5bd6064d901e
type
string
Enumeration:
INVOICES
ORDERS
SERVICE_REQUESTS
PAYMENTS
TOP_UPS
Example:
INVOICES
period
Object

Payment Intent’s billing period. Applicable only when recurring billing process submits intents to collect money. The period indirectly shows that the intent was created because of Billing Run

from
integer

The date from which a subscription is billed

Example:
1654698334
to
integer

The date until which a subscription is billed

Example:
1657290334

Responses

201 Created
Body
Object
id
string

The unique identifier of the payment intent

Example:
2ac0809f-ed91-4b68-b912-5bd6064d901e
token
string

A unique key for the payment intent that should be used by front-end processes to process the payment intent since these processes should not have access to the payment intent as such. The client secret cannot modify the payment intent’s info.

state
string

The type of the event

Enumeration:
REQUIRES_CAPTURING
REJECTED
COMPLETED
PENDING
CANCELLED
Example:
REQUIRES_CAPTURING
error_code
string
error_description
string
Example 1
POST https://sandbox.crm.com/backoffice/v2/payment_intents HTTP/1.1 

Content-Type: application/json

{
    "payment_method_id": "2ac0809f-ed91-4b68-b912-5bd6064d901e",
    "amount": 9.99,
    "currency_code": "EUR",
    "confirm": "true",
    "capture": "ON_HOLD",
    "entity": {
        "id": "2ac0809f-ed91-4b68-b912-5bd6064d901e",
        "type": "INVOICES"
    },
    "period": {
        "from": 1654698334,
        "to": 1657290334
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "2ac0809f-ed91-4b68-b912-5bd6064d901e",
    "token": "",
    "state": "REQUIRES_CAPTURING",
    "error_code": "",
    "error_description": ""
}
Payment Intent Actions
PUT /payment_intents/{id}/actions

Updates an existing Payment intent. A Payment intent can only be updated while it’s in Pending or Requires Capturing states. Payment Intents can only be updated at server side using the intent’s identifier.

Path variables

id
string required

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

Change the intent’s state

Enumeration:
CONFIRM

Applicable only if the intent was not confirmed on its creation

CAPTURE

Applicable only if the intent’s state is REQUIRES_CAPTURING

CANCEL

Cancel the pament intent in case where the process that triggered its generation is also cancelled

REJECT

Payment Intent rejected by the payment gateway

COMPLETE

Payment intent is completed when funds are removed from the contact’s payment method successfully.

Example:
CAPTURE
entity
Object

The entity for which the Payment Intent was generated. The entity also implies the process that triggered the payment intention

type
string

The type of the event

Enumeration:
ORDERS
SUBSCRIPTIONS
TOP_UPS
PAYMENTS
Example:
ORDER
id
string

The entity’s identifier

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

Period

from
integer
to
integer

Responses

200 OK
Body
Object
id
string

The unique identifier of the payment intent

token
string

A unique key for the payment intent that should be used by front-end processes to process the payment intent since these processes should not have access to the payment intent as such. The client secret cannot modify the payetn intent’s info.

state
string

The type of the event

Enumeration:
REQUIRES_CAPTURING
REJECTED
COMPLETED
PENDING
CANCELLED
Example:
REQUIRES_CAPTURING
error_code
string
error_description
string
Example 1
PUT https://sandbox.crm.com/backoffice/v2/payment_intents/{id}/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "CAPTURE",
    "entity": {
        "type": "ORDER",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "",
    "client_secret": "",
    "state": "REQUIRES_CAPTURING",
    "error_code": "",
    "error_description": ""
}
List Payment Intents
GET /payment_intents

List all submitted payment intents

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
entity
string optional

The entity type for which the intent was created

Enumeration:
ORDERS
SUBSCRIPTIONS
TOP_UPS
PAYMENTS
Example:
ORDER
entity_id
string GUID optional

The entity for which the intent was created

Example:
The Orgnaisation for which the payent intent was created
created_date
string optional
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

token
string optional

The payment intent’s token

contact_id
string optional

The Contact for which the payent intent was created

organisation_id
string optional

The Organisation for which the payent intent was created

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

Payment intent identifier

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

Payment Intent requested amount

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

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
created_date
integer

Creation date

Example:
1653336788
state
string

The type of the event

Enumeration:
REQUIRES_CAPTURING
REJECTED
COMPLETED
PENDING
CANCELLED
Example:
REQUIRES_CAPTURING
entity
Object

The entity for which the intent was created

id
string

The entity’s unique identifier

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

The entity’s number or code

Example:
O001101011
type
string

The type of the event

Enumeration:
ORDERS
SUBSCRIPTIONS
TOP_UPS
PAYMENTS
Example:
ORDER
period
Object

Payment Intent’s billing period. Applicable only when recurring billing process submits intents to collect money. The period indirectly shows that the intent was created because of Billing Run

from
integer

The date from which a subscription is billed

Example:
1654698334
to
integer

The date until which a subscription is billed

Example:
1657290334
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/v2/payment_intents HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "amount": 9.99,
            "currency_code": "EUR",
            "payment_method": {
                "id": "",
                "identifier": "Visa *****1234 03/25"
            },
            "created_date": 1653336788,
            "state": "REQUIRES_CAPTURING",
            "entity": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "number": "O001101011",
                "type": "ORDER"
            },
            "period": {
                "from": 1654698334,
                "to": 1657290334
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Payment Intent
GET /payment_intents/{id}

Retrieves detailed information for a payment intent

Path variables

id
string required

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

Payment intent unique identifier

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

The requested amount to collect

Example:
9.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
state
string

The type of the event

Enumeration:
REQUIRES_CAPTURING
REJECTED
COMPLETED
PENDING
CANCELLED
Example:
REQUIRES_CAPTURING
capture
string

The intent’s capturing method

Enumeration:
ON_HOLD
Default:
ON_HOLD
Example:
ON_HOLD
token
string

The payment intent’s client secret that is used by front-end apps/portals to process it

Example:
6650493321000231
created_date
integer

When the payment intent was created

Example:
1653337233
cancelled_date
integer

Appicable only on cancelling the payment intent

Example:
1653337233
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
entity
Object

The entity for which the Payment Intent was created

type
string

The type of the event

Enumeration:
ORDERS
SUBSCRIPTIONS
TOP_UPS
PAYMENTS
Example:
ORDER
number
string

The entity’s number or code

Example:
O01001110
id
string GUID

The entity’s unique identifier

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

Applicable only if funds failed to be collected (payment intent’s state is Rejected)

Example:
Insufficient Funds
period
Object

Payment Intent’s billing period. Applicable only when recurring billing process submits intents to collect money. The period indirectly shows that the intent was created because of Billing Run

from
string

The date from which a subscription is billed

Example:
1654698334
to
string

The date until which a subscription is billed

Example:
1657290334
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/payment_intents/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "amount": 9.99,
    "currency_code": "EUR",
    "state": "REQUIRES_CAPTURING",
    "capture": "ON_HOLD",
    "token": "6650493321000231",
    "created_date": 1653337233,
    "cancelled_date": 1653337233,
    "payment_method": {
        "type": "CHEQUE",
        "identity": {
            "id": "",
            "identifier": "Visa *****1234 03/25"
        }
    },
    "entity": {
        "type": "ORDER",
        "number": "O01001110",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "failure_reason": "Insufficient Funds",
    "period": {
        "from": "1654698334",
        "to": "1657290334"
    }
}
Product Catalogue

Use CRM.COM Product Catalogue to set up a business’s Products, their prices as well as Promotions that can be applied on purchasing products.

Products

Products are the physical goods and services that a Business is selling. The product definition includes basic characteristics of the products as well its pricing information. Any products defined in CRM.COM can be sold through an order or an invoice. It’s crucial that Products are configured correctly, since they appear on customer-facing apps/portals for ordering purposes.

POST /products
PUT /products/{id}
DELETE /products/{id}
GET /products
GET /products/{id}
PUT /products/{id}/actions
POST /products/synchronisation
GET /products/{id}/dependencies
POST /products/{id}/media_groups
Create Product
POST /products

Create a new product. A single product can be created per Web API call. Through this API any product can be created; service or physical good, of any type, classification or composition. A single price can also be set for the product.

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

The product’s SKU which also has to be unique

Example:
ABC-123
name
string required

The product’s name. Its uniqueness depends on business rules

Example:
HD Decoder
type_id
string required

The product’s type

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

The product’s SKU in a third-party system. Also kept in CRM.COM for integration pursposes. It has to be unique across all external SKUs of products

Example:
P0000101
description
string

A description of the product

Example:
High definition decoder
validity_period
Object
type
string required

Shows when the product is available for sale. If not specified, then it defaults to Always valid

Enumeration:
ALWAYS_VALID

Always available for ordering

SPECIFIC_PERIOD

Available for ordering during a specific period of time. A product can have a single validity period at a time.

period
Object

The specific period of time during which the product is available for sale. Applicable and required if the validity setting is set to “Specific Period”

from
integer epoch

The date from which the product is avialable for ordering

Example:
1647499945
to
integer epoch

The date until which the product can be ordered. Can be left empty.

Example:
1679035944
family_id
string

The product’s family

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

The product’s brand

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

Applicable and mandatory only when creating Usage Services

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
categories
Array GUID

The supported categories for the product. A product can have multiple categories. Each ategory though must have a different path within Categories tree structure.

Unique items: YES
Object
id
string required

Unique identifier of a product category

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
pricing
Object
price_model
string required
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
currency_code
string required
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
tax_model
string required
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price
number required nullable

The product’s price. Mandatory but only for Flat prices. For the rest of the pricing models, multiple prices must be specified in price ranges

Example:
9.99
tiers
Array required nullable
Object
lower_tier
integer required

Starting tier level per price range

Example:
1
upper_tier
integer

The upper tier. For the last price range it should not be specified

Example:
5
price
number

The price of the tiered prices range

Example:
9.99
billing_period
Object

The billing period mapped to the specified price. Applicable and required for termed and ne-time services only.

duration
integer

The billing period’s duration

Example:
1
uot
string

The billing period’s unit of time

Enumeration:
HOURS
DAYS
WEEKS
MONTHS
YEARS
Example:
MONTHS
composition
Array

Applicable and required for products classified as Fixed/Flexible Bundles or Composite. At least one component must be specified

Object
item_type
string
Enumeration:
PRODUCT
TYPE
FAMILY
CATEGORY
COMPONENT_SET
Default:
PRODUCT
item_id
string

The unique identifier of the component’s entity (e.g. the product or product type identifier) as this is specified in “item_type”

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

Defines whether the component is mandatory or not. When mandatory, then the contact always gets the component by default on ordering it and there’s no option to remove it.

Default:
false
Example:
true
priority
integer

Priority shows the ordering of the components in UI/apps/portals for usability purposes

Example:
1
minimum_quantity
integer

Applicable for components that include more than one products like product types. It shows the minimum required number of items that must to be selected to be included in the product being ordered. Minimum quantity cannot be greater than the maximum allowed quantity

Example:
1
maximum_quantity
integer

Applicable for components that include more than one products like product types. It shows the maximum allowed number of items that must to be selected to be included in the product being ordered. Maximum quantity cannot be less than the minimum quantity

Example:
3
price_inclusive
boolean

When set to “true”, it shows that the item’s price is included within the bundle’s price. Therefore, cotnacts will not have to pay anything if included in the order and despite the fact that the item itself has its own price.

Example:
true
modifier_product_id
string

The product identifier of the product that is set as default modifier. Only products marked as modifiers can be set. Applicable only for item types that denote a group of products (like the product type or component set) and as long as within that group, there’s one or more products marked as “modifiers”. The default modifier must be one of these products. Use this setting to easily present to contacts a default option during th eordering flow.

Example:
56786309-7a21-8097-e107-6e9aec401840
characteristics
Array
Object
key
string required

The Characteristic’s key as this is specified on the product’s type

Example:
size
value
string required

The actual value of the attribute for this product. If Characteristic on the product type define a set of allowed values, then one of them must be set here

Example:
Small
device_characteristics
Array

Set of characteristics that will be inherited by devices created based on this product. Applicable only for traceable physical goods. Any configured variant attribute is available for selection. A value is not required since these characteristic values will be set when creating a device of this product.

Min items: 0
Unique items: YES
Object
key
string required

The chacteristic’s key. The value will be set on the devices only

Example:
static_ip, username, password
accessibility
Object

Defines which organisations can be access and use it

inherit_family
boolean required

Defines whether accessibility is inherited by product family or not

Example:
false
type
string required nullable

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array nullable

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Unique items: YES
Object
id
string GUID

The organisation identifier

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

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The product identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products HTTP/1.1 

Content-Type: application/json

{
    "sku": "ABC-123",
    "name": "HD Decoder",
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "external_sku": "P0000101",
    "description": "High definition decoder",
    "validity_period": {
        "type": "SPECIFIC_PERIOD",
        "period": {
            "from": 1647499945,
            "to": 1679035944
        }
    },
    "family_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "brand_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "measurement_unit_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "categories": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "pricing": {
        "price_model": "TIERED",
        "currency_code": "EUR",
        "tax_model": "TAX_INCLUSIVE",
        "price": 9.99,
        "tiers": [
            {
                "lower_tier": 1,
                "upper_tier": 5,
                "price": 9.99
            }
        ],
        "billing_period": {
            "duration": 1,
            "uot": "MONTHS"
        }
    },
    "composition": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "mandatory": true,
            "priority": 1,
            "minimum_quantity": 1,
            "maximum_quantity": 3,
            "price_inclusive": true,
            "modifier_product_id": "56786309-7a21-8097-e107-6e9aec401840"
        }
    ],
    "characteristics": [
        {
            "key": "size",
            "value": "Small"
        }
    ],
    "device_characteristics": [
        {
            "key": "static_ip, username, password"
        }
    ],
    "accessibility": {
        "inherit_family": "false",
        "type": "BUSINESS",
        "organisations": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
            }
        ]
    }
}
Update Product
PUT /products/{id}

Updates an existing product. The product’s SKU is the only piece of information that cannot be modified.

Path variables

id
string GUID required

The product identifier that will be updated

Example:
22386309-7a21-8097-e107-6e9aec401840

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 product’s name which has to comply with business rules in terms of uniqueness

Example:
HD Box
external_sku
string

The product’s SKU in a third-party system. Also kept in CRM.COM for integration pursposes. It has to be unique across all external SKUs of products

Example:
P000101
description
string

A description for the product

Example:
High-definition Set Top Box
validity_period
Object
type
string required

Shows when the product is available for sale. If not specified, then it defaults to Always valid

Enumeration:
ALWAYS_VALID

Always available for ordering

SPECIFIC_PERIOD

Available for ordering during a specific period of time. A product can have a single validity period at a time.

period
Object

The specific period of time during which the product is available for sale. Applicable and required if the validity setting is set to “Specific Period”

from
integer epoch

The date from which the product is avialable for ordering

Example:
1647499945
to
integer epoch

The date until which the product can be ordered. Can be left empty.

Example:
1679035944
type_id
string

The product’s updated product type. When changing the type for an existing product, restrictions are applied. The type can only change into another type of the same classification. In case of traceable physical goods, they cannot change into a type that marks them as non-traceable

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

The product family

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

The product brand

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

Applicable only when updating Usage Services

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
categories
Array GUID

The supported categories for the product

Object
id
string

The unique identifier of the product category

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
composition
Array
Object
item_type
string
Enumeration:
PRODUCT
TYPE
FAMILY
CATEGORY
COMPONENT_SET
Default:
PRODUCT
item_id
string

The unique identifier of the component’s entity (e.g. the product or product type identifier) as this is specified in “item_type”

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

Defines whether the component is mandatory or not. When mandatory, then the contact always gets the component by default on ordering it and there’s no option to remove it.

Default:
false
Example:
true
priority
integer

Priority shows the ordering of the components in UI/apps/portals for usability purposes

Example:
1
minimum_quantity
integer

Applicable for components that include more than one products like product types. It shows the minimum required number of items that must to be selected to be included in the product being ordered. Minimum quantity cannot be greater than the maximum allowed quantity

Example:
1
maximum_quantity
integer

Applicable for components that include more than one products like product types. It shows the maximum allowed number of items that must to be selected to be included in the product being ordered. Maximum quantity cannot be less than the minimum quantity

Example:
3
price_inclusive
boolean

When set to “true”, it shows that the item’s price is included within the bundle’s price. Therefore, cotnacts will not have to pay anything if included in the order and despite the fact that the item itself has its own price.

Example:
true
modifier_product_id
string

The product identifier of the product that is set as default modifier. Only products marked as modifiers can be set. Applicable only for item types that denote a group of products (like the product type or component set) and as long as within that group, there’s one or more products marked as “modifiers”. The default modifier must be one of these products. Use this setting to easily present to contacts a default option during th eordering flow.

Example:
56786309-7a21-8097-e107-6e9aec401840
characteristics
Array
Object
key
string required

The Characteristic’s key as this is specified on the product’s type

Example:
size
value
string required

The actual value of the attribute for this product. If Characteristic on the product type define a set of allowed values, then one of them must be set here

Example:
Small
device_characteristics
Array

Set of characteristics that will be inherited by devices created based on this product. Applicable only for traceable physical goods. Any variant attribute is avialable for selection. A value is not required.

Unique items: YES
Object
key
string required

The chacteristic’s key. The value will be set on the devices only

Example:
static_ip
accessibility
Object

Defines which organisations can be access and use it

inherit_family
boolean required

Defines whether accessibility is inherited by product family or not

Example:
false
type
string required nullable

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array nullable

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Unique items: YES
Object
id
string GUID

The organisation identifier

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

Responses

200 OK
Body
Object
id
string GUID

The identifier of the updated product

Example:
22386309-7a21-8097-e107-6e9aec401840
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/products/22386309-7a21-8097-e107-6e9aec401840 HTTP/1.1 

Content-Type: application/json

{
    "name": "HD Box",
    "external_sku": "P000101",
    "description": "High-definition Set Top Box",
    "validity_period": {
        "type": "SPECIFIC_PERIOD",
        "period": {
            "from": 1647499945,
            "to": 1679035944
        }
    },
    "type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "family_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "brand_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "measurement_unit_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "categories": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "composition": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "mandatory": true,
            "priority": 1,
            "minimum_quantity": 1,
            "maximum_quantity": 3,
            "price_inclusive": true,
            "modifier_product_id": "56786309-7a21-8097-e107-6e9aec401840"
        }
    ],
    "characteristics": [
        {
            "key": "size",
            "value": "Small"
        }
    ],
    "device_characteristics": [
        {
            "key": "static_ip"
        }
    ],
    "accessibility": {
        "inherit_family": "false",
        "type": "SPECIFIC_ORG",
        "organisations": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
            }
        ]
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "22386309-7a21-8097-e107-6e9aec401840"
}
Delete Product
DELETE /products/{id}

Deletes an existing product. A product can only be deleted if it was never ordered by a contact (i.e. never included in any financial tansaction like an Invoice). In the case of termed and one-time services, there’s no Active subscriber using the service to be deleted.

Path variables

id
string GUID required

The product identifier that will be deleted

Example:
22386309-7a21-8097-e107-6e9aec401840

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/products/22386309-7a21-8097-e107-6e9aec401840 HTTP/1.1 

HTTP/1.1 204 No Content 
List Products
GET /products

Returns the complete list of products within the product catalogue, along with their basic information and price. Variant products are excluded by default since they are listed within their Composite product.

Request parameters

type_id
string optional

Product type identifier

category_id
string optional

Product category identifier

brand_id
string optional

Product brand identifier

family_id
string optional

Product family identifier

fulfilled_by
string optional

The unique identifier of the organisation that will fulfill a contact’s request to purchase a product.

type_composition
array of Product Composition (enum) optional

The product’s composition as this is defined by its type

Collection format: csv
classification

The product’s classification

Collection format: csv
availability
string optional

If not speficied, then all products are returned regardless of their availability in various organisations

Enumeration:
ENABLED

Return only products available for sale in various merchants/venues

DISABLED

Return products temporarly unavialable for sale in various merchants/venues

include_creatives
boolean optional

Include Creatives in Response

is_provisionable
boolean optional

Filters products based on whether are provisionable or not

Example:
true
tag_ids
array of string optional

The tag id’s of the products for filtering

Collection format: csv
include_tags
boolean optional

Defines whether tags should be retrieved or not

Example:
false
is_modifier
boolean optional

If specified, then only products marked as modifiers are returned. A product is marked as modifier through its type. If not specified, then it’s ignored and filtering is not applied.

Default:
false
Example:
false
validity_date
string optional

The date on which a product is sold/added as a charge or a service should also be within its validity date. Applicable only when listing products to get the services available to be ordered, added as charges or included in a subscription either as a new addition or through a service change. Filter based on the validity 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. validity_date[gte]=1618395497&validity_date[lt]=1618395497).

Enumeration:
validity_date[gt]

Returns results where the validity date is greater than this value

validity_date[gte]

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

validity_date[lt]

Returns results where the validity date is less than this value

validity_date[lte]

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

search_value
string optional

Search for a product using its SKU, its name or description

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
sales_model_id
array of string optional

The sales model is the unique identifier used to calssify a product’s prcie

Collection format: multi
include_stock
boolean optional

Defines whether stock information will be returned or not

Example:
true

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

Product’s unique identifier

Example:
4ec0809f-ed91-4b68-b912-5bd6064d901e
sku
string

Product SKU

Example:
ABC12345
name
string

Product name

Example:
Base TV
description
string

Product description

Example:
Basic TV & myFlix
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
type_composition
string
Enumeration:
FLAT
FIXED_BUNDLE
FLEXIBLE_BUNDLE
COMPOSITE
Example:
FLAT
componens
integer

Number of component options for this product. Applicable for Fix/Flex bundles as well as Composite products

Example:
2
characteristics
integer

Number of characteristics set up for this product

Example:
2
variants
integer

Number of variant products. Applicable only for Composite products

Example:
9
prices
integer

Number of prices set up for this product

Example:
3
availability
string

Shows whether the product is enabled or not at the organisation that fulfills this order. Available and used only when a “fuflfilled by” organisation is specified that indicates that products are listed because of the ordering flow.

Enumeration:
ENABLED
DISABLED
Example:
ENABLED
is_variant
boolean

Shows if the retrieved product is a variation of a Composite product

Example:
false
is_stockable
boolean

Defines whether the product is a stockable product

Example:
true
can_be_rented
boolean

The product has at least one price of type Rental. Applicable only for traceable physical goods since they are the only ones that can be givedn to contacts as Rentals

Example:
true
in_stock
boolean

Applicable only for stockable physical goods

Example:
true
is_provisionable
boolean

Defines whether the product is provisionable or not

Example:
false
pricing
Object
id
string

The price’s uniaue identifier

Example:
4ec0809f-ed91-4b68-b912-5bd6064d901e
price_model
string
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price
number

The product’s price. For Tiered/Volume and Stairstep pricing models, the first range’s price is returned.

Example:
9.99
tiers
Object

Available only Tiered, Volume and Stairstep pricing models. Only the first tier range is returned that has the returned price

upper_tier
integer

The first range’s upper tier. The lower tier is always set to 1.

Example:
5
number_of_tiers
integer

Total numebr of tiered prices set up

Example:
3
billing_period
Object

The billing period mapped to the specified price. Applicable only for termed and one-time services only.

duration
integer

The billing period’s duration

Example:
1
uot
string

The billing period’s unit of time

Enumeration:
HOURS
DAYS
WEEKS
MONTHS
YEARS
Example:
MONTHS
measurement_unit
Object

Aplicabe only for Usage service to show the unit per which the price is applied

id
string

Measurement unit identifier

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

Measurement unit name

Example:
minute
display_name
string

Display name

Example:
mins.
sales_model
Object

The sales model is the unique identifier used to calssify a product’s prcie

id
string

The sales model unique identifier

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
name
string

The sales model name which has to be unique across all sales models

Example:
Retail
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
owner
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
stock_information
Object

The product stock information (returned only if include_stock is set to true)

stock_balance
integer

The number of items that are in the warehouse (including reserved ones)

Example:
12
reserved
integer

The number of items that are reserved

Example:
1
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
Example 1
GET https://sandbox.crm.com/backoffice/v2/products HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4ec0809f-ed91-4b68-b912-5bd6064d901e",
            "sku": "ABC12345",
            "name": "Base TV",
            "description": "Basic TV & myFlix",
            "classification": "TRACEABLE_PHYSICAL_GOOD",
            "type_composition": "FLAT",
            "componens": 2,
            "characteristics": 2,
            "variants": 9,
            "prices": 3,
            "availability": "ENABLED",
            "is_variant": "false",
            "is_stockable": "true",
            "can_be_rented": true,
            "in_stock": "true",
            "is_provisionable": "false",
            "pricing": {
                "id": "4ec0809f-ed91-4b68-b912-5bd6064d901e",
                "price_model": "TIERED",
                "currency_code": "EUR",
                "tax_model": "TAX_INCLUSIVE",
                "price": 9.99,
                "tiers": {
                    "upper_tier": 5,
                    "number_of_tiers": 3
                },
                "billing_period": {
                    "duration": 1,
                    "uot": "MONTHS"
                },
                "measurement_unit": {
                    "id": "4ec0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "minute",
                    "display_name": "mins."
                },
                "sales_model": {
                    "id": "caf332bc-4e90-47b5-a05d-142b264897b9",
                    "name": "Retail"
                }
            },
            "type": {
                "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
                "name": "Internal Transaction"
            },
            "owner": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "creatives": [
                {
                    "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                    "usage_type": "APP_LOGO",
                    "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"
                        }
                    ]
                }
            ],
            "stock_information": {
                "stock_balance": 12,
                "reserved": 1
            },
            "tags": {
                "id": "609a369e-3f10-492a-8332-679ecbe56b65",
                "name": "Maintenance",
                "colour": "FR547F"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4ec0809f-ed91-4b68-b912-5bd6064d901e",
            "sku": "ABC12345",
            "name": "Base TV",
            "description": "Basic TV & myFlix",
            "classification": "TRACEABLE_PHYSICAL_GOOD",
            "type_composition": "FLAT",
            "componens": 2,
            "characteristics": 2,
            "variants": 9,
            "prices": 3,
            "availability": "ENABLED",
            "is_variant": "false",
            "is_stockable": "true",
            "can_be_rented": true,
            "in_stock": "true",
            "is_provisionable": "false",
            "pricing": {
                "id": "4ec0809f-ed91-4b68-b912-5bd6064d901e",
                "price_model": "TIERED",
                "currency_code": "EUR",
                "tax_model": "TAX_INCLUSIVE",
                "price": 9.99,
                "tiers": {
                    "upper_tier": 5,
                    "number_of_tiers": 3
                },
                "billing_period": {
                    "duration": 1,
                    "uot": "MONTHS"
                },
                "measurement_unit": {
                    "id": "4ec0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "minute",
                    "display_name": "mins."
                },
                "sales_model": {
                    "id": "caf332bc-4e90-47b5-a05d-142b264897b9",
                    "name": "Retail"
                }
            },
            "type": {
                "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
                "name": "Internal Transaction"
            },
            "owner": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "creatives": [
                {
                    "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                    "usage_type": "APPLE_LOGO_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"
                        }
                    ]
                }
            ],
            "stock_information": {
                "stock_balance": 12,
                "reserved": 1
            },
            "tags": {
                "id": "609a369e-3f10-492a-8332-679ecbe56b65",
                "name": "Maintenance",
                "colour": "FR547F"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Product
GET /products/{id}

Retrieve detailed information for a specific product. Information of a single product can be retrieved per Web API call.

Path variables

id
string required

The unique identifier of the product to be retrieved

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

Product unique identifier

Example:
7CD9C84FA60F9FE407140E20F707726A
sku
string

Product SKU

Example:
ABC12345
name
string

Product name

Example:
Base TV
description
string

Product description

Example:
Basic TV & myFlix
external_sku
string

The product’s SKU in a third-party system. Also kept in CRM.COM for integration pursposes. It has to be unique across all external SKUs of products

Example:
P000101
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
type_composition
string
Enumeration:
FLAT
FIXED_BUNDLE
FLEXIBLE_BUNDLE
COMPOSITE
Example:
FLAT
is_variant
boolean

Defines if the product is a variation of a composite product

Example:
true
is_stockable
boolean

Defines whether the product is a stockable product

Example:
true
validity_period
Object
type
string required

Shows when the product is available for sale. If not specified, then it defaults to Always valid

Enumeration:
ALWAYS_VALID

Always available for ordering

SPECIFIC_PERIOD

Available for ordering during a specific period of time. A product can have a single validity period at a time.

period
Object

The specific period of time during which the product is available for sale. Applicable and required if the validity setting is set to “Specific Period”

from
integer epoch

The date from which the product is avialable for ordering

Example:
1647499945
to
integer epoch

The date until which the product can be ordered. Can be left empty.

Example:
1679035944
included_in_bundle
boolean

Indicates whether the product can also be sold as a bundle

Example:
true
in_stock
boolean

Shows whether the product is in stock or not. Applicable only for stockable physical goods.

Example:
true
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
family
Object

The product’s family

id
string

Family identifier

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

Family name

Example:
Hardware products
brand
Object

Product Brand

id
string

Brand identifier

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

Brand name

Example:
Samsung
categories
Array

The product categories. A product migth have multiple catagories

Object

Details about the event classification

id
string GUID

The category identifier

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

The category name

Example:
Delivery Purchase
measurement_unit
Object

The measurement unit of the product. Applicable for usage services only

id
string

The unique identifier of the measurement unit

Example:
895e8910-ebc2-d6c5-fb49-84bf99176171
name
string

The name of the measurement unit

Example:
Call minutes
display_name
string

The display name of the measurement unit

Example:
min.
composition
Array

A product’s composition i.e. other products or products of a type/family/component set that can be sold as part of the product. Applicable only or Fixed/Flexible Bundles and Composite products.

Object
item_type
string
Enumeration:
PRODUCT
TYPE
FAMILY
CATEGORY
COMPONENT_SET
Default:
PRODUCT
item_id
string

The unique identifier of the entity specified in “item_type”

Example:
895e8910-ebc2-d6c5-fb49-84bf99176171
sku
string

SKU of the product (only when a product is specified in the composition)

Example:
STB001
name
string

Name of product or product type/family/component set depending on item_type selection

Example:
Decoder
mandatory
boolean

Shows if the specified item is always included in the composition and can never be removed.

Example:
true
minimum_quantity
integer

Minimum required quantity. Applicalbe if the item type is a product type/family/category or component set

Example:
1
maximum_quantity
integer

Maximum required quantity. Applicalbe if the item type is a product type/family/category or component set

Example:
5
price_inclusive
boolean

The component’s price is included in the bundle/composite product’s price or not

Example:
true
priority
integer

The priority of the composition

Example:
1
default_modifer
Object

The default modifier of this composition. Applicable only if the item is additionally classified as a modifier. This default modifier is selected by default on ordering

id
string

The identifier of the product set as default modifier

Example:
23458910-ebc2-d6c5-fb49-84bf99176171
name
string

The name of the product set as default modifier

Example:
Premium Blend
characteristics
Array

List of product characteristics and their values

Object
id
string

Characteristic identifier

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

Key name of the attribute

Example:
colour
value
string

Attribute value

Example:
RED
mandatory
boolean

Defines whether the attribute is mandatory (and cannot be removed from the product) or not

Example:
true
label
string

Attribute’s label for UI purposes

Example:
Red
priority
integer

The priority of the characteristic attribute.

Example:
1
composite_product
Object

Applicable only for variant product to present their Composite product

id
string

Composite product identifier

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

Composite product SKU

Example:
CLO001
name
string

Composite product name

Example:
Trousers
device_characteristics
Array

Set of characteristics that will be inherited by devices created based on this product. Applicable only for traceable physical goods. Any variant attribute is avialable for selection. A value is not required.

Unique items: YES
Object
key
string

The chacteristic’s key. The value will be set on the devices only

Example:
static_ip
label
string

Thecharacteristic’s label

Example:
Static IP Address
accessbility
Object

Defines how the segment can be accessed from business network

inherit_family
boolean

Defines whether accessibility is inherited by product family or not

Example:
true
type
string

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Object
id
string GUID

The organisation identifier

Example:
feedcd4b-8470-04b3-73bf-9ce9a4340822
name
string

The organisation name

Example:
CRM
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
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
GET https://sandbox.crm.com/backoffice/v2/products/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "7CD9C84FA60F9FE407140E20F707726A",
    "sku": "ABC12345", 
    "name": "Base TV",
    "description": "Basic TV & myFlix",
    "external_sku": "P000101",
    "classification": "TRACEABLE_PHYSICAL_GOOD",
    "type_composition": "FLAT",
    "is_variant": true,
    "is_stockable": true,
    "validity_period": {
        "type": "ALWAYS_VALID",
        "period": {
            "from": 1647499945,
            "to": 1679035944
        }
    },
    "included_in_bundle": true,
    "in_stock": "true",
    "type": {
        "id": "c01ecd1b-ff1e-35c2-7236-59ae20339c78",
        "name": "Internal Transaction"
    },
    "family": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "name": "Hardware products"
    },
    "brand": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "name": "Samsung"
    },
    "categories": [
        {
            "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
            "name": "Delivery Purchase"
        }
    ],
    "measurement_unit": {
        "id": "895e8910-ebc2-d6c5-fb49-84bf99176171",
        "name": "Call minutes",
        "display_name": "min."
    },
    "composition": [
        {
            "item_type": "PRODUCT",
            "item_id": "895e8910-ebc2-d6c5-fb49-84bf99176171",
            "sku": "STB001",
            "name": "Decoder",
            "mandatory": true,
            "minimum_quantity": 1,
            "maximum_quantity": 5,
            "price_inclusive": true,
            "priority": 1,
            "default_modifer": {
                "id": "23458910-ebc2-d6c5-fb49-84bf99176171",
                "name": "Premium Blend"
            }
        }
    ],
    "characteristics": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "key": "colour",
            "value": "RED",
            "mandatory": true,
            "label": "Red",
            "priority": 1
        }
    ],
    "composite_product": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "sku": "CLO001",
        "name": "Trousers"
    },
    "device_characteristics": [
        {
            "key": "static_ip",
            "label": "Static IP Address"
        }
    ],
    "accessbility": {
        "inherit_family": "true",
        "type": "SPECIFIC_ORG",
        "organisations": [
            {
                "id": "feedcd4b-8470-04b3-73bf-9ce9a4340822",
                "name": "CRM"
            }
        ]
    },
    "creatives": [
        {
            "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
            "usage_type": "APPLE_LOGO_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"
                }
            ]
        }
    ]
}
Product Actions
PUT /products/{id}/actions

Perform actions on a product by enabling or disabling the product at various organisations and/or supply methods. Only enabled products are available for ordering at the specified organisations.

Path variables

id
string required

The product’s unique identifier

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

Action to be performed

Enumeration:
ENABLE

Product available for sale

DISABLE

Product temporarily unavailable for sale

Example:
DISABLE
organisations
Array

The organisation identifiers for which the product action is applied.

Object
id
string GUID

The organisation at which the product is enabled/disabled.

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

Enable or disable the product for a single supply method.

string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY

Responses

200 OK
Body
Object
id
string

The product identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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 2
PUT https://sandbox.crm.com/backoffice/v2/products/{id}/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "DISABLE",
    "organisations": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "supply_method": [
                "DELIVERY"
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Synchronise Products
POST /products/synchronisation

Performs product synchronisation between the products that exist in a third-party system and prodcuts configured in CRM.COM, having the 3rd-party system’s information as the main one and CRM.COM as the system to ge tin sync. Via this sychronisation process

  • New products are created in CRM.COM along with their required configuration if this does not exist. For example new product types etc might be created
  • Existing products in CRM.COM are updated using the input information.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
products
Array

Details about the products to synchornise

Object
sku
string required

The product sku

Example:
SKU0001
external_sku
string

The product’s SKU in the third-party system. Also kept in CRM.COM for integration pursposes. It has to be unique across all external SKUs of products

Example:
P000101
name
string nullable

The product name

Example:
Iced Latte
description
string nullable

The product description

Example:
Product Description
type
Object nullable

The product type (if type is provided, id or name should be specified)

id
string GUID required nullable

The product type identifier

Example:
d94ef0f0-59a1-aa28-b49d-0d1edcc864fe
name
string required nullable

The product type name

Example:
Cold
brand
Object nullable

Details about the product brand (if brand is provided, id or name should be specified)

id
string GUID required nullable

The product brand identifier

Example:
13b265cb-a607-5d22-1ce5-52ae3585fcdc
name
string required nullable

The product brand name

Example:
Fresh Brew Inc
family
Object nullable

Details about the product family (if family is provided, id or name should be specified)

id
string GUID required nullable

The product family identifier

Example:
21f9ed6d-ff93-afce-c7f0-b1e96e6b8a04
name
string required nullable

The product family name

Example:
Homebrew
categories
Array nullable

Details about the product categories (for each provided category, id or name or code should be specified)

Object
id
string GUID required nullable

The product category identifier

Example:
070631e8-c34b-9dd7-24e7-074cc5b3a7e8
name
string required nullable

The product category name

Example:
Drinks
code
string required nullable

The product category code

Example:
500
validity_period
Object nullable

Defines the period that the product will be valid (if not specified, will be always valid)

from_date
integer epoch nullable

The date from which the product will be valid

Example:
11598357038
to_date
integer epoch nullable

The date up to which the product will be valid

Example:
1598357038
tax_rate
Object nullable

Details about the product tax rate (id or name should be specified)

id
string GUID required nullable

The tax rate identifier

Example:
d1b59cfd-f3dd-1ae0-e96f-935d51ae66b0
name
string required nullable

The tax rate name

Example:
5% Tax
pricing
Object nullable

Details about the product pricing

price_model
string
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price
number

The price (amount). Mandatory only for Flat rate models

Example:
9.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
tiers
Array nullable

Details about the pricing tiering (required for Tiered/Volume/Stairstep based rate models). Mandatory and required for these 3 rate models. At leas two tiers must be provided

Object
lower_tier
integer required

The lowest tier

Example:
1
upper_tier
integer

The top tier. Not required for the last tier range

Example:
5
price
number required

The tier price (amount)

Example:
8.99
characteristics
Array nullable

Details about the product characteristics

Object
key
string required

The characteristic key

Example:
size
value
string required

The characteristics value

Example:
Medium
components
Array nullable

Details about the product components (applicable if the synced product is variant attribute or bundle)

Object
sku
string required nullable

The component product sku that will be used as component (sku or family, category or product type should be specified)

Example:
CPSKU01
family
Object

The component product family that will be used as component (sku, family, category or product type should be specified)

id
string GUID required nullable

The product family identifier (id or name should be specified)

Example:
ab93d2e9-f6b4-ca48-15e1-bff3a468ab4a
name
string required nullable

The product family name (id or name should be specified)

Example:
Dry
type
Object

The component product type that will be used as component (sku or family, category or product type should be specified)

id
string GUID required nullable

The product type identifier (id or name should be specified)

Example:
ab93d2e9-f6b4-ca48-15e1-bff3a468ab4a
name
string required nullable

The product type identifier (id or name should be specified)

Example:
Extras
category
Object

The component product category that will be used as component (sku or family, category or product type should be specified)

id
string GUID required nullable

The product category identifier (id, name or code should be specified)

Example:
ab93d2e9-f6b4-ca48-15e1-bff3a468ab4a
name
string required nullable

The product category name (id, name or code should be specified)

Example:
Milks
code
string required nullable

The product category code (id, name or code should be specified)

Example:
500
inclusive
boolean nullable

Defines if pricing is inclusive

Default:
false
Example:
true
min_amount
integer nullable

The maximum number of components that should be added (applicable only for product family and type)

Default:
0
max_amount
integer nullable

The maximum number of components that should be added (applicable only for product family and type)

Default:
0
mandatory
boolean nullable

Defines whether the component must be added to the product or not

Default:
false
Example:
true
modifier_product_id
string nullable

The identifier of the product that is set as default modifier

Example:
56786309-7a21-8097-e107-6e9aec401840
measurement_unit
Object nullable

The product’s measurement unit. A uique name should be specified

id
string GUID nullable

The measurement unit identifier

Example:
014a8d1a-62f4-2b0d-84af-16c298a76fe9
name
string nullable

The measurement unit name

Example:
Liters
main_product_sku
string required nullable

The unique product sku of variant_attribute (required if the synced product is a variant attribute of another product)

Example:
SKU000A
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
owner
Object nullable

Defines the organisation that owns such product (if not specified, defaults to business)

organisation
Object required nullable

Identify the owner based on organisation

id
string GUID required

The organisation identifier

Example:
4e4fdde4-f572-0d3b-5974-f69b819aeaaf
tap
Object required nullable

Identify the owner based on organisation’s tap

id
string GUID required nullable

The tap identifier

Example:
fac5973a-4f4c-a2ec-b56f-4d16b76aa22f
code
string required nullable

The tap code

Example:
0000257024

Responses

200 200

OK

Body
Object
id
string GUID

A unique identifier of the Web API call which can be used for triggering the webhook and relate the api request to the webhook request (enables integrator to match the api request with the webhook request).

Example:
a781bbc1-9067-c384-52fe-43586f89110a
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

Synchronise stand-alone POS products

POST https://sandbox.crm.com/backoffice/v2/products/synchronisation HTTP/1.1 

Content-Type: application/json

{
    "products": [
        {
            "sku": "SKU0001",
            "external_sku": "P000101",
            "name": "Iced Latte",
            "description": "Product Description",
            "type": {
                "id": "d94ef0f0-59a1-aa28-b49d-0d1edcc864fe",
                "name": "Cold"
            },
            "brand": {
                "id": "13b265cb-a607-5d22-1ce5-52ae3585fcdc",
                "name": "Fresh Brew Inc"
            },
            "family": {
                "id": "21f9ed6d-ff93-afce-c7f0-b1e96e6b8a04",
                "name": "Homebrew"
            },
            "categories": [
                {
                    "id": "070631e8-c34b-9dd7-24e7-074cc5b3a7e8",
                    "name": "Drinks",
                    "code": "500"
                }
            ],
            "validity_period": {
                "from_date": 11598357038,
                "to_date": 1598357038
            },
            "tax_rate": {
                "id": "d1b59cfd-f3dd-1ae0-e96f-935d51ae66b0",
                "name": "5% Tax"
            },
            "pricing": {
                "price_model": "TIERED",
                "tax_model": "TAX_INCLUSIVE",
                "price": 9.99,
                "currency_code": "EUR",
                "tiers": [
                    {
                        "lower_tier": 1,
                        "upper_tier": 5,
                        "price": 8.99
                    }
                ]
            },
            "characteristics": [
                {
                    "key": "size",
                    "value": "Medium"
                }
            ],
            "components": [
                {
                    "sku": "CPSKU01",
                    "family": {
                        "id": "ab93d2e9-f6b4-ca48-15e1-bff3a468ab4a",
                        "name": "Dry"
                    },
                    "type": {
                        "id": "ab93d2e9-f6b4-ca48-15e1-bff3a468ab4a",
                        "name": "Extras"
                    },
                    "category": {
                        "id": "ab93d2e9-f6b4-ca48-15e1-bff3a468ab4a",
                        "name": "Milks",
                        "code": "500"
                    },
                    "inclusive": true,
                    "min_amount": 1,
                    "max_amount": 1,
                    "mandatory": true,
                    "modifier_product_id": "56786309-7a21-8097-e107-6e9aec401840"
                }
            ],
            "measurement_unit": {
                "id": "014a8d1a-62f4-2b0d-84af-16c298a76fe9",
                "name": "Liters"
            },
            "main_product_sku": "SKU000A",
            "creatives": [
                {
                    "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                    "usage_type": "DIRECT_SALE_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"
                        }
                    ]
                }
            ],
            "owner": {
                "organisation": {
                    "id": "4e4fdde4-f572-0d3b-5974-f69b819aeaaf"
                },
                "tap": {
                    "id": "fac5973a-4f4c-a2ec-b56f-4d16b76aa22f",
                    "code": "0000257024"
                }
            }
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a781bbc1-9067-c384-52fe-43586f89110a"
}
Get Product Dependencies
GET /products/{id}/dependencies

Returns a list of products on which the specified product has a dependency to

Path variables

id
string required

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

Dependency rule identifier

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

The entity at which the product has a dependency to. A product has a dependency to either another product or products of a specific type

Enumeration:
PRODUCT
TYPE
Example:
PRODUCT
item_id
string

Identifier of the dependent product/type

Example:
MOV001
name
string

Product or type name

Example:
Movies
type
string

Dependency type. A product requires or cannot coexist with the dependency’s product

Enumeration:
REQUIRES
CANNOT_COEXIST
Example:
REQUIRES
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
operator
string

Shows if the product requires all or at least ne of the dependaency products

Enumeration:
ANY
ALL
Example:
ANY
dependencies
Array

List of products or product types at which the product has a dependency to

Object
item_type
string required

Dependency on a product or a product type

Enumeration:
PRODUCT
TYPE
Example:
PRODUCT
item_id
string required

The identifier of a product or the type depending on the item_type

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

The name of the dependent product or type

Example:
GIGA Gold
products
Array

List of products to which there’s a dependency.

Unique items: YES
Object
id
string

Product identifier

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

Product SKU

Example:
ABC1234
name
string

Product name

Example:
Router
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/products/{id}/dependencies HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        { 
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "item_type": "PRODUCT",
            "item_id": "MOV001",
            "name": "Movies",
            "type": "REQUIRES",
            "classification": "TRACEABLE_PHYSICAL_GOOD",
            "operator": "ANY",
            "dependencies": [
                {
                    "item_type": "PRODUCT",
                    "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "GIGA Gold",
                    "products": [
                        {
                            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                            "sku": "ABC1234",
                            "name": "Router"
                        }
                    ]
                }
            ]
        }
    ]
}
Product Media Groups
POST /products/{id}/media_groups

Link a product with one or many media groups

Path variables

id
string GUID required

The product (identifier) that media groups will be set

Example:
3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb

Notes

MEDIA UPLOAD

Uploading media for a product requires the execution of the following APIs

  1. Create new Media Group
  2. Create 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

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

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
POST https://sandbox.crm.com/backoffice/v1/products/3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb/media_groups HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

[
    {
        "media_group_id": "3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb"
    }
]

HTTP/1.1 200 OK
Allowance

Product allowance shows which usage services and/or non-traceable physical goods contact can consume withni a period of time, for example during a billing cycle. Optonally, usage limits can be set up that define how much can be consumed. Allowance is set up per price and only for prices of termed and one-time services.

POST /prices/{id}/allowance
PUT /prices/{id}/allowance
GET /prices/{id}/allowance
Add Allowance
POST /prices/{id}/allowance

Adds allowance settings for one of the product’s prices. Thi smust be a price of a either a termed or a one-time service since usage can only be consumed via these services. As a result the same service might have multiple allowances, one or each one of its prices. Accumulated usage limis and/or Products allowance must be specified.

Path variables

id
string required

The price identifier

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

Request body

Object
accumulated_allowance
Object

How much money can be spent on consuming any of the allowed usage service/non-traceable physical good within a period. Cash limits are specified in the price’s currency

cash_limits
Object
per_transaction
number

Maximum allowed amount of money that can be spent on usage per transaction

Example:
9.99
per_day
number

Maximum allowed amount of money that can be spent on usage per day

Example:
19.99
per_billing_cycle
number

Maximum allowed amount of money that can be spend on consuming usage per billing cycle

Example:
59.99
products_allowance
Array

List of allowance products includes the prodcut that can be consumed as part of subscribing to a service. Only usage servces and nono-traceable physical goods can be specified.

Object
item_type
string required

The product that can be consumed

Enumeration:
PRODUCT
TYPE
FAMILY
Example:
PRODUCT
item_id
string required

The unique identifier of the item type.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
cash_limits
Object
per_transaction
number

Maximum allowed amount of money that can be spent on usage per transaction

Example:
9.99
per_day
number

Maximum allowed amount of money that can be spent on usage per day

Example:
19.99
per_billing_cycle
number

Maximum allowed amount of money that can be spend on consuming usage per billing cycle

Example:
59.99
usage_limits
Object
per_transaction
number

Maximum allowed usage amount per transaction

Example:
9.99
per_day
number

Maximum allowed usage amount per day

Example:
19.99
per_billing_cycle
number

Maximum allowed usage amount per billing cycle

Example:
59.99
organisations
Array

List of Organisations (merchant/venues or service providers/points) at which usage can be consumed.

Object
id
string

The organisation’s unique identifier

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

Responses

201 Created
Body
Object
id
string

The product price’s unique identifier

Example:
8c54d563-b991-4b76-8a83-557c08166f95
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/prices/4dc0809f-ed91-4b68-b912-5bd6064d901e/allowance HTTP/1.1 

Content-Type: application/json

{
    "accumulated_allowance": {
        "cash_limits": {
            "per_transaction": 9.99,
            "per_day": 19.99,
            "per_billing_cycle": 59.99
        } 
    },
    "products_allowance": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "cash_limits": {
                "per_transaction": 9.99,
                "per_day": 19.99,
                "per_billing_cycle": 59.99
            },
            "usage_limits": {
                "per_transaction": 9.99,
                "per_day": 19.99,
                "per_billing_cycle": 59.99
            }
        }
    ],
    "organisations": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}
Update Allowance
PUT /prices/{id}/allowance

Adds allowance for one of the product’s prices

Path variables

id
string required

The price’s unique identifier

Request body

Object
accumulated_allowance
Object

How much money can be spent on consuming any of the allowed usage service/non-traceable physical good within a period. Cash limits are specified in the price’s currency

cash_limits
Object
per_transaction
number

Maximum allowed amount of money that can be spent on usage per transaction

Example:
9.99
per_day
number

Maximum allowed amount of money that can be spent on usage per day

Example:
19.99
per_billing_cycle
number

Maximum allowed amount of money that can be spend on consuming usage per billing cycle

Example:
59.99
products_allowance
Array

List of allowance products includes the prodcut that can be consumed as part of subscribing to a service. Only usage servces and nono-traceable physical goods can be specified.

Object
item_type
string required

The product that can be consumed

Enumeration:
PRODUCT
TYPE
FAMILY
Example:
PRODUCT
item_id
string required

The unique identifier of the item type.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
cash_limits
Object
per_transaction
number

Maximum allowed amount of money that can be spent on usage per transaction

Example:
9.99
per_day
number

Maximum allowed amount of money that can be spent on usage per day

Example:
19.99
per_billing_cycle
number

Maximum allowed amount of money that can be spend on consuming usage per billing cycle

Example:
59.99
usage_limits
Object
per_transaction
number

Maximum allowed usage amount per transaction

Example:
9.99
per_day
number

Maximum allowed usage amount per day

Example:
19.99
per_billing_cycle
number

Maximum allowed usage amount per billing cycle

Example:
59.99
organisations
Array

List of Organisations (merchant/venues or service providers/points) at which usage can be consumed.

Object
id
string

The organisation’s unique identifier

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

Responses

200 OK
Body
Object
id
string

The product price’s unique identifier

Example:
8c54d563-b991-4b76-8a83-557c08166f95
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/prices/{id}/allowance HTTP/1.1 

Content-Type: application/json

{
    "accumulated_allowance": {
        "cash_limits": {
            "per_transaction": 9.99,
            "per_day": 19.99,
            "per_billing_cycle": 59.99 
        }
    },
    "products_allowance": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "cash_limits": {
                "per_transaction": 9.99,
                "per_day": 19.99,
                "per_billing_cycle": 59.99
            },
            "usage_limits": {
                "per_transaction": 9.99,
                "per_day": 19.99,
                "per_billing_cycle": 59.99
            }
        }
    ],
    "organisations": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}
Get Allowance
GET /prices/{id}/allowance

Returns usage allowance of a specific product price.

Path variables

id
string required

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

How much money can be spent on consuming any of the allowed usage service/non-traceable physical good within a period. Cash limits are specified in the price’s currency

cash_limits
Object
per_transaction
number

Maximum allowed amount of money that can be spent on usage per transaction

Example:
9.99
per_day
number

Maximum allowed amount of money that can be spent on usage per day

Example:
19.99
per_billing_cycle
number

Maximum allowed amount of money that can be spend on consuming usage per billing cycle

Example:
59.99
products_allowance
Array

List of allowance products includes the prodcut that can be consumed as part of subscribing to a service. Only usage servces and nono-traceable physical goods can be specified.

Object
item_type
string required

The product that can be consumed

Enumeration:
PRODUCT
TYPE
FAMILY
Example:
PRODUCT
item_id
string required

The unique identifier of the item type.

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

The item type’s name

Example:
Data
sku
string

The product’s SKU.Available only when item type is set to Product

Example:
D001
cash_limits
Object
per_transaction
number

Maximum allowed amount of money that can be spent on usage per transaction

Example:
9.99
per_day
number

Maximum allowed amount of money that can be spent on usage per day

Example:
19.99
per_billing_cycle
number

Maximum allowed amount of money that can be spend on consuming usage per billing cycle

Example:
59.99
usage_limits
Object
per_transaction
number

Maximum allowed usage amount per transaction

Example:
9.99
per_day
number

Maximum allowed usage amount per day

Example:
19.99
per_billing_cycle
number

Maximum allowed usage amount per billing cycle

Example:
59.99
organisations
Array

List of Organisations (merchant/venues or service providers/points) at which usage can be consumed.

Object
id
string

The organisation’s unique identifier

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

The organisation’s name

Example:
Good Burgers
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/prices/{id}/allowance HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "accumulated_allowance": { 
        "cash_limits": {
            "per_transaction": 9.99,
            "per_day": 19.99,
            "per_billing_cycle": 59.99
        }
    },
    "products_allowance": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Data",
            "sku": "D001",
            "cash_limits": {
                "per_transaction": 9.99,
                "per_day": 19.99,
                "per_billing_cycle": 59.99
            },
            "usage_limits": {
                "per_transaction": 9.99,
                "per_day": 19.99,
                "per_billing_cycle": 59.99
            }
        }
    ],
    "organisations": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Good Burgers"
        }
    ]
}
Product Variants

Product Variants represent the multiple variations in which a Composite product can be ordered. A composite product has a set of attributes, each attribute having multiple values. Variation products are generated based on these attribute values combinations

POST /products/{id}/variants
GET /products/{id}/variants
PUT /products/{id}/variants/{variant_id}
DELETE /products/{id}/variants/{variant_id}
Create Product Variants
POST /products/{id}/variants

Create the Variant products of a composite product. For each variant product, a unique combination of the composite product’s characteristic values must be set

Path variables

id
string GUID required

The composite product’s unique idetifier

Example:
22386309-7a21-8097-e107-6e9aec401840

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
variants
Array

The variants of the product (product id and sku/name are semi-optional)

Object
product_id
string GUID required nullable

Set an existing product to be specifed as one of the composite product’s variations. This product must not be included in any other composite product.

Example:
704a96be-4bcf-f5cc-12a2-c5038e37d8c5
sku
string required nullable

The new variant product’s SKU

Example:
A11-Red-128
name
string required nullable

The new variant product’s name

Example:
A11s Red/128
external_sku
string

The product’s SKU in a third-party system. Also kept in CRM.COM for integration pursposes. It has to be unique across all external SKUs of products

Example:
P000101
description
string nullable

The new variant product’s description

Example:
A11 device, colour Red and 128MB capacity
characteristics
Array required

The variant product’s characteristics. Only characteristics of the Composite product can be included. In addition, the characteristics values must also be one of the allowed ones of the composite product. Each characteristics-value combination must be unique so as to generate one variation product for each combination

Min items: 1
Unique items: YES
Object
key
string required

The characteristic key

Example:
colour
value
string required

The characteristic value

Example:
Red
priority
integer

The priority of the variant to be used when ordering the products during the ordering flow

Example:
1
pricing
Object
price_model
string required
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
currency_code
string required
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
tax_model
string required
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price
number required nullable

The product’s price. Mandatory but only for Flat prices. For the rest of the pricing models, multiple prices must be specified in price ranges

Example:
9.99
tiers
Array required nullable
Object
lower_tier
integer required

Starting tier level per price range

Example:
1
upper_tier
integer

The upper tier. For the last price range it should not be specified

Example:
5
price
number

The price of the tiered prices range

Example:
9.99
billing_period
Object

The billing period mapped to the specified price. Applicable and required for termed and ne-time services only.

duration
integer

The billing period’s duration

Example:
1
uot
string

The billing period’s unit of time

Enumeration:
HOURS
DAYS
WEEKS
MONTHS
YEARS
Example:
MONTHS

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
POST https://sandbox.crm.com/backoffice/v2/products/22386309-7a21-8097-e107-6e9aec401840/variants HTTP/1.1 

Content-Type: application/json

{
    "variants": [
        {
            "product_id": "704a96be-4bcf-f5cc-12a2-c5038e37d8c5",
            "sku": "A11-Red-128",
            "name": "A11s Red/128",
            "external_sku": "P000101", 
            "description": "A11 device, colour Red and 128MB capacity",
            "characteristics": [
                {
                    "key": "colour",
                    "value": "Red"
                }
            ],
            "priority": 1,
            "pricing": {
                "price_model": "TIERED",
                "currency_code": "EUR",
                "tax_model": "TAX_INCLUSIVE",
                "price": 9.99,
                "tiers": [
                    {
                        "lower_tier": 1,
                        "upper_tier": 5,
                        "price": 9.99
                    }
                ],
                "billing_period": {
                    "duration": 1,
                    "uot": "MONTHS"
                }
            }
        }
    ]
}
Get Product Variants
GET /products/{id}/variants

Returns the list of a composite product’s variants.

Path variables

id
string GUID required

The product’s unique idetifier

Example:
22386309-7a21-8097-e107-6e9aec401840

Request parameters

supply_method
string optional

How the order will be supplied

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
fulfilled_by
string optional

The unique identifier of the organisation providing the product. If specified then only products avialable to be ordered at that point of time will be returned

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

Variant product identifier

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

product SKU

Example:
A1151-Red/128
name
string

Product name

Example:
A11 Red/128Mb
description
string

Product description

Example:
A11 devices, colour=Red, capacity=128
external_sku
string

The product’s SKU in a third-party system. Also kept in CRM.COM for integration pursposes. It has to be unique across all external SKUs of products

Example:
P000101
characteristics
Array

List of attributes based on which the variant product was created.

Object
key
string

Attribute key

Example:
colour
value
string

Attribute value

Example:
Red
label
string

Label to be used for U purposes

Example:
Colour
pricing
Array

The variant product’s price. A variant product might inherit its price from the Composite product or it might havee a price on its own.

Object
price
number

The product’s price. If a Variant product does not have its own price, then the Composite products price is returned. For Tiered/Volume/Stairstep rate models, this it the price of the first tier level.

Example:
9.99
currency
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
price_model
string
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
tiers
Object

Applicable only for Tiered/Volume/Stairstep models. Returns only the first tier

lower_tier
integer

Tiered price lower tier

Example:
1
upper_tier
integer

Tiered price upper tier

Example:
3
number_of_tiers
integer

Number of tiered prices

Example:
5
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
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/products/22386309-7a21-8097-e107-6e9aec401840/variants HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "sku": "A1151-Red/128",
            "name": "A11 Red/128Mb",
            "description": "A11 devices, colour=Red, capacity=128",
            "external_sku": "P000101",
            "characteristics": [
                {
                    "key": "colour",
                    "value": "Red",
                    "label": "Colour"
                }
            ],
            "pricing": [
                {
                    "price": 9.99,
                    "currency": "EUR",
                    "price_model": "TIERED",
                    "tax_model": "TAX_INCLUSIVE",
                    "tiers": {
                        "lower_tier": 1,
                        "upper_tier": 3,
                        "number_of_tiers": 5
                    }
                }
            ],
            "creatives": [
                {
                    "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                    "usage_type": "PROFILEIMAGE",
                    "width": 2159,
                    "height": 3075,
                    "format": "jpg",
                    "url": "https://assets.crm.com/image/logo.jpg",
                    "public_id": "crm-com/image",
                    "media": [
                        {
                            "width": 200,
                            "height": 300,
                            "url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
                        }
                    ]
                }
            ]
        }
    ]
}
Update Product Variant
PUT /products/{id}/variants/{variant_id}

Update an existing variant

Path variables

id
string GUID required

The product’s unique idetifier

Example:
22386309-7a21-8097-e107-6e9aec401840
variant_id
string GUID required

The variant product’s unique idetifier

Example:
22386309-7a21-8097-e107-6e9aec4018QQ

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
priority
integer

The priority of the component

Example:
1

Responses

200 OK
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://stagingapi.crm.com/backoffice/v1/products/{id}/components/{component_id} HTTP/1.1 

Content-Type: application/json

{
    "classification": "ADDON",
    "mandatory": true,
    "minimum_quantity": 1,
    "maximum_quantity": 5,
    "price_inclusive": true
}
Remove Product Variant
DELETE /products/{id}/variants/{variant_id}

Removes a product from the list of a composite product’s variations. The product however is not deleted. It remains and can still be ordered by consumers individually and not as part of a Composite product.

Path variables

id
string GUID required

The product’s unique idetifier

Example:
22386309-7a21-8097-e107-6e9aec401840
variant_id
string GUID required

The variant product’s unique identifer

Example:
22386309-7a21-8097-e107-6e9aec4018QQ

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/products/22386309-7a21-8097-e107-6e9aec401840/variants/22386309-7a21-8097-e107-6e9aec4018QQ HTTP/1.1 

HTTP/1.1 204 No Content 
Product Tags
PUT /products/{id}/tags
GET /products/{id}/tags
Update Product Tags
PUT /products/{id}/tags

Update the tags associated with the product

Path variables

id
string GUID required

The product (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 lead 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/products/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 Product Tags
GET /products/{id}/tags

Retrieve a list of tags that are associated with the product

Path variables

id
string GUID required

The product (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/products/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"
        }
    ]
}
Provisioning

Products marked as to be used for Provisioning purposes, i.e. their information is passed over to Provisioning Provider Integrations, require some additional information. This information includes by which providers they are provisioned and their external references at these providers.

POST /products/{id}/providers
PUT /products/{id}/providers
DELETE /products/{id}/providers/{provider_id}
GET /products/{id}/providers
Add Product Provisioning Provider
POST /products/{id}/providers

Add a new provisioning provider on a specific product

Path variables

id
string GUID required

The product (identifier) that provider details will be added

Example:
16dec2ff-f6fb-4d44-c388-0f1f95c03890

Notes

Within CRM, only products of type traceable physical goods, termed and one time services can be provisioned. Creating such products (given that their type is provisioned enabled) requires to specify the related provider details as described bellow

  • Traceable Physical Goods: must specify by which integrator(s) can be provisioned
  • Termed & One-Time Services: must specify by which integrator(s) can be provisioned and the supported external reference per provider (a service can be provisioned by more than one provider)

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

The provider (integrator identifier) that will provision the product

Example:
8812f0cf-7256-2647-ffbd-a7356232f318
external_references
Array nullable

The provider (integrator) external reference (applicable and required only for termed and one-time services). More than one referenes can be added. If no external reference is defined, then the service will not be provisioned.

Unique items: YES
Example:
[
    "EX-REF-01"
]
string
Example:
EX-REF-01

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/v2/products/16dec2ff-f6fb-4d44-c388-0f1f95c03890/providers HTTP/1.1 

Content-Type: application/json

[
    {
        "integration_id": "8812f0cf-7256-2647-ffbd-a7356232f318",
        "external_references": [
            "EX-REF-01"
        ]
    }
]

HTTP/1.1 200 OK 
Update Product Provisioning Provider
PUT /products/{id}/providers

Update an existing provisioning provider on a specific product

Path variables

id
string GUID required

The product (identifier) that provider details will be updated

Example:
16dec2ff-f6fb-4d44-c388-0f1f95c03890

Notes

Within CRM, only products of type traceable physical goods, termed and one time services can be provisioned. Creating such products (given that their type is provisioned enabled) requires to specify the related provider details as described bellow

  • Traceable Physical Goods: must specify by which integrator(s) can be provisioned
  • Termed & One-Time Services: must specify by which integrator(s) can be provisioned and the supported external reference per provider (a service can be provisioned by more than one provider)

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

The product provider (identifier) that will be updated

Example:
10c44dba-6cbe-1015-1ba3-662ca3c24c36
integration_id
string GUID required

The provider (integrator identifier) that will provision the product

Example:
8812f0cf-7256-2647-ffbd-a7356232f318
external_references
Array required nullable

The provider (integrator) external reference (applicable and required only for termed and one-time services). Multiple references can be specified. If none is specified, then the service is not provisioned.

Example:
[
    "EX-REF-01"
]
string
Example:
EX-REF-01

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
PUT https://sandbox.crm.com/backoffice/v2/products/16dec2ff-f6fb-4d44-c388-0f1f95c03890/providers HTTP/1.1 

Content-Type: application/json

[
    {
        "id": "10c44dba-6cbe-1015-1ba3-662ca3c24c36",
        "integration_id": "8812f0cf-7256-2647-ffbd-a7356232f318",
        "external_references": [
            "EX-REF-01"
        ]
    }
]

HTTP/1.1 200 OK 
Delete Product Provisioning Provider
DELETE /products/{id}/providers/{provider_id}

Remove an existing provisioning provider from a specific product

Path variables

id
string GUID required

The product (identifier) that provider details will be deleted

Example:
16dec2ff-f6fb-4d44-c388-0f1f95c03890
provider_id
string GUID required

The provider for which details will be removed. This is the integration’s identifier

Example:
16dec2ff-f6fb-4d44-c388-0f1f95c03890

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/products/16dec2ff-f6fb-4d44-c388-0f1f95c03890/providers/16dec2ff-f6fb-4d44-c388-0f1f95c03890 HTTP/1.1 

HTTP/1.1 204 No Content 
List Product Provisioning Providers
GET /products/{id}/providers

Get a list of all provisioning providers of a specific product

Path variables

id
string GUID required

The product (identifier) that provider details will be retrieved

Example:
97ab56be-077b-984a-7499-760f9f15ecd4

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 GUID

The product provider identifier

Example:
c9d10f2c-7511-ebc7-1158-3bfbb59ca5c1
integration
Object

Details about the provider integrator that provisions the product

id
string GUID

The provider integrator identifier

Example:
246af5e7-dd6c-affe-18a5-e8988f12a3da
name
string

The provider integrator name

Example:
Irdeto
media_url
string

The provider’s logo

external_references
Array

The provider (integrator) external reference (applicable only for termed and one-time services)

Example:
[
    "EXT-REF-01"
]
string
Example:
EXT-REF-01
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/products/97ab56be-077b-984a-7499-760f9f15ecd4/providers HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "c9d10f2c-7511-ebc7-1158-3bfbb59ca5c1",
            "integration": {
                "id": "246af5e7-dd6c-affe-18a5-e8988f12a3da",
                "name": "Irdeto",
                "media_url": ""
            },
            "external_references": [
                "EXT-REF-01"
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Content Translations
GET /products/{id}/translations
PUT /products/{id}/translations
PUT /products/{id}/translations/actions
Get Product Translations
GET /products/{id}/translations

Retrieve the content translations for an existing product

Path variables

id
string GUID required

The product (identifier) of which content translations will be retrieved

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Request parameters

language_code
string optional

Filter based on language

Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN

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
language_code
string
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array

The content translations for the specified language

Object
key
string

The content (attribute) key

Example:
name
value
string

The content (attribute) translated value

Example:
10% cashback return
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/products/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "language_code": "EN",
            "translations": [
                {
                    "key": "name",
                    "value": "10% cashback return"
                }
            ]
        }
    ]
}
Update Product Translations
PUT /products/{id}/translations

Update the content translations for an existing product

Path variables

id
string GUID required

The product (identifier) of which content translations will be updated

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

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
language_code
string required
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array nullable

The content translations for the specified language

Object
key
string required

The content (attribute) key

Example:
name
value
string required

The content (attribute) translated value

Example:
10% cashback return

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
PUT https://sandbox.crm.com/backoffice/v2/products/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

[
    {
        "language_code": "EN",
        "translations": [
            {
                "key": "name",
                "value": "10% cashback return"
            }
        ]
    }
]

HTTP/1.1 204 No Content 
Perform Product Translation Actions
PUT /products/{id}/translations/actions

Perform content translation actions on a product (e.g. export a product’s translations)

Path variables

id
string GUID required

The product (identifier) of which content translation actions will be performed

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Notes

IMPORT CONTENT TRANSLATIONS FLOW

Importing content translations should be made based on the following API order

  1. Upload File Signature
  2. Import Translations
EXPORT CONTENT TRANSLATIONS FLOW

Exporting content translations into different file should be made using the following API order

  1. Export Translations

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 action that will be applied

Enumeration:
IMPORT
EXPORT
file
Object required

The file (identifier) that will be used for importing translations (required only for import action)

id
string GUID required nullable

The file (identifier) that will be used for importing translations (required only for import action)

Example:
1e347d4d-ab96-6957-fdb6-35e72b3d9185
mime
string required nullable

The file (mime type) that will be used for exporting translations (required only for export action)

Example:
json

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
Example 2
PUT https://sandbox.crm.com/backoffice/v2/products/a42dd7c4-e755-92fb-963b-5f658a59908e/translations/actions HTTP/1.1 

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

{
    "action": "IMPORT",
    "file": {
        "id": "1e347d4d-ab96-6957-fdb6-35e72b3d9185"
    }
}

HTTP/1.1 204 No Content 
PUT https://sandbox.crm.com/backoffice/v2/products/a42dd7c4-e755-92fb-963b-5f658a59908e/translations/actions HTTP/1.1 

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

{
    "action": "EXPORT",
    "file": {
        "mime": "json"
    }
}

HTTP/1.1 204 No Content 
Pricing

Manage prices of prodcuts across the Product Catalogue. A product (regardles of its type, composition or classification) might have multiple prices. A price can be set for either a specific product or for all products within a family of products.

POST /products/{id}/prices
PUT /products/{id}/prices
GET /products/{id}/prices
DELETE /products/{id}/prices/{price_id}
GET /prices
PUT /prices/bulk
POST /product_families/{id}/prices
PUT /product_families/{id}/prices
DELETE /product_families/{id}/prices/{price_id}
GET /product_families/{id}/prices
Add Product Price
POST /products/{id}/prices

Add a new price of a product. Within a single Web API call, the price of a product can be specified in multiple currencies, therefore a single price is set up having multiple value; one for each supported currency. Each price has a set of price terms and a set of conditions that specified when the price will be applied.

Path variables

id
string required

The product’s unique idetifier

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
price_model
string required
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
valid_from
integer

Price is valid as of this date. If not specified, then the new price is valid as of the date that it is created.

Example:
1652553467
prices
Array required

Set up one or more product price values. This set of price amounts must be set in the various supported currencies of the business. Setting up a price for the base currency is mandatory.

Min items: 1
Unique items: YES
Object
currency_code
string required
Example:
EUR
price
number required nullable

A single price is required when price model is set to Flat. Either a price or a set tiered prices must be specified

Example:
9.99
out_of_contract
number

The flat price of a termed service goes out of contract. Applicable only when setting up a price for a termed service and as long as its price terms include a contract period. If not specified, then the service will still be invoiced with the same price when it goes out of contract

Example:
11.99
tiers
Array required nullable

The price’s tiers required for Tiered/Volume/Stairstep models. Either a price or a tiered prices must be specified.

Object
lower_tier
integer required

The lower tier in the price’s range. The first range’s tier must begin with 1. Then each subsequent range’s lower tier must have a value equal to the previous range’s upper tier +1.

Example:
1
upper_tier
integer

The upper tier. Not rquired (and should remain empty in the last tier range).

Example:
5
price
number required

The tiered price

Example:
8.99
out_of_contract
number

Price when termed service goes out of contract. Applicable only when setting up a price for a termed service and as long as its price terms include a contract period. If not specified, then the service will still be invoiced with the same price when it goes out of contract

Example:
9.99
is_default
boolean

Defines a product’s default price. A product can optionally have a single default price that is the one presented by default to contacts e.g. on ordering

Example:
true
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price_type
string
Enumeration:
SALE
RENTAL
Default:
SALE
Example:
SALE
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
sales_model_id
string

The sales model unique identifier used to

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
price_terms
Object

Applicable and required when setting up prices for Termed and One-time services. Price terms determine the terms based on which the consumer subscribes to such services. Also applicable and required when setting up the Rental price of a traceable physical good. In that case, the rental price requires a billing cycle and a rental expense that the contact is billed recurringly.

billing_period
Object required

The service’s billing cycle.

duration
integer required

Billing cycle duration

Example:
1
uot
string required

Billing cycle unit of time

Example:
MONTHS
auto_renewed
boolean

Service to be auto-renewed at the end of its termed perior or it will get expired. Applicable and required only for termed services

Default:
true
Example:
true
terms_billing_cycles
integer

Termed period duration set in number of billing cycles. Applicable and required only for termed service

Default:
1
Example:
12
contract_period
Object

How long the service will be in contract period

duration
integer required

Contract period duration

Example:
12
uot
string required

Contract period unit of time

Enumeration:
DAYS
WEEKS
MONTHS
YEARS
Example:
MONTHS
trial_period
Object

The service’s trial period. Applicable only for termed services. At the end of the trial period, the service turns into a paid one, i.e. its billing history begins

duration
string required

Trial period duration

Example:
30
uot
string required

Trial period unit of time

Enumeration:
DAYS
WEEKS
MONTHS
YEARS
Example:
DAYS
billing_model
string required

Billing model of the service.

Enumeration:
PRE_BILL

Service is billed for the next billing cycle

POST_BILL

Service is billed for the billing cycle that ends

Default:
PRE_BILL
Example:
PRE_BILL
rental_service_id
string

Applicable and reuqired when the price’s Price Type is set to Rental. Rental price can only be set up for traceable physical goods. Only products classified as Expenses can be set up as the rental service since this is the service that will be added on a subscription and billed on a recurring basis.

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

List of Countries. Each country represents a contact’s Country of Agreement so price is applied based on to which country the contact registered to.

string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
segments
Array

List of Segments that represent a list of Contacts on which the price will be applied. Either a list of Segments or a list of Contacts is specified.

Unique items: YES
Object
id
string

Segment unique identifier

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

List of Contacts on which the price will be applied. Either a list of Segments or a list of Contacts is specified.

Unique items: YES
Object
id
string

Contact unique identifier

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

The price is applied when the product is ordered as part of the specified Flex bundle/Composite product. Each product must have a price when sold individually and optionally a price when sold as part of a bundle/composite product. When setting the price of a termed service as a component, then in its price terms, only the billing period is applicable and required. The rest of the terms are inherited by the bundle product.

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

Applicable only when setting up the price of a Usage service. If specified, then the usage service’s prices is differentiated based on the product through which it was consumed. This product must either be a termed service or a one-time service product.

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

Responses

201 Created
Body
Object
id
string

The identifier of the new product price

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/{id}/prices HTTP/1.1 

Content-Type: application/json

{
    "price_model": "TIERED",
    "valid_from": 1652553467,
    "prices": [
        {
            "currency_code": "EUR",
            "price": 9.99,
            "out_of_contract": 11.99,
            "tiers": [
                {
                    "lower_tier": 1,
                    "upper_tier": 5,
                    "price": 8.99,
                    "out_of_contract": 9.99
                }
            ]
        }
    ],
    "is_default": "true",
    "tax_model": "TAX_INCLUSIVE",
    "price_type": "SALE",
    "supply_method": "DELIVERY",
    "price_terms": {
        "billing_period": {
            "duration": 1,
            "uot": "MONTHS"
        },
        "auto_renewed": true,
        "terms_billing_cycles": 12,
        "contract_period": {
            "duration": 12,
            "uot": "MONTHS"
        },
        "trial_period": {
            "duration": "30",
            "uot": "DAYS"
        },
        "billing_model": "PRE_BILL",
        "rental_service_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "country_code": [
        "CYP"
    ],
    "segments": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "contacts": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "bundle_product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "used_via_product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "sales_model_id": "caf332bc-4e90-47b5-a05d-142b264897b9"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Product Price
PUT /products/{id}/prices

Updates the existing price of a product. Within a single Web API call the price of a products in multiple currencies can be updated as well as the price’s conditions. When setting up a price in multiple currencies, then this price has multiple amounts (one for each currency) and the same set of conditions among all of these prices. The price in the base currency is mandatory.

Path variables

id
string required

The product’s unique idetifier

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
price_model
string
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
valid_from
integer

Price is valid from this date onwards

Example:
1652553467
prices
Array

Set price amounts in the various supported currencies of the business. Setting up a price for the base currency is mandatory.

Object
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
price
number required

The price amount. A single price is set up when pricing model is set to Flat.

Example:
9.99
out_of_contract
number

The flat price of a termed service goes out of contract. Applicable only when setting up a price for a termed service and as long as its price terms include a contract period. If not specified, then the service will still be invoiced with the same price when it goes out of contract

Example:
11.99
tiers
Array

Tiered pricing amounts. Required fro Tiered/Volume/Stairstep pricing models. Either a price or a tiered prices must be specified.

Object
lower_tier
integer required

The lower tier in the price’s range. The first range’s tier must begin with 1. Then each subsequent range’s lower tier must have a value equal to the previous range’s upper tier +1.

Example:
1
upper_tier
integer required nullable

The upper tier. Not rquired (and should remain empty in the last tier range).

Example:
5
price
number required

The tier range’s price

Example:
8.99
out_of_contract
number

Price when termed service goes out of contract. Applicable only when setting up a price for a termed service and as long as its price terms include a contract period. If not specified, then the service will still be invoiced with the same price when it goes out of contract

Example:
9.99
is_default
boolean

The product’s default price. A single price can be set as the default one.

Example:
true
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price_type
string
Enumeration:
SALE
RENTAL
Default:
SALE
Example:
SALE
sales_model_id
string

The sales model is the unique identifier used to calssify a product’s prcie

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
price_terms
Object

Applicable and required when setting up prices for Termed and One-time services. Price terms determine the terms based on which the consumer subscribes to such services. Also applicable and required when setting up the Rental price of a traceable physical good. In that case, the rental price requires a billing cycle and a rental expense that the contact is billed recurringly.

billing_period
Object required

The service’s billing cycle.

duration
integer

Duration

Example:
1
uot
string

Duration unit of time

Enumeration:
DAYS
WEEKS
MONTHS
YEARS
Example:
MONTHS
auto_renewed
boolean

Service to be auto-renewed at the end of its termed perior or it will get expired. Applicable and required only for termed services

Default:
true
Example:
true
terms_billing_cycles
integer

Termed period duration set in number of billing cycles. Applicable and required only for termed service

Default:
1
Example:
12
contract_period
Object

How long the service will be in contract period

duration
integer

Duration

Example:
12
uot
string

Duraiton unit of time

Enumeration:
DAYS
WEEKS
MONTHS
YEARS
Example:
MONTHS
trial_period
Object

The service’s trial period. Applicable only for termed services. At the end of the trial period, the service turns into a paid one, i.e. its billing history begins

duration
string

Duration

Example:
30
uot
string
Enumeration:
DAYS
WEEKS
MONTHS
YEARS
Example:
DAYS
billing_model
string required

Billing model denots when the service will be billed;at the begining of each billing cycle or at the end of it.

Enumeration:
PRE_BILL
POST_BILL
Default:
PRE_BILL
Example:
PRE_BILL
rental_service_id
string

Applicable and reuqired when the price’s Price Type is set to Rental. Rental price can only be set up for traceable physical goods. Only products classified as Expenses can be set up as the rental service since this is the service that will be added on a subscription and billed on a recurring basis.

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

List of Segments that represent a list of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Segment identifier

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

List of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Contact identifier

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

The price is applied when the product is ordered as part of the specified Flex bundle/Composite product. Each product must have a price when sold individually and optionally a price when sold as part of a bundle/composite product. When setting the price of a termed service as a component, then in its price terms, only the billing period is applicable and required. The rest of the terms are inherited by the bundle product.

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

Applicable only when setting up the price of a Usage service. If specified, then the usage service’s prices is differentiated based on the product through which it was consumed. This product must either be a termed service or a one-time service product.

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

The price’s label

Example:
Standard

Responses

200 OK
Body
Object
id
string

The identifier of the updated product price

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/{id}/prices HTTP/1.1 

Content-Type: application/json

{
    "price_model": "TIERED",
    "valid_from": 1652553467,
    "prices": [
        {
            "currency_code": "EUR",
            "price": 9.99,
            "out_of_contract": 11.99,
            "tiers": [
                {
                    "lower_tier": 1,
                    "upper_tier": 5,
                    "price": 8.99,
                    "out_of_contract": 9.99
                }
            ]
        }
    ],
    "is_default": "true",
    "tax_model": "TAX_INCLUSIVE",
    "price_type": "SALE",
    "sales_model_id": "caf332bc-4e90-47b5-a05d-142b264897b9",
    "supply_method": "DELIVERY",
    "country_code": "CYP",
    "price_terms": {
        "billing_period": {
            "duration": 1,
            "uot": "MONTHS"
        },
        "auto_renewed": true,
        "terms_billing_cycles": 12,
        "contract_period": {
            "duration": 12,
            "uot": "MONTHS"
        },
        "trial_period": {
            "duration": "30",
            "uot": "DAYS"
        },
        "billing_model": "PRE_BILL",
        "rental_service_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "segments": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "contacts": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "bundle_product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "used_via_product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Product Prices
GET /products/{id}/prices

Get a list of prices of a specific product. The Web API returns the price which is valid on the date the method is called (in case a price undergone price changes or it is scheduled to change).If a price is set up in multiple currencies, then each price amount per currency is returned as an individual price.

Path variables

id
string required

The product’s unique identifier

Request parameters

price_model
string optional

The price model

Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
currency_code
string optional

Search for prices of a specific currency

Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
country_code
string optional

Search for prices applied for a specific Country of agreement

Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
supply_method
string optional

Price applied for a specific supply method

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
price_type
string optional

Search for Rental or Sale prices

Enumeration:
SALE
RENTAL
Default:
SALE
Example:
SALE
segment_id
array of string optional

Prices applied for contacts in one or more Segments

Collection format: multi
contact_id
array of string optional

Prices applied for one or more contacts

Collection format: multi
billing_period
string optional

Search for a price based on its terms’ billing cycle

billing_period_uot
string optional

Applicable and required only when a billing period parameter is specified

Enumeration:
DAYS
WEEKS
MONTHS
YEARS
bundle_product_id
string optional

Search for a product price when sold as part of a bundle/composite product

Example:
02fb1dd4-048a-4a6c-bef2-0c4c00234edf
used_via_product_id
string optional

Search for a product price of a usage service when consumed as part of a termed/one-time service

Example:
02fb1dd4-048a-4a6c-bef2-0c4c00234edf
is_default
boolean optional

Search for the default price of the prioduct, if any is set.

Example:
true
has_allowance
boolean optional

Search for product prices that include usage allowance

Example:
true
has_trial
boolean optional

Search for price terms that offer a trial period (of any duration) to contacts

Example:
true
validity_period
string optional

Price valid at a specific period of time

tax_model
string optional

Price is Tax inclusive or not.

Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
multi_currency
boolean optional

Price set up in multiple currencies or not.

Example:
true
label
string optional

The price’s label

Example:
Standard pricing
sales_model_id
string optional

The sales model is the unique identifier

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
price_model
string
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
valid_from
integer

Price is valid from this date onwards

Example:
1652553467
prices
Array

Set price amounts in the various supported currencies of the business. Setting up a price for the base currency is mandatory.

Object
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
price
number required

The price amount. A single price is set up when pricing model is set to Flat.

Example:
9.99
out_of_contract
number

The flat price of a termed service goes out of contract. Applicable only when setting up a price for a termed service and as long as its price terms include a contract period. If not specified, then the service will still be invoiced with the same price when it goes out of contract

Example:
11.99
tiers
Array

Tiered pricing amounts. Required fro Tiered/Volume/Stairstep pricing models. Either a price or a tiered prices must be specified.

Object
lower_tier
integer required

The lower tier in the price’s range. The first range’s tier must begin with 1. Then each subsequent range’s lower tier must have a value equal to the previous range’s upper tier +1.

Example:
1
upper_tier
integer required nullable

The upper tier. Not rquired (and should remain empty in the last tier range).

Example:
5
price
number required

The tier range’s price

Example:
8.99
out_of_contract
number

Price when termed service goes out of contract. Applicable only when setting up a price for a termed service and as long as its price terms include a contract period. If not specified, then the service will still be invoiced with the same price when it goes out of contract

Example:
9.99
measurement_unit
Object

Price applied per measurement unit. Applicable only for prices of Usage Services

id
string

Measurement unit identifier

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

Measurement unit name

Example:
Gigabytes
display_name
string

Measurement unit display name

Example:
GB
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price_type
string
Enumeration:
SALE
RENTAL
Default:
SALE
Example:
SALE
sales_model
Object

The sales model is the unique identifier used to calssify a product’s prcie

id
string

The sales model unique identifier

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
name
string

The sales model name which has to be unique across all sales models

Example:
Retail
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
price_terms
Object

Applicable and required when setting up prices for Termed and One-time services. Price terms determine the terms based on which the consumer subscribes to such services. Also applicable and required when setting up the Rental price of a traceable physical good. In that case, the rental price requires a billing cycle and a rental expense that the contact is billed recurringly.

billing_period
Object required

The service’s billing cycle.

duration
integer

Duration

Example:
1
uot
string

Duration unit of time

Enumeration:
DAYS
WEEKS
MONTHS
YEARS
Example:
MONTHS
auto_renewed
boolean

Service to be auto-renewed at the end of its termed perior or it will get expired. Applicable and required only for termed services

Default:
true
Example:
true
terms_billing_cycles
integer

Termed period duration set in number of billing cycles. Applicable and required only for termed service

Default:
1
Example:
12
contract_period
Object

How long the service will be in contract period

duration
integer

Duration

Example:
12
uot
string

Duraiton unit of time

Enumeration:
DAYS
WEEKS
MONTHS
YEARS
Example:
MONTHS
trial_period
Object

The service’s trial period. Applicable only for termed services. At the end of the trial period, the service turns into a paid one, i.e. its billing history begins

duration
string

Duration

Example:
30
uot
string
Enumeration:
DAYS
WEEKS
MONTHS
YEARS
Example:
DAYS
billing_model
string required

Billing model denots when the service will be billed;at the begining of each billing cycle or at the end of it.

Enumeration:
PRE_BILL
POST_BILL
Default:
PRE_BILL
Example:
PRE_BILL
rental_service
Object

Applicable and reuqired when the price’s Price Type is set to Rental. Rental price can only be set up for traceable physical goods. Only products classified as Expenses can be set up as the rental service since this is the service that will be added on a subscription and billed on a recurring basis.

id
string

Product identifier

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

Product SKU

Example:
RFEE
name
string

Product name

Example:
Rental Fee
countries
Array

List of Countries in which the price is applied. This setting is validated agianst the contact’s Country of Agreement in order to decide which price to apply

Unique items: YES
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
segments
Array

List of Segments that represent a list of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Segment identifier

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

Segment name

Example:
VIP
contacts
Array

List of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Contact identifier

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

Contact name

Example:
John Smith
code
string

Contact Code

Example:
C000101011
bundle_product
Object

The price is applied when the product is ordered as part of the specified Flex bundle/Composite product. Each product must have a price when sold individually and optionally a price when sold as part of a bundle/composite product. When setting the price of a termed service as a component, then in its price terms, only the billing period is applicable and required. The rest of the terms are inherited by the bundle product.

id
string

Product identifier

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

Product SKU

Example:
3PLAY
name
string

Product name

Example:
3Play
used_via_product
Object

Applicable only when setting up the price of a Usage service. If specified, then the usage service’s prices is differentiated based on the product through which it was consumed. This product must either be a termed service or a one-time service product.

id
string

Product identifier

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

Product SKU

Example:
5GBDAY
name
string

Product name

Example:
Daily 5GB Now!
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

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
GET https://sandbox.crm.com/backoffice/v2/products/{id}/prices HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "price_model": "TIERED",
            "valid_from": 1652553467,
            "prices": [
                {
                    "currency_code": "EUR",
                    "price": 9.99,
                    "out_of_contract": 11.99,
                    "tiers": [
                        {
                            "lower_tier": 1,
                            "upper_tier": 5,
                            "price": 8.99,
                            "out_of_contract": 9.99
                        }
                    ],
                    "measurement_unit": {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "name": "Gigabytes",
                        "display_name": "GB"
                    }
                }
            ],
            "tax_model": "TAX_INCLUSIVE",
            "price_type": "SALE",
            "sales_model": {
                "id": "caf332bc-4e90-47b5-a05d-142b264897b9",
                "name": "Retail"
            },
            "supply_method": "DELIVERY",
            "price_terms": {
                "billing_period": {
                    "duration": 1,
                    "uot": "MONTHS"
                },
                "auto_renewed": true,
                "terms_billing_cycles": 12,
                "contract_period": {
                    "duration": 12,
                    "uot": "MONTHS"
                },
                "trial_period": {
                    "duration": "30",
                    "uot": "DAYS"
                },
                "billing_model": "PRE_BILL",
                "rental_service": {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "sku": "RFEE",
                    "name": "Rental Fee"
                }
            },
            "countries": [
                "CYP"
            ],
            "segments": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "VIP"
                }
            ],
            "contacts": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "John Smith",
                    "code": "C000101011"
                }
            ],
            "bundle_product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "3PLAY",
                "name": "3Play"
            },
            "used_via_product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "5GBDAY",
                "name": "Daily 5GB Now!"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Delete Product Price
DELETE /products/{id}/prices/{price_id}

Delete an existing product price. When deleting the price in the base currency and at the same time the same price is also specified in other currencies, then this results in deleting all of the price amounts as well.

Path variables

id
string required

Product nique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
price_id
string required

Price unique identifier

Example:
2ac0809f-ed91-4b68-b912-5bd6064e981a

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/products/4dc0809f-ed91-4b68-b912-5bd6064d901e/prices/2ac0809f-ed91-4b68-b912-5bd6064e981a HTTP/1.1 

HTTP/1.1 204 No Content 
List Prices
GET /prices

Returns a list of all prices of the product catalogue, regardless of the products. Use this Web API to search for all prices of a product or a group of products, or prices for a specific pricing area.

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
contact_id
string optional

Returns prices configured for a specific contact

segment_id
string optional

Returns prices configured for a specific Segment

agreement_country
string optional

Search for prices applied to contacts with the specified Country of agreement

Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
sales_model_id
string optional

Returns prices configured for a specific Sales Model

product_id
array of string optional

Returns prices of a specific product

Collection format: csv
type_id
array of string optional

Returns prices of a specific product type

Collection format: csv
brand_id
array of string optional

Returns prices of a specific product brand

Collection format: csv
family_id
array of string optional

Returns prices of a specific product family

Collection format: csv
classification
array of string optional

Returns prices of a product classification

Collection format: csv

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
product
Object
id
string
sku
string
name
string
description
string
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
price
Object
id
string
label
string
price_model
string
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
prices
Array

List of prices for quantity-based price models

Object
price
number
Example:
8.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
tiers
Array
Object
lower_tier
integer
Example:
1
upper_tier
integer
Example:
5
price
number
Example:
9.99
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
measurement_unit
Object
id
string
name
string
display_name
string
price_type
string
Enumeration:
SALE
RENTAL
Default:
SALE
Example:
SALE
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
sales_model
Object
id
string
name
string
segments
Array
Object
id
string
name
string
contact
Array
Object
id
string
code
string
name
string
agrement_countries
Array
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
price_terms
Object
billing_period
Object
duration
integer
uot
string
auto_renew
boolean
terms_billing_cycles
integer
Example:
1
billing_model
string
Enumeration:
PRE_BILL
POST_BILL
contract_period
Object
duration
integer
uot
string
trial_period
Object
duration
integer
uot
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
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
GET https://sandbox.crm.com/backoffice/v2/prices HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "product": {
                "id": "",
                "sku": "",
                "name": "",
                "description": "",
                "classification": "TRACEABLE_PHYSICAL_GOOD"
            },
            "price": {
                "id": "",
                "label": "",
                "price_model": "TIERED",
                "prices": [
                    {
                        "price": 8.99,
                        "currency_code": "EUR",
                        "tiers": [
                            {
                                "lower_tier": 1,
                                "upper_tier": 5,
                                "price": 9.99
                            }
                        ]
                    }
                ],
                "tax_model": "TAX_INCLUSIVE",
                "measurement_unit": {
                    "id": "",
                    "name": "",
                    "display_name": ""
                },
                "price_type": "SALE",
                "supply_method": "DELIVERY",
                "sales_model": {
                    "id": "",
                    "name": ""
                },
                "segments": [
                    {
                        "id": "",
                        "name": ""
                    }
                ],
                "contact": [
                    {
                        "id": "",
                        "code": "",
                        "name": ""
                    }
                ],
                "agrement_countries": [
                    "CYP"
                ],
                "price_terms": {
                    "billing_period": {
                        "duration": 1,
                        "uot": ""
                    },
                    "auto_renew": true,
                    "terms_billing_cycles": 1,
                    "billing_model": "POST_BILL",
                    "contract_period": {
                        "duration": 1,
                        "uot": ""
                    },
                    "trial_period": {
                        "duration": 1,
                        "uot": ""
                    }
                }
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Prices
PUT /prices/bulk

Performs a bulk updated on multiples prices in one go.

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
id
string
label
string
price_model
string
Example:
TIERED
prices
Array
Object
price
number
Example:
8.99
currency_code
string
Example:
EUR
tiers
Array
Object
lower_tier
integer
Example:
1
upper_tier
integer
Example:
5
price
number
Example:
9.99
tax_model
string
Example:
TAX_INCLUSIVE
price_type
string
Example:
SALE
supply_method
string
Example:
DELIVERY
sales_model_id
string
segments
Array
Example:
["123"]
string
Example:
123
contacts
Array of string
agrement_countries
Array
Example:
["CYP"]
string
Example:
CYP
price_terms
Object
billing_period
Object
duration
string
uot
string
auto_renew
boolean
Example:
true
terms_billing_cycles
integer
Example:
1
billing_model
string
Example:
POST_BILL
contract_period
Object
duration
integer
uot
string
trial_period
Object
duration
integer
uot
string

Responses

200 OK
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
PUT https://sandbox.crm.com/backoffice/v2/prices/bulk HTTP/1.1 

Content-Type: application/json

[
    {
        "id": "",
        "label": "",
        "price_model": "TIERED",
        "prices": [
            {
                "price": 8.99,
                "currency_code": "EUR",
                "tiers": [
                    {
                        "lower_tier": 1,
                        "upper_tier": 5,
                        "price": 9.99
                    }
                ]
            }
        ],
        "tax_model": "TAX_INCLUSIVE",
        "price_type": "SALE",
        "supply_method": "DELIVERY",
        "sales_model_id": "",
        "segments": [
            "123"
        ],
        "contacts": [
            ""
        ],
        "agrement_countries": [
            "CYP"
        ],
        "price_terms": {
            "billing_period": {
                "duration": "",
                "uot": ""
            },
            "auto_renew": true,
            "terms_billing_cycles": 1,
            "billing_model": "POST_BILL",
            "contract_period": {
                "duration": 1,
                "uot": ""
            },
            "trial_period": {
                "duration": 1,
                "uot": ""
            }
        }
    }
]

HTTP/1.1 200 OK 
Add Product Family Prices
POST /product_families/{id}/prices

Adds new prices to a product family. Within a single Web API call, the same price in multiple currencies can be added for a product family. Maintaining a price in the base currency of the business is required, so adding a price in that currency is mandatory.

Path variables

id
string required

The product family’s unique idetifier

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
price_model
string
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
valid_from
integer

Price is valid from this date onwards

Example:
1652553467
prices
Array

Set price amounts in the various supported currencies of the business. Setting up a price for the base currency is mandatory.

Object
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
price
number required

The price amount. A single price is set up when pricing model is set to Flat.

Example:
9.99
tiers
Array

Tiered pricing amounts. Required fro Tiered/Volume/Stairstep pricing models. Either a price or a tiered prices must be specified.

Object
lower_tier
integer required

The lower tier in the price’s range. The first range’s tier must begin with 1. Then each subsequent range’s lower tier must have a value equal to the previous range’s upper tier +1.

Example:
1
upper_tier
integer required nullable

The upper tier. Not rquired (and should remain empty in the last tier range).

Example:
5
price
number required

The tier range’s price

Example:
8.99
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price_type
string
Enumeration:
SALE
RENTAL
Default:
SALE
Example:
SALE
sales_model_id
string

The sales model is the unique identifier used to calssify a product’s prcie

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
segments
Array

List of Segments that represent a list of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Segment identifier

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

List of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Contact identifier

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

Responses

201 Created
Body
Object
id
string

The identifier of the new price of the product family

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/product_families/{id}/prices HTTP/1.1 

Content-Type: application/json

{
    "price_model": "TIERED",
    "valid_from": 1652553467,
    "prices": [
        {
            "currency_code": "EUR",
            "price": 9.99,
            "tiers": [
                {
                    "lower_tier": 1,
                    "upper_tier": 5,
                    "price": 8.99
                }
            ]
        }
    ],
    "tax_model": "TAX_INCLUSIVE",
    "price_type": "SALE",
    "sales_model_id": "caf332bc-4e90-47b5-a05d-142b264897b9",
    "supply_method": "DELIVERY",
    "country_code": "CYP",
    "segments": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "contacts": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}
Update Product Family Prices
PUT /product_families/{id}/prices

Updates the price of products of a specific family. Within a single update, the same price in multiple currencies can be updated. Maintaining a price in the base currency of the business is required, so that price cannot be removed, whereas prices in an other suported currency can be updated/removed.

Path variables

id
string required

The product family’s unique idetifier

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
price_model
string
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
valid_from
integer

Price is valid from this date onwards

Example:
1652553467
prices
Array

Set price amounts in the various supported currencies of the business. Setting up a price for the base currency is mandatory.

Object
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
price
number required

The price amount. A single price is set up when pricing model is set to Flat.

Example:
9.99
tiers
Array

Tiered pricing amounts. Required fro Tiered/Volume/Stairstep pricing models. Either a price or a tiered prices must be specified.

Object
lower_tier
integer required

The lower tier in the price’s range. The first range’s tier must begin with 1. Then each subsequent range’s lower tier must have a value equal to the previous range’s upper tier +1.

Example:
1
upper_tier
integer required nullable

The upper tier. Not rquired (and should remain empty in the last tier range).

Example:
5
price
number required

The tier range’s price

Example:
8.99
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price_type
string
Enumeration:
SALE
RENTAL
Default:
SALE
Example:
SALE
sales_model_id
string

The sales model is the unique identifier used to calssify a product’s prcie

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
segments
Array

List of Segments that represent a list of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Segment identifier

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

List of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Contact identifier

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

Responses

200 OK
Body
Object
id
string

The unique identifier of the price of the product family

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/product_families/{id}/prices HTTP/1.1 

Content-Type: application/json

{
    "price_model": "TIERED",
    "valid_from": 1652553467,
    "prices": [
        { 
            "currency_code": "EUR",
            "price": 9.99,
            "tiers": [
                {
                    "lower_tier": 1,
                    "upper_tier": 5,
                    "price": 8.99
                }
            ]
        }
    ],
    "tax_model": "TAX_INCLUSIVE",
    "price_type": "SALE",
    "sales_model": "RETAIL",
    "supply_method": "DELIVERY",
    "country_code": "CYP",
    "segments": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "contacts": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}
Delete Product Family Price
DELETE /product_families/{id}/prices/{price_id}

Deletes a price of a product family. Deleting a price in the based currency and at the same time keeping the same price in any other supported currency is not allowed.

Path variables

id
string required

Product family uique identifier

price_id
string required

Price unique identifier

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/product_families/{id}/prices/{price_id} HTTP/1.1 

HTTP/1.1 204 No Content 
List Product Family Prices
GET /product_families/{id}/prices

Get a list of all prices of a specific product family

Path variables

id
string required

The product family’s unique identifier

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

Request parameters

country_code
string optional
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
currency_code
string optional
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
price_model
string optional
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
supply_method
string optional
Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
contact_id
array of string optional
Collection format: csv
segment_id
array of string optional
Collection format: multi
sales_model_id
array of string optional

The sales model is the unique identifier used to calssify a product’s prcie

Collection format: csv

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
price_model
string
Enumeration:
FLAT
TIERED
VOLUME
STAIRSTEP
Default:
FLAT
Example:
TIERED
valid_from
integer

Price is valid from this date onwards

Example:
1652553467
prices
Array

Set price amounts in the various supported currencies of the business. Setting up a price for the base currency is mandatory.

Object
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
price
number required

The price amount. A single price is set up when pricing model is set to Flat.

Example:
9.99
tiers
Array

Tiered pricing amounts. Required fro Tiered/Volume/Stairstep pricing models. Either a price or a tiered prices must be specified.

Object
lower_tier
integer required

The lower tier in the price’s range. The first range’s tier must begin with 1. Then each subsequent range’s lower tier must have a value equal to the previous range’s upper tier +1.

Example:
1
upper_tier
integer required nullable

The upper tier. Not rquired (and should remain empty in the last tier range).

Example:
5
price
number required

The tier range’s price

Example:
8.99
measurement_unit
Object

Price applied per measurement unit. Applicable only for prices of Usage Services

id
string

Measurement unit identifier

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

Measurement unit name

Example:
Gigabytes
display_name
string

Measurement unit display name

Example:
GB
tax_model
string
Enumeration:
TAX_INCLUSIVE
TAX_EXCLUSIVE
Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
price_type
string
Enumeration:
SALE
RENTAL
Default:
SALE
Example:
SALE
sales_model
Object

The sales model is the unique identifier used to calssify a product’s prcie

id
string

The sales model unique identifier

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
name
string

The sales model name which has to be unique across all sales models

Example:
Retail
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
segments
Array

List of Segments that represent a list of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Segment identifier

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

Segment name

Example:
VIP
contacts
Array

List of Contacts on which the price will be applied

Unique items: YES
Object
id
string

Contact identifier

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

Contact name

Example:
John Smith
code
string

Contact Code

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

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
GET https://sandbox.crm.com/backoffice/v2/product_families/4dc0809f-ed91-4b68-b912-5bd6064d901e/prices HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "price_model": "TIERED",
            "valid_from": 1652553467,
            "prices": [
                {
                    "currency_code": "EUR",
                    "price": 9.99,
                    "tiers": [
                        {
                            "lower_tier": 1,
                            "upper_tier": 5,
                            "price": 8.99
                        }
                    ],
                    "measurement_unit": {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "name": "Gigabytes",
                        "display_name": "GB"
                    }
                }
            ],
            "tax_model": "TAX_INCLUSIVE",
            "price_type": "SALE",
            "sales_model": {
                "id": "caf332bc-4e90-47b5-a05d-142b264897b9",
                "name": "Retail"
            },
            "supply_method": "DELIVERY",
            "country_code": "CYP",
            "segments": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "VIP"
                }
            ],
            "contacts": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "John Smith",
                    "code": "C000101011"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Promotions

Promotions provide a discount to contacts, usually when a set od conditions are met such as when, where and which products are ordered by the contacts. A promotion has offerrings that include, apart from the discount amount/percentage, the discounted products and whether the discount will be applied per product or at invoice level.

POST /promotions
PUT /promotions/{id}
DELETE /promotions/{id}
GET /promotions
GET /promotions/{id}
POST /promotions/{id}/media_groups
Create Promotion
POST /promotions

Create a new Promotion. A single Promotion can be created per Web API call. When created, the Promotion is set to Inactive state and will have to be activated in a separate Web API call.

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

Promotion name. The name must be unique

Example:
Sales season
short_description
string

A short description for the Promotion

Example:
£10 off during Sales season
long_description
string

A long description for the Promotion

Example:
£10% off on all products during Summaer sales season
availability
Object required

Determines the period of time during which the Promotion will be applied on ordering services and physical goods.

from_date
integer required

The date from which the Promotion will be applied

Example:
1648067185
to_date
integer

The date until which the Promotion will be applied on ordering. If not specified, then the Promotion will always be applied

Example:
1648067185
targets
Object

Promotion Targets. Optional informaiton that can be used to address the promotion to specific contact and location targets

segments
Array nullable
Unique items: YES
Example:
[
    " 4dc0809f-ed91-4b68-b912-5bd6064d901e"
]
string
Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
organisations
Array nullable
Unique items: YES
string
Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
timings
Object nullable
fixed_period
Object required nullable

Promotion is applied if the purchase is performed within the specified period off time. Either a fixed period or promotion availability must be specified

start_date
integer epoch required

Promotion applied if purchase is performed from this date (inclusive) and onwards

Example:
1648067185
end_date
integer epoch

If pseicifed, then purchase must be performed up until this date. Optional.

Example:
1648067185
availability
Array required nullable

Promotion is applied if the purchase is performed within the specified day(s), month(s) and/or times. Either a fixed period or promotion availability must be specified. Each availibility option should be unique

Object
start_time
string

Starting time

Example:
13:00
end_time
string

End time

Example:
14:00
day
integer

Day of week. Allowed values 1 to 7, where 1 is Sunday

Example:
1
month
integer

Month during which protion is applied. Allowed values 1-12 where 1 is January

Example:
1
basket
Object
rules
Object

Rules that -if specified- should be met in order for the Promotion to be applied.

payment_method_types
Array

Contact should pay using one of the specified payment method types to get the offerring

string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
supply_methods
Array

Purchase is fulfiflled using one of the specified supply methods for the contact to get the offering

string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
value
number

Minimum required basket total amount for the promotion to be applied. The amount is always set in the business’s base currency

Example:
9.99
quantity
integer

Miminum required quantity of basket items

Example:
5
products
Object

Products that should be included in the basket for the Promotion to be applied. Product conditions are defined as groups of conditions. In Each group there’s a product setting and the conditions that should be met. Multiple groups can be added, logically separated by AND/OR operators.

groups
Array

Group of product conditions.

Object
group
string required

The group’s name. Each group name must be unique

Example:
G1
operator
string required

Logical operator used amount the product conditions

Enumeration:
AND
OR
Example:
AND
conditions
Array

List of product conditions. Mulitple conditions can be added, each one referring to a single product. All product conditions mus tbe met to apply the promotion

Object
operator
string
Example:
OR
condition
string
product
Object required

The product that should be included in the basket

item_type
string required

Product settings must be one fot he following

Enumeration:
SKU
TYPE
BRAND
FAMILY
Example:
SKU
item_id
string required

The identifier of the product/type/brand/family.

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

The minimum required quantity of items to be included in the basket for the promotion to be applied

Example:
1
value
number

The minimum required basket items cost. Cost is defined in the business’s base currency

Example:
9.99
billing_cycle
Object

The billing cycle of the basket item. Applicable only for termed services. The billing cycle is the one specified in the service’s price terms selected on ordering

duration
integer

Billing cycle duration

Example:
1
uot
string

Billin cycle unit of time

Enumeration:
DAY
MONTH
Example:
DAY
contract_period
Object

The contract period of the basket item. Applicable only for termed services. The contract period is the one specified in the service’s price terms selected on ordering

duration
integer

Contract period duration

Example:
12
uot
string

Contract period unti of time

Enumeration:
MONTH
Example:
MONTH
services
Array

List of services to which a contact must already be subscribed to in order to get the promotion. Only termed services can be specified. Available and applicable only when the basket item is a termed service or a product type of Termed service classification.

Unique items: YES
Object
id
string required

The termed service product identifier

Example:
1af94364-b0f2-d656-aed6-bd3e3978cab4
quantity
number

Minimum required subscription service quantity to get the promotion

Example:
2
offerings
Array required

The promotion’s offerrings. At least one must be specified

Object
type
string required

Defines whether the offering is an actual discount amount or a discount percentage

Enumeration:
AMOUNT
PERCENTAGE
Default:
AMOUNT
Example:
AMOUNT
amount
number required

The discount amount or percentage. Monetaty amounts are always set in the business’s base currency

Example:
1.99
product
Object required

The product on which the discount will be applied

item_type
string

Each item must be one of the following types

Enumeration:
SKU
TYPE
BRAND
FAMILY
Default:
SKU
item_id
string

The item’s identifier

Example:
2f6a70b6-84d4-2859-d230-093cb7e95c62
duration
Object

How long the offering will be applied. Applicable only when the offering’s product is a termed service

type
string required

Indicates whether the offering will be applied once, for period of time or forever.

Enumeration:
ONE_TIME

Discount applied once

PERIOD

Discount applied in a limited number of billing cycles

FOREVER

Discount applied forever

Example:
PERIOD
period
Object

Applicable and required only when the offering will be applied for a specific PERIOD

duration
integer

The period’s duration

Example:
6
uot
string

The period’s unit of time

Enumeration:
DAY
MONTH
YEAR
Example:
MONTH

Responses

201 Created
Body
Object
id
string

The unique identifier of the new Promotion

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/promotions HTTP/1.1 

Content-Type: application/json

{
    "name": "Sales season",
    "short_description": "£10 off during Sales season",
    "long_description": "£10% off on all products during Summaer sales season",
    "availability": {
        "from_date": 1648067185,
        "to_date": 1648067185
    },
    "targets": {
        "segments": [
            "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        ],
        "organisations": [
            "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        ],
        "timings": {
            "fixed_period": {
                "start_date": 1648067185,
                "end_date": 1648067185
            },
            "availability": [
                {
                    "start_time": "13:00",
                    "end_time": "14:00",
                    "day": 1,
                    "month": 1
                }
            ]
        }
    },
    "basket": {
        "rules": {
            "payment_method_types": [
                "CARD"
            ],
            "supply_methods": [
                "DELIVERY"
            ],
            "value": 9.99,
            "quantity": 5
        },
        "products": {
            "groups": [
                {
                    "group": "G1",
                    "operator": "AND",
                    "conditions": [
                        {
                            "operator": "OR",
                            "condition": "",
                            "product": {
                                "item_type": "SKU",
                                "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
                            },
                            "quantity": 1,
                            "value": 9.99,
                            "billing_cycle": {
                                "duration": 1,
                                "uot": "DAY"
                            },
                            "contract_period": {
                                "duration": 12,
                                "uot": "MONTH"
                            },
                            "services": [
                                {
                                    "id": "1af94364-b0f2-d656-aed6-bd3e3978cab4",
                                    "quantity": 2
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    },
    "offerings": [
        {
            "type": "AMOUNT",
            "amount": 1.99,
            "product": {
                "item_type": "SKU",
                "item_id": "2f6a70b6-84d4-2859-d230-093cb7e95c62"
            },
            "duration": {
                "type": "PERIOD",
                "period": {
                    "duration": 6,
                    "uot": "MONTH"
                }
            }
        }
    ]
}
Update Promotion
PUT /promotions/{id}

Updates an existing Promotion. A single Promotion can be updated per Web API call.

Path variables

id
string required

Promotion identifier

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

Request body

Object
name
string

Promotion name which has to be unique

Example:
Sales season
short_description
string

A short description for the Promotion

Example:
£10 off during Sales season
long_description
string

A long description for the Promotion

Example:
£10% off on all products during Summaer sales season
state
string

The promotion’s state

Enumeration:
ACTIVE

Promotion can be applied on ordering

INACTIVE

Inactive Promotions not applied even if conditions are met.

availability
Object

Determines the period of time during which the Promotion will be applied on ordering services and physical goods.

from_date
integer

The date from which the Promotion will be applied

Example:
1648067185
to_date
integer

The date until which the Promotion will be applied on ordering. If not sepcified, then the Promotion will always be applied

Example:
1648067185
targets
Object

Promotion Targets. Optional information that can be used to address the promotion to specific contact and location targets

segments
Array
Unique items: YES
Example:
[
    " 4dc0809f-ed91-4b68-b912-5bd6064d901e"
]
string
Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
organisations
Array
Unique items: YES
string
Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
timings
Object
fixed_period
Object required nullable

Promotion is applied if the purchase is performed within the specified period off time. Either a fixed period or promotion availability must be specified

start_date
integer epoch required

Promotion applied if purchase is performed from this date (inclusive) and onwards

Example:
1648067185
end_date
integer epoch

If pseicifed, then purchase must be performed up until this date. Optional.

Example:
1648067185
availability
Array required nullable

Promotion is applied if the purchase is performed within the specified day(s), month(s) and/or times. Either a fixed period or promotion availability must be specified. Each availibility option should be unique

Object
start_time
string

Starting time

Example:
13:00
end_time
string

End time

Example:
14:00
day
integer

Day of week. Allowed values 1 to 7, where 1 is Sunday

Example:
1
month
integer

Month during which protion is applied. Allowed values 1-12 where 1 is January

Example:
1
basket
Object
rules
Object

Rules that -if specified- should be met in order for the Promotion to be applied.

payment_method_types
Array

Contact should pay using one of the specified payment method types to get the offerring

string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
supply_methods
Array

Purchase is fulfiflled using one of the specified supply methods for the contact to get the offering

string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
value
number

Minimum required basket total amount for the promotion to be applied. The amount is always set in the business’s base currency

Example:
9.99
quantity
integer

Miminum required quantity of basket items

Example:
5
products
Object

Products that should be included in the basket for the Promotion to be applied. Product conditions are defined as groups of conditions. In Each group there’s a product setting and the conditions that should be met. Multiple groups can be added, logically separated by AND/OR operators.

groups
Array

Group of product conditions.

Object
group
string required

The group’s name. Each group name must be unique

Example:
G1
operator
string required

Logical operator used amount the product conditions

Enumeration:
AND
OR
Example:
AND
conditions
Array

List of product conditions. Mulitple conditions can be added, each one referring to a single product. All product conditions mus tbe met to apply the promotion

Object
operator
string
Example:
OR
condition
string
product
Object required

The product that should be included in the basket

item_type
string required

Product settings must be one fot he following

Enumeration:
SKU
TYPE
BRAND
FAMILY
Example:
SKU
item_id
string required

The identifier of the product/type/brand/family.

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

The minimum required quantity of items to be included in the basket for the promotion to be applied

Example:
1
value
number

The minimum required basket items cost. Cost is defined in the business’s base currency

Example:
9.99
billing_cycle
Object

The billing cycle of the basket item. Applicable only for termed services. The billing cycle is the one specified in the service’s price terms selected on ordering

duration
integer

Billing cycle duration

Example:
1
uot
string

Billin cycle unit of time

Enumeration:
DAY
MONTH
Example:
DAY
contract_period
Object

The contract period of the basket item. Applicable only for termed services. The contract period is the one specified in the service’s price terms selected on ordering

duration
integer

Contract period duration

Example:
12
uot
string

Contract period unti of time

Enumeration:
MONTH
Example:
MONTH
services
Array

List of services to which a contact must already be subscribed to in order to get the promotion. Only termed services can be specified. Available and applicable only when the basket item is a termed service or a product type of Termed service classification.

Unique items: YES
Object
id
string required

The termed service product identifier

Example:
1af94364-b0f2-d656-aed6-bd3e3978cab4
quantity
number

Minimum required subscription service quantity to get the promotion

Example:
2
offerings
Array required

The promotion’s offerrings. At least one must be specified

Object
type
string required

Defines whether the offering is an actual discount amount or a discount percentage

Enumeration:
AMOUNT
PERCENTAGE
Default:
AMOUNT
Example:
AMOUNT
amount
number required

The discount amount or percentage. Monetaty amounts are always set in the business’s base currency

Example:
1.99
product
Object required

The product on which the discount will be applied

item_type
string

Each item must be one of the following types

Enumeration:
SKU
TYPE
BRAND
FAMILY
Default:
SKU
item_id
string

The item’s identifier

Example:
2f6a70b6-84d4-2859-d230-093cb7e95c62
duration
Object

How long the offering will be applied. Applicable only when the offering’s product is a termed service

type
string required

Indicates whether the offering will be applied once, for period of time or forever.

Enumeration:
ONE_TIME

Discount applied once

PERIOD

Discount applied in a limited number of billing cycles

FOREVER

Discount applied forever

Example:
PERIOD
period
Object

Applicable and required only when the offering will be applied for a specific PERIOD

duration
integer

The period’s duration

Example:
6
uot
string

The period’s unit of time

Enumeration:
DAY
MONTH
YEAR
Example:
MONTH

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated Promotion

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/promotions/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "name": "Sales season",
    "short_description": "£10 off during Sales season",
    "long_description": "£10% off on all products during Summaer sales season",
    "state": "ACTIVE",
    "availability": {
        "from_date": 1648067185, 
        "to_date": 1648067185
    },
    "targets": {
        "segments": [
            "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        ],
        "organisations": [
            "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        ],
        "timings": {
            "fixed_period": {
                "start_date": 1648067185,
                "end_date": 1648067185
            },
            "availability": [
                {
                    "start_time": "13:00",
                    "end_time": "14:00",
                    "day": 1,
                    "month": 1
                }
            ]
        }
    },
    "basket": {
        "rules": {
            "payment_method_types": [
                "ELECTRONIC_TRANSFER"
            ],
            "supply_methods": [
                "DELIVERY"
            ],
            "value": 9.99,
            "quantity": 5
        },
        "products": {
            "groups": [
                {
                    "group": "G1",
                    "operator": "AND",
                    "conditions": [
                        {
                            "operator": "OR",
                            "condition": "",
                            "product": {
                                "item_type": "SKU",
                                "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
                            },
                            "quantity": 1,
                            "value": 9.99,
                            "billing_cycle": {
                                "duration": 1,
                                "uot": "DAY"
                            },
                            "contract_period": {
                                "duration": 12,
                                "uot": "MONTH"
                            },
                            "services": [
                                {
                                    "id": "1af94364-b0f2-d656-aed6-bd3e3978cab4",
                                    "quantity": 2
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    },
    "offerings": [
        {
            "type": "AMOUNT",
            "amount": 1.99,
            "product": {
                "item_type": "SKU",
                "item_id": "2f6a70b6-84d4-2859-d230-093cb7e95c62"
            },
            "duration": {
                "type": "PERIOD",
                "period": {
                    "duration": 6,
                    "uot": "MONTH"
                }
            }
        }
    ]
}
Delete Promotion
DELETE /promotions/{id}

Deletes an existing Promotion. Deletion includes deleting all information of the promotion including target and basket conditions and offerrings. A Promotion cannot be deleted if it was applied to a termed service and that service still has some period left to benefit from the Promotion.

Path variables

id
string required

The unique identifier of the Promotion

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

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/promotions/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 204 No Content 
List Promotions
GET /promotions

Returns a list of promotions that can be applied per organisation, for specific period etc

Request parameters

state
string optional

The state of the promotion

Enumeration:
ACTIVE
INACTIVE
item_type
string optional

Required if a list of discounted items is specified. Indicates if the item is a product or a product type, brand, family or category.

Enumeration:
SKU
TYPE
FAMILY
BRAND
items
array of string optional

Items that get a discount from the promotions. The list includes a set of identifiers. All of the identifiers must have the same “item_type”.

Collection format: csv
Unique items: YES
organisations
array of string optional
Collection format: csv
Unique items: YES
Example:
[
    " 4dc0809f-ed91-4b68-b912-5bd6064d901e"
]
segments
array of string optional

List of customer segments

Collection format: csv
search_value
string optional

Search for an promotion using its name

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

The unique identifier of the Promotion

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

The Promotion’s name

Example:
20% Xmas
short_description
string

A short description for the Promotion

Example:
20% off during Xmas time
long_description
string

A more detailed description of the Promotion and its targets/offerrings

Example:
20% off, unconditional avialable during Xmas time and up until the end of year
state
string

The Promotion’s state

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
availability
Object

When the Promotion is available that means that it is applied only during the specified period.

from_date
integer

Promotion applied as of the start date

Example:
1648067185
to_date
integer

Promotion applied up until this date, if specified

Example:
1648067185
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
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/promotions HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "20% Xmas",
            "short_description": "20% off during Xmas time",
            "long_description": "20% off, unconditional avialable during Xmas time and up until the end of year",
            "state": "ACTIVE",
            "availability": {
                "from_date": 1648067185,
                "to_date": 1648067185
            },
            "creatives": [
                {
                    "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                    "usage_type": "DELIVERY_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"
                        }
                    ]
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Promotion
GET /promotions/{id}

Retrieves detailed information for a Promotion

Path variables

id
string required

Promotion identifier

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 OK
Body
Object
id
string

Unique identifier of the Promotion

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

Promotion name

Example:
Sales season
state
string

Promotion’s state. The Promotion must be in Active state in order to be applied on ordering

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
short_description
string

Short description for the Promotion

Example:
£10 off
long_description
string

More detailed description of the Promotion

Example:
Get as £10 off for your Orders during this year's Summer Sales season!
availability
Object

Determines when the Promotion will be applied on products ordering.

from_date
integer

Contacts get the Promotion on orders performed from this date onward

Example:
1649231923
to_date
integer

Promotion applied on orders up until this date

Example:
1649231924
targets
Object

Conditions that should be met for contacts to benefit from the Promotion. Set of conditions include who (segment), where (orgnaisations) and when (timings) services or physical goods should be ordered to get the Promotin’s discount.

segments
Array
Object
id
string

The unique identifier of the Segment

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

The name of the Segment

Example:
VIP contacts
organisations
Array
Object
id
string

The unique identifier of the Organisation

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

The name of the Organisation

Example:
Good Burgers
timings
Object
fixed_period
Object nullable

Promotion is applied if the purchase is performed within the specified period off time. Either a fixed period or promotion availability must be specified

start_date
integer epoch

Promotion applied if purchase is performed from this date (inclusive) and onwards

Example:
1648067185
end_date
integer epoch

If specified, then purchase must be performed up until this date. Optional.

Example:
1648067185
availability
Array

Promotion is applied if the purchase is performed within the specified day(s), month(s) and/or times. Either a fixed period or promotion availability must be specified. Each availibility option should be unique

Object
day
integer

Day of the week.Allowed values 1 to 7, where 1 is Sunday

Example:
1
month
integer

Month of year. Allowed values 1 to 12, where 1 is Januaryt

Example:
1
start_time
string

Starting time

Example:
13:00
end_time
string

End time

Example:
14:00
barket
Object
rules
Object

Rules that -if specified- should be met in order for the Promotion to be applied.

payment_method_type
Array

Contact should pay using one of the specified payment method types to get the offerring

string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
supply_method
Array

Purchase is fulfiflled using one of the specified supply methods for the contact to get the offering

string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
value
number

Minimum required basket total amount for the promotion to be applied. The amount is always set in the business’s base currency

Example:
9.99
quantity
integer

Miminum required quantity of basket items

Example:
5
products
Object

Products that should be included in the basket for the Promotion to be applied. Product conditions are defined as groups of conditions. In Each group there’s a product setting and the conditions that should be met. Multiple groups can be added, logically separated by AND/OR operators.

groups
Array

Group of product conditions.

Object
group
string required

The group’s name. Each group name must be unique

Example:
G1
operator
string required

Logical operator used amount the product conditions

Enumeration:
AND
OR
Example:
AND
conditions
Array

List of product conditions. Mulitple conditions can be added, each one referring to a single product. All product conditions mus tbe met to apply the promotion

Object
operator
string
Example:
OR
condition
string
product
Object required

The product that should be included in the basket

item_type
string required
Enumeration:
SKU
TYPE
BRAND
FAMILY
Example:
SKU
item_id
string required

The identifier of the product/type/brand/family.

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

The product’s SKU. Applicable only when item type is set to Product

Example:
HDSTB123
name
string

The name of the product/type/brand/family

Example:
HD STB
quantity
integer

The minimum required quantity of items to be included in the basket for the promotion to be applied

Example:
1
value
number

The minimum required basket items cost. Cost is defined in the business’s base currency

Example:
9.99
billing_cycle
Object

The billing cycle of the basket item. Applicable only for termed services. The billing cycle is the one specified in the service’s price terms selected on ordering

duration
integer

Billing cycle duration

Example:
1
uot
string

Billing cycle unit of time

Enumeration:
DAY
MONTH
Example:
DAY
contract_period
Object

The contract period of the basket item. Applicable only for termed services. The contract period is the one specified in the service’s price terms selected on ordering

duration
integer

Contract period duration

Example:
12
uot
string

Contract period unti of time

Enumeration:
MONTH
Example:
MONTH
services
Array

List of services to which a contact must already be subscribed to in order to get the promotion. Only termed services can be specified. Available and applicable only when the basket item is a termed service or a product type of Termed service classification.

Unique items: YES
Object
id
string

Termed service product identifier

Example:
1af94364-b0f2-d656-aed6-bd3e3978cab4
sku
string

Product SKU

Example:
TV001
name
string

Product name

Example:
Films
quantity
number

Minimum reuqired subscirpiton service quantity to get the promotion

Example:
2
offerings
Array
Object
type
string required

Defines whether the offerring is an actual discount amount or a discount percentage

Enumeration:
AMOUNT
PERCENTAGE
Default:
AMOUNT
Example:
AMOUNT
amount
number required

The discount amount or percentage depending on the offerring’s type

Example:
1.99
product
Object required

The product on which the discount will be applied

item_type
string

Determines on which product the discount will be applied.

Enumeration:
SKU
TYPE
BRAND
FAMILY
item_id
string

The unique identifier of the product item

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

The product’s SKU. Applicable only for SKU item types

Example:
STB12345
name
string

The product/type/brand/family name

Example:
HD STB
duration
Object

How long the offering will be applied. Applicable only when the offerring’s product is a termed service

type
string required

Indicates whether the offerring will be applied once, for period fo time or forever.

Enumeration:
ONCE
PERIOD
FOREVER
Example:
PERIOD
period
Object

Applicable and required nly when the offeering ill be applied for a specific PERIOD

duration
integer

The period’s duration

Example:
6
uot
string

The period’s unit of time

Enumeration:
DAY
MONTH
YEAR
Example:
MONTH
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
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/promotions/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "name": "Sales season", 
    "state": "ACTIVE",
    "short_description": "£10 off",
    "long_description": "Get as £10 off for your Orders during this year's Summer Sales season!",
    "availability": {
        "from_date": 1649231923,
        "to_date": 1649231924
    },
    "targets": {
        "segments": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "VIP contacts"
            }
        ],
        "organisations": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Good Burgers"
            }
        ],
        "timings": {
            "fixed_period": {
                "start_date": 1648067185,
                "end_date": 1648067185
            },
            "availability": [
                {
                    "day": 1,
                    "month": 1,
                    "start_time": "13:00",
                    "end_time": "14:00"
                }
            ]
        }
    },
    "barket": {
        "rules": {
            "payment_method_type": [
                "WALLET"
            ],
            "supply_method": [
                "DELIVERY"
            ],
            "value": 9.99,
            "quantity": 5
        },
        "products": {
            "groups": [
                {
                    "group": "G1",
                    "operator": "AND",
                    "conditions": [
                        {
                            "operator": "OR",
                            "condition": "",
                            "product": {
                                "item_type": "SKU",
                                "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                                "sku": "HDSTB123",
                                "name": "HD STB"
                            },
                            "quantity": 1,
                            "value": 9.99,
                            "billing_cycle": {
                                "duration": 1,
                                "uot": "DAY"
                            },
                            "contract_period": {
                                "duration": 12,
                                "uot": "MONTH"
                            },
                            "services": [
                                {
                                    "id": "1af94364-b0f2-d656-aed6-bd3e3978cab4",
                                    "sku": "TV001",
                                    "name": "Films",
                                    "quantity": 2
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    },
    "offerings": [
        {
            "type": "AMOUNT",
            "amount": 1.99,
            "product": {
                "item_type": "TYPE",
                "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "STB12345",
                "name": "HD STB"
            },
            "duration": {
                "type": "PERIOD",
                "period": {
                    "duration": 6,
                    "uot": "MONTH"
                }
            }
        }
    ],
    "creatives": [
        {
            "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
            "usage_type": "BACKGROUND",
            "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"
                }
            ]
        }
    ]
}
Promotion Media Groups
POST /promotions/{id}/media_groups

Link a promotion with one or more media groups

Path variables

id
string GUID required

The promotion (identifier) that media groups will be set

Example:
3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb

Notes

MEDIA UPLOAD

Uploading media for a promotion requires the execution of the following APIs

  1. Create new Media Group
  2. Create Promotion 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

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
POST https://sandbox.crm.com/backoffice/v2/promotions/3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb/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 
Content Translations
PUT /promotions/{id}/translations
GET /promotions/{id}/translations
PUT /promotions/{id}/translations/actions
Update Promotion Translations
PUT /promotions/{id}/translations

Update the content translations for an existing promotion

Path variables

id
string GUID required

The promotion (identifier) of which content translations will be updated

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

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
language_code
string required
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array nullable

The content translations for the specified language

Object
key
string required

The content (attribute) key

Example:
name
value
string required

The content (attribute) translated value

Example:
10% cashback return

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
PUT https://sandbox.crm.com/backoffice/v2/promotions/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

[
    {
        "language_code": "EN",
        "translations": [
            {
                "key": "name",
                "value": "10% cashback return"
            }
        ]
    }
]

HTTP/1.1 204 No Content 
Get Promotion Translations
GET /promotions/{id}/translations

Retrieve the content translations for an existing promotion

Path variables

id
string GUID required

The promotion (identifier) of which content translations will be retrieved

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Request parameters

language_code
string optional

Filter based on language

Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN

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
language_code
string
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array

The content translations for the specified language

Object
key
string

The content (attribute) key

Example:
name
value
string

The content (attribute) translated value

Example:
10% cashback return
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/promotions/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "language_code": "EN",
            "translations": [
                {
                    "key": "name",
                    "value": "10% cashback return"
                }
            ]
        }
    ]
}
Perform Promotion Translation Actions
PUT /promotions/{id}/translations/actions

Perform content translation actions on a promotion (e.g. export a promotion’s translations)

Path variables

id
string GUID required

The promotion (identifier) of which content translation actions will be performed

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Notes

IMPORT CONTENT TRANSLATIONS FLOW

Importing content translations should be made based on the following API order

  1. Upload File Signature
  2. Import Translations
EXPORT CONTENT TRANSLATIONS FLOW

Exporting content translations into different file should be made using the following API order

  1. Export Translations

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 action that will be applied

Enumeration:
IMPORT
EXPORT
file
Object required

The file (identifier) that will be used for importing translations (required only for import action)

id
string GUID required nullable

The file (identifier) that will be used for importing translations (required only for import action)

Example:
1e347d4d-ab96-6957-fdb6-35e72b3d9185
mime
string required nullable

The file (mime type) that will be used for exporting translations (required only for export action)

Example:
json

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
Example 2
PUT https://sandbox.crm.com/backoffice/v2/promotions/a42dd7c4-e755-92fb-963b-5f658a59908e/actions HTTP/1.1 

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

{
    "action": "IMPORT",
    "file": {
        "id": "1e347d4d-ab96-6957-fdb6-35e72b3d9185"
    }
}

HTTP/1.1 204 No Content 
PUT https://sandbox.crm.com/backoffice/v2/promotions/a42dd7c4-e755-92fb-963b-5f658a59908e/actions HTTP/1.1 

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

{
    "action": "EXPORT",
    "file": {
        "mime": "json"
    }
}

HTTP/1.1 204 No Content 
Order Catalogues

An Order Catalogue is a sub-set of the Product Catalogue. An Order Catalogue is created by an Organisation to be used for ordering purposes on front-end systems like mobile apps and portals. So consumers are able to order products from various Order Catalogues depending on the day or time or organisation from which they are ordering products.

POST /order_catalogues
GET /order_catalogues
GET /order_catalogues/{id}
PUT /order_catalogues/{id}
DELETE /order_catalogues/{id}
POST /order_catalogues/{id}/media_groups
Create Order Catalogue
POST /order_catalogues

Create a new Order Catalogue. Once created, the catalogue will be in Inactive state i.e. still not available durng the Ordering process and needs to be activated in a separate call. Within the catalogue products are included in Categories and their sub-categories. Either a category or its sub-categories must include products. The priority of products can also be set. Products that cannot be included in Order Catalogues

  • Usage Services
  • Expenses
  • Modifiers
  • Variants

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 name of the Order Catalogue. The name should be unique across all Order Catalogues.

Example:
Summer Catalogue
description
string

The description of the Order Catalogue

Example:
Services and Physical goods avialable fo rsale during summer time
display_name
string required

The display name of the Order Catalogue. If not specified, then it defaults to the the catalogue’s name

Example:
Summer!
supply_methods
Array required

The supported supply methods of the Order Catalogue

Example:
DELIVERY
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
accessibility
Object

List of organisations that have access and call fulfill orders of items ordered based on the Order Catalogue.

type
string

Order cataogue is accessible by all Organisations under a Business or by specific ones.

Enumeration:
ALL
SPECIFIC
Example:
SPECIFIC
organisations
Array

List of organisations that have access to the order catalogue. Applicable and required when the accessibility is set to Specific.

Min items: 1
Unique items: YES
Object
id
string

Organisation unique identifier

time_availability
Array
Object
day_of_week
string nullable
Enumeration:
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY
SUNDAY
start_time
string nullable

Order catalogue available from this time

Example:
09::00
end_time
string nullable

Order catalogue available up until this time

Example:
17:00
categories
Array

An Order catalogue requires at least one category. Categories group together products of the product catalogue. A Category might or might not have sub-categories.

Object
name
string required

Order catalogue category name. The name must be unique among the same catalogue’s categories

Example:
Drinks
code
string

Category code. Should also be unique.

Example:
CD001
description
string

Category’s description

Example:
Cold drinks served during lunch hours
priority
integer

Determines how categories will be prioritised within the UI

Example:
1
products
Array

List of products included in the Category. A product might be included in multiple Categories of the same catalogue. Products are specified either under the Cataogry and, if a cateogry has sub-categories, then products are added per sub-category. Products cannot be added in both.

Object
id
string

Product unique identifier

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

The product’s priority (ordering) within the catalogue. Used for display purposes.

Example:
1
sub_categories
Array

Further catagorisation of the products into sub-categories.Sub-categories cannot have their own child nodes.

Min items: 0
Unique items: YES
Object
name
string required

Name of sub-category. Must be unique across sub-categories of the same category

Example:
Cold Drinks
code
string required

Code for sub-category

Example:
CDD001
description
string

Description for sub-category

Example:
Juice & Soft-drinks
priority
string

Determines how sub-categories will be prioritised within the UI

Example:
1
products
Array required

List of products included in the sub-category. A product can only be added once within a Category’s sub-categories. But it can be added in another Category as well. At least one product must be specified

Min items: 1
Unique items: YES
Object
id
string required

Product unique identifier

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

The product’s priority (ordering) within the catalogue. Used for display purposes.

Example:
1

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The order catalogue identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/order_catalogues HTTP/1.1 

Content-Type: application/json

{
    "name": "Summer Catalogue",
    "description": "Services and Physical goods avialable fo rsale during summer time",
    "display_name": "Summer!",
    "supply_methods": [
        "DELIVERY"
    ],
    "accessibility": {
        "type": "SPECIFIC",
        "organisations": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
            }
        ]
    },
    "time_availability": [
        {
            "day_of_week": "WEDNESDAY",
            "start_time": "09::00",
            "end_time": "17:00"
        }
    ],
    "categories": [
        {
            "name": "Drinks",
            "code": "CD001",
            "description": "Cold drinks served during lunch hours",
            "priority": 1,
            "products": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "priority": 1
                }
            ],
            "sub_categories": [
                {
                    "name": "Cold Drinks",
                    "code": "CDD001",
                    "description": "Juice & Soft-drinks",
                    "priority": "1",
                    "products": [
                        {
                            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                            "priority": 1
                        }
                    ]
                }
            ]
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Order Catalogues
GET /order_catalogues

Returns a list of order catalogues

Request parameters

search_value
string optional

Search for an order catalogue using its name, display name or description

fulfilled_by
string GUID optional

Retreive order catalogues based on organisation

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
supply_method
array of Order Supply Method (enum) optional

Retrieve order catalogue based on supply method

Collection format: csv
state
string optional
Enumeration:
ACTIVE
INACTIVE
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
id
string GUID

The order catalogue identifier

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

The name of the order catalogue

Example:
Monday menu
description
string

The description of the order catalogue

Example:
Monday menu for Food & Drinks
dislpay_name
string

The dislpay name of the order catalogue

Example:
Monday Menu
state
string

The state that the order catalogue

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
owner
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
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/order_catalogues HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Monday menu",
            "description": "Monday menu for Food & Drinks",
            "dislpay_name": "Monday Menu",
            "state": "ACTIVE",
            "owner": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Order Catalogue
GET /order_catalogues/{id}

Retrieve detailed information for a specific order catalogue

Path variables

id
string required

The order catalogue identifier

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

The order catalogue identifier

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

The name of the order catalogue

Example:
Monday menu
description
string

The description of the order catalogue

Example:
Monday menu for food and drinks
display_name
string

The dislay name of the order catalogue

Example:
Monday Menu
supply_methods
Array

The supported supply methods of the Order catalogue

Example:
DELIVERY
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
state
string

The state that the order catalogue

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
time_availability
Array
Object
day_of_week
string nullable
Enumeration:
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY
SUNDAY
start_time
string nullable

Order catalogue available from this time

Example:
09::00
end_time
string nullable

Order catalogue available up until this time

Example:
17:00
accessibility
Object
type
string

Order cataogue is accessible by all Organisations under a Business or by specific ones.

Enumeration:
ALL
SPECIFIC
Default:
ALL
Example:
SPECIFIC
organisations
Array

List of organisations that have access to the order catalogue. Applicable and required when the accessibility is set to Specific.

Min items: 1
Unique items: YES
Object
id
string

Organisation uniue identifier

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

Order catalogue categories

Object
id
string

Order catalogue category identifier

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

Category name

Example:
Food
code
string

Category code

Example:
FOOD
priority
integer

Prioriy of the category, used for display (ordering) UI purposes

Example:
1
products
Array

List of products included in the Category. A product might be included in multiple Catagories of the same catalogue. Products are specified either under the Cataogry and, if a cateogry has sub-categories, then products are added per sub-category. Products cannot be added in both.

Object
id
string

Product identifier

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

Product SKU

Example:
ABC1234
name
string

Product name

Example:
Coffee
sub_categories
Array
Object
id
string

Sub-category unique identifier

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

Sub-category name

Example:
Main dishes
code
string

Sub-category code

Example:
MD001
priority
integer

Prioriy of the sub-category, used for display (ordering) UI purposes

Example:
1
products
Array

List of products included in the sub-category. A product can only be added once within a Category’s sub-categories. But it can be added in another Category as well.

Object
id
string

Product identifier

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

Product SKU

Example:
ABC1234
name
string

Product name

Example:
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
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/order_catalogues/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "name": "Monday menu", 
    "description": "Monday menu for food and drinks",
    "display_name": "Monday Menu",
    "supply_methods": [
        "DELIVERY"
    ],
    "state": "ACTIVE",
    "time_availability": [
        {
            "day_of_week": "SATURDAY",
            "start_time": "09::00",
            "end_time": "17:00"
        }
    ],
    "accessibility": {
        "type": "SPECIFIC",
        "organisations": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
            }
        ]
    },
    "categories": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Food",
            "code": "FOOD",
            "priority": 1,
            "products": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "sku": "ABC1234",
                    "name": "Coffee"
                }
            ],
            "sub_categories": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "Main dishes",
                    "code": "MD001",
                    "priority": 1,
                    "products": [
                        {
                            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                            "sku": "ABC1234",
                            "name": "Coffee"
                        }
                    ]
                }
            ]
        }
    ],
    "creatives": [
        {
            "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
            "usage_type": "DELIVERY_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"
                }
            ]
        }
    ]
}
Update Order Catalogue
PUT /order_catalogues/{id}

Updates an existing Order Catalogue. Within the catalogue products are included in Categories and their sub-categories. Either a category or its sub-categories must include products. The priority of products can also be set. Products that cannot be included in Order Catalogues

  • Usage Services
  • Expenses
  • Modifiers
  • Variants

Path variables

id
string GUID required

The order catalogue identifier that will be updated

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

Request body

Object
name
string

The name of the Order Catalogue

Example:
Monday menu
state
string

Update the state of the catalogue

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
description
string

The description of the Order Catalogue

Example:
Food & Drinks Monday meu
display_name
string

The display name of the Order Catalogue

Example:
Monday menu
supply_methods
Array

The supported supply method of the Order Catalogue

Example:
DELIVERY
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
accessibility
Object
type
string

Order cataogue is accessible by all Organisations under a Business or by specific ones.

Enumeration:
ALL
SPECIFIC
Default:
ALL
Example:
SPECIFIC
organisations
Array

List of organisations that have access to the order catalogue. Applicable and required when the accessibility is set to Specific.

Min items: 1
Unique items: YES
Object
id
string

Organisation uniue identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
time_availability
Array
Object
day_of_week
string nullable
Enumeration:
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY
SUNDAY
start_time
string nullable

Order catalogue available from this time

Example:
09::00
end_time
string nullable

Order catalogue available up until this time

Example:
17:00
categories
Array

An Order catalogue requires at least one category. Categories group together products of the product catalogue. A Category might or might not have sub-categories.

Object
id
string required

Order catalogue catagory identifier

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

Catagory name which has to be uique across the same catalogue’s categories

Example:
Drinks
code
string

Category code which has to be unique across the same catalogue’s categories

Example:
D0001
description
string

A description for the category

Example:
Hot & Clond drinks offered on weekends
priority
integer

The category’s priority. Used for sorting purposes within the UI

Example:
1
products
Array

List of products included in the Category. A product might be included in multiple Categories of the same catalogue. Products are specified either under the Cataogry and, if a cateogry has sub-categories, then products are added per sub-category. Products cannot be added in both.

Object
id
string required

Product identifier

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

The product’s priority. Used for sorting purposes within the UI

Example:
1
sub_categories
Array

Further catagorisation of the products into sub-categories.Sub-categories cannot have their own child nodes.

Object
id
string required

Sub-category identifier

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

Sub-category name that has to be unique across the same Category’s sub-categories

Example:
Cold Drinks
code
string

Sub-category code that has to be unique across the same Category’s sub-categories

Example:
C0001
description
string

Sub-category description

Example:
Cold Drinks
priority
integer

The sub-category’s priority. Used for sorting purposes within the UI

products
Array required

List of products included in the sub-category. A product can only be added once within a Category’s sub-categories. But it can be added in another Category as well. At least one product must be specified

Min items: 1
Unique items: YES
Object
id
string required

Product identifier

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

The product’s priority. Used for sorting purposes within the UI

Example:
1

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The order catalogue identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/order_catalogues/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "name": "Monday menu",
    "state": "ACTIVE",
    "description": "Food & Drinks Monday meu",
    "display_name": "Monday menu",
    "supply_methods": [
        "DELIVERY"
    ],
    "accessibility": {
        "type": "SPECIFIC",
        "organisations": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
            }
        ]
    },
    "time_availability": [
        {
            "day_of_week": "THURSDAY",
            "start_time": "09::00",
            "end_time": "17:00"
        }
    ],
    "categories": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Drinks",
            "code": "D0001",
            "description": "Hot & Clond drinks offered on weekends",
            "priority": 1,
            "products": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "priority": 1
                }
            ],
            "sub_categories": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "Cold Drinks",
                    "code": "C0001",
                    "description": "Cold Drinks",
                    "priority": 1,
                    "products": [
                        {
                            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                            "priority": 1
                        }
                    ]
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Order Catalogue
DELETE /order_catalogues/{id}

Deletes an existing Order Catalogue

Path variables

id
string GUID required

The Order Catalogue identifier that will be deleted

Example:
CA123456789AQWSXZAQWS1236547896541

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/order_catalogues/CA123456789AQWSXZAQWS1236547896541 HTTP/1.1 

HTTP/1.1 204 No Content 
Order Catalog Media Groups
POST /order_catalogues/{id}/media_groups

Link an order catalogue with one or more media groups

Path variables

id
string GUID required

The order catalogue (identifier) that media groups will be set

Example:
6A24D2B5E44F44B28451FE021FCAD51E

Notes

MEDIA UPLOAD

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

  1. Create new Media Group
  2. Create Order Catalog 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:
7ec65711-8f3b-538c-dec9-8c36ce818382

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
POST https://sandbox.crm.com/backoffice/v2/order_catalogues/6A24D2B5E44F44B28451FE021FCAD51E/media_groups HTTP/1.1 

Content-Type: application/json

[
    {
        "media_group_id": "7ec65711-8f3b-538c-dec9-8c36ce818382"
    }
]
Rewards
Reward Events
GET /rewards/events
GET /rewards/events/{id}/details
List Reward Events
GET /rewards/events

Retrieve a list of reward events based on search criteria (e.g. all purchase events)

Request parameters

event
string optional

Filter based on event type

Enumeration:
PURCHASE
REFERRAL
LOTTERY
THANK_YOU
CONTACT_REGISTRATION
PROFILE_COMPLETION
ACHIEVEMENT
AD_HOC_RETURN
REACH_TIER
SUBSCRIPTION_MATURITY
date
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

total_amount
string optional

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

Enumeration:
total_amount[gt]

Returns results where the total amount is greater than this value

total_amount[gte]

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

total_amount[lt]

Returns results where the total amount is less than this value

total_amount[lte]

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

contact_id
string GUID optional

Filter based on contact (identifier) that such event was performed against

Example:
8aea3eea-eb4d-b917-4b5a-7a2515638966
organisations
array of string optional

Filters based on organisation (identifier) that such event was performed on (applicable only for purchase events)

Collection format: csv
tap_codes
array of string optional

Filters based on organisation tap (code) that such event was performed on (applicable only for purchase events)

Collection format: csv

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

Details about the reward event

id
string GUID

The event identifier

Example:
5ee16b3d-090c-c178-d18f-c0035eeb1edb
type
string

The type of the event

Enumeration:
PURCHASE
REFERRAL
LOTTERY
THANK_YOU
CONTACT_REGISTRATION
PROFILE_COMPLETION
ACHIEVEMENT
AD_HOC_RETURN
REACH_TIER
SUBSCRIPTION_MATURITY
reference_number
string

The event reference number uniquely identifing the Customer Events

Example:
CE1234
state
string

The export definition status

Enumeration:
POSTED
CANCELLED
date
integer epoch

The date that the event was created

Example:
1614948921
total_amount
number

The amount that was posted as part of the event (applicable for PUCHASE and Ad Hoc Returns)

Example:
17.99
organisation
Object

Details about the organisation that such event was created by (if event = PURCHASE, defaults to the performed by organisation)

id
string GUID

The organisation identifier

Example:
5ee16b3d-090c-c178-d18f-c0035eeb1edb
name
string

The organisation name

Example:
CRM
type
string

The organisation type

Enumeration:
BUSINESS
MERCHANT
VENUE
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
contact
Object

Details about the contact related to this event

id
string GUID

The contact identifier

Example:
9ec78c62-d56a-a43c-95e9-d6da4cc22d08
name
string

The contact full name

Example:
John Ray Doe
code
string

The contact code

Example:
123456789
cim
string

The contact unique cim (contact identification medium)

Example:
1602754465
rewards
Object

Details about the rewards related to this event

award
number

The total amount awarded for this event

Example:
140.59
redeem
number

The total amount redeemed for this event (applicable only for PURCHASE)

Example:
15.33
spend
number

The total amount spent by this event

Example:
12.21
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/rewards/events HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "event": {
                "id": "5ee16b3d-090c-c178-d18f-c0035eeb1edb",
                "type": "PURCHASE",
                "reference_number": "CE1234",
                "state": "CANCELLED",
                "date": 1614948921,
                "total_amount": 17.99,
                "organisation": {
                    "id": "5ee16b3d-090c-c178-d18f-c0035eeb1edb",
                    "name": "CRM",
                    "type": "VENUE"
                },
                "classification": {
                    "id": "c8d83493-3f50-40df-adb0-762ec5f41863",
                    "name": "Delivery Purchase"
                }
            },
            "contact": {
                "id": "9ec78c62-d56a-a43c-95e9-d6da4cc22d08",
                "name": "John Ray Doe",
                "code": "123456789",
                "cim": "1602754465"
            },
            "rewards": {
                "award": 140.59,
                "redeem": 15.33,
                "spend": 12.21
            }
        }
    ]
}
List Reward Events Breakdown
GET /rewards/events/{id}/details

Retrieves all transactions (e.g. award, redeem, spend, wallet, financial) related to a reward event

Path variables

id
string GUID required

The reward event (identifer) for which additional details will be retrieved

Example:
d46788e6-2c77-2948-2bb9-9521a0f54a8c

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
reward_transactions
Array

Details about award and spend transactions related to the event

Object
type
string

The reward transaction type

Enumeration:
AWARD
SPEND
code
string

The transaction (unique) code

Example:
123234342342432342324r43
amount
number

The amount that was awarded, redeemed or spent

Example:
14.99
redeem_method
string

Defines which redeem methods are allowed

Enumeration:
DEFERRED
INSTANT
state
string

The transaction state

Enumeration:
POSTED
CANCELLED
EXPIRED

Only for Award Transactions

date
integer epoch

The date on which such transaction was posted

Example:
1614954223
reward_offer
Object

The reward offer that the promotion pass will consume.

id
string GUID

The reward offer identifier

Example:
c888dd7a-7476-538c-730a-9f924bd82d04
name
string

The reward offer name

Example:
Birthday Offer
financial_events
Array

Details about financial event related to the reward event (can be the initiated transaction or the end result)

Object
type
string

The transaction type

Enumeration:
CREDIT_NOTE

Credit Note can initiate a reward event (purchase cancellation)

INVOICE

Invoice can initiate a reward event (purchase creation)

REFUND

Refund can be the result of a reward event (due to spend)

TOP_UP

Top-Up can initiate a reward event (achievement creation)

id
string GUID

The transaction identifier

Example:
7ff08bc0-c7e9-c9fe-f752-71cfb3ee0dc3
number
string

The transaction number

Example:
1234
reference_number
string

The transaction reference number

Example:
REF12343
state
string

The life cycle state of the financial transaction

Enumeration:
DRAFT
POSTED
REJECTED
PENDING
amount
number

The transaction amount

Example:
112.24
date
integer epoch

The date on which such transaction was posted

Example:
1614954223
wallet_fees
Array

Details about the wallet fees related to the event

Object
type
string

Defines the reason for which the fee was applied on wallet

Enumeration:
CREDIT

On Credit Wallet Transactions

DEBIT

On Debit Wallet Transactions

id
string GUID

The wallet transaction identifier

Example:
4af933c7-2594-9c9c-d2d5-1ab4ff89fd59
amount
number

The fee amount

Example:
12.12
name
string

The fee rule name

Example:
1% on all wallet transactions
date
integer epoch

The date on which such fee was applied

Example:
1614954223
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/reward_events/d46788e6-2c77-2948-2bb9-9521a0f54a8c/details HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "reward_transactions": [
                {
                    "type": "AWARD",
                    "code": "123234342342432342324r43",
                    "amount": 14.99,
                    "currency":"EUR",
                    "spend_method": "INSTANT",
                    "state": "CANCELLED",
                    "date": 1614954223,
                    "reward_offer": {
                        "id": "7ff08bc0-c7e9-c9fe-f752-71cfb3ee0dc3",
                        "name": "Birthday Offer"
                    }
                }
            ],
            "financial_events": [
                {
                    "type": "CREDIT_NOTE",
                    "id": "7ff08bc0-c7e9-c9fe-f752-71cfb3ee0dc3",
                    "number": "1234",
                    "reference_number": "REF12343",
                    "state": "POSTED",
                    "amount": 112.24,
                    "currency":"EUR",
                    "date": 1614954223
                }
            ],
            "wallet_fees": [
                {
                    "type": "CREDIT",
                    "id": "4af933c7-2594-9c9c-d2d5-1ab4ff89fd59",
                    "amount": 12.12,
                    "currency":"EUR",
                    "name": "1% on all wallet transactions",
                    "date": 1614954223
                }
            ]
        }
    ]
}
Reward Offers
POST /reward_offers
PUT /reward_offers/{id}
DELETE /reward_offers/{id}
GET /reward_offers
GET /reward_offers/{id}
GET /reward_offers/{id}/contacts
GET /reward_offers/restrictions
Create Reward Offer
POST /reward_offers

Create a new reward offer under an existing reward scheme, based on which contacts can be awarded (given target conditions are met).

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 reward offer name

Example:
10% off any purchase
scheme_id
string GUID required

The reward scheme identifier that the offer will belong to it

Example:
4e485cda-e55a-b672-a9bd-a341335193a5
availability
Object required

The offer availability (from-to) dates (whithin this period contacts will be awarded)

from
integer epoch required

The from date that the offer will be applicable

Example:
1606819297
to
integer epoch nullable

The to date that the offer will be applicable to

Example:
1606819297
goal
string required

The offer goal

Enumeration:
ACHIEVEMENT
SPEND
VISITS
MEMBERSHIP
type
string required

The offer type (each goal is related with a type)

Enumeration:
LOTTERY
ACHIEVEMENT
GIFT
DISCOUNT
BUNDLE
SIGNUP
REFER
PROFILE
HAPPYHOUR
REACH_TIER
SUBSCRIPTION_MATURITY
short_description
string nullable

The offer short description

Example:
Enjoy awards with this new offer
long_description
string nullable

The offer long description

Example:
Enjoy awards with this new offer and explore how rewards is good for you
terms_and_conditions
string nullable

The offer terms and conditions

Example:
Applicable for all EU residents
is_featured
boolean nullable

Defines whether the reward offer will be featured (ordered higher) in customer facing clients

Default:
false
Example:
false
targets
Object nullable

Details about the reward offer’s target conditios

achievements
Object nullable

The targerted achievement (monetary) condition

monetary
Object

Details about monetary achievement

currency
string

The transaction currency

Example:
USD
value
string

The transaction value

Example:
2.99
operator
string

The transaction value operator that should be met

Enumeration:
EQUAL

Value should be equal to the configured one

EQUAL_GREATER

Value should be greater or equal to the configured one

EQUAL_LESS

Value should be greater or less to the configured one

LESS

Value should be less to the configured one

GREATER

Value should be greater to the configured one

segments
Array nullable

The targerted contact segments

Unique items: YES
string GUID
Example:
62e543b3-0ea2-d658-b67a-3d452ee0d26d
profile
Array nullable

The targerted contact profile completness details

Unique items: YES
Object
information
string

The profile information that is provided

Enumeration:
BIRTHDATE
NAMEDAY
ADDRESS
EMAIL
PHONE
GENDER
PHONE_VERIFICATION
reward_tiers
Array nullable

The targerted contact reward tiers

Unique items: YES
string GUID
Example:
4980ad63-aa75-9635-fd0b-6b94b8782c47
classifications
Array nullable

The targeted event classification

Unique items: YES
string GUID
Example:
5d660d3a-80bb-1925-ef77-e29fd4bbfc7b
evaluation
Object nullable

Details about the evaluation time

start_date
integer epoch required

The date that the offer will be evaluaed (just once)

Example:
1592317898
frequency
string required

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
organisations
Array nullable

The targerted organisations that events performed on should be located at

Unique items: YES
string GUID
Example:
771993f9-ba38-9765-f1ac-1131de34a774
countries
Array nullable

The targerted (organisations) countries that events performed on should be located at

Unique items: YES
string
Example:
CYP
referral
string nullable

Defines what is required to award such referral

Enumeration:
AFTER_PURCHASE

Award will be provided after the referred customer registers and makes a purchases

ON_REGISTRATION

Award will be provided after the referred customers registers

maturity
Object nullable

The targerted subscription maturity

uot
string required

The period for subscription maturity check

Enumeration:
MONTH
YEAR
value
integer required

The maturity period

transactions
Object nullable

List conditions on transaction

transaction_total
Object

Total transaction conditions

currency
string

The transaction currency

Example:
EUR
value
number

The transaction value

Example:
10.99
uot
string

The period for which cumulative will be performed

Enumeration:
DAY
WEEK
MONTH
YEAR
OVERALL
operator
string

The condition operator

Example:
AND
products
Array

Product conditions

Object
groups
Array

List of product group conditions

Object
group
string

The group name

Example:
G1
operator
string

The group operator

Example:
AND
conditions
Array

Details about group conditions

Object
condition
string

The condition name

Example:
C1
id
string GUID

the product condition (sku/brand/etc) identifier

Example:
46332fda-8f84-4b6a-bd46-f00e48445b82
type
string

The condition type

Enumeration:
SKU
BRAND
FAMILY
name
string

The condition name

Example:
Product conditions
qty
integer

The product condition quantity

Example:
1
value
number

The product condition value

Example:
2.5
currency
string

The currency for product value

Example:
EUR
unit_of_time
string

The period for which cumulative will be performed

Enumeration:
DAY
WEEK
MONTH
YEAR
OVERALL
operator
string

The condition operator

Example:
AND
timings
Object

Timing Conditions

is_birthday
boolean

Offer targets condition on customer birthday

Example:
true
is_nameday
boolean

Offer targets condition on customer nameday

Example:
true
days_before
number

Offer will target X days before birthday/nameday

Example:
1
days_after
number

Offer will target X days after birthday/nameday

Example:
1
availability
Array

List of days/times that offer will target

Object
month
integer

The availability month

Example:
1
day
integer

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

Example:
1
start_time
string

The availability start time

Example:
19:00
end_time
string

The availability end time

Example:
21:00
entries
Object nullable

The targeted contact events that entries will be based on (e.g. every purchase made counts as 2 entries)

frequency
Object required

The frequency of an event, i.e hw many times an Event occured withn a period of time. Applicable and required for Event conditions.

operator
string required

The operator that shows he period of time during which Events must fall within in order for contacts to be included in the segment. Operators Between, On, Since require date(s) filters, whereas the rest of the operators need an integrer value(s)

Enumeration:
OVERALL
LAST_MONTHS
LAST_WEEKS
LAST_DAYS
period
integer nullable

The period of time that events will be evaluated for entries

Example:
2
events
Array required

The events that will be converted into lottery entries

Object

Details about contact behavioral actions

event
Object required

The event that a contact performed

type
string

The name of the event that a contact performed or not. Applicable and required only for conditions of type Event. If not specified, then contacts that performed any event are eligible to be included in the segment

Enumeration:
PURCHASE
PURCHASE_AMOUNT
PURCHASED_SKU
PURCHASED_BRANDS
PURCHASED_FAMILIES
PURCHASED_TYPES
REFERRAL
ACHIEVEMENT
ACHIEVEMENT_AMOUNT
ids
Array nullable

The related event type conditions that contact should meet as part of the performed event (applicable only for type based on product skus, families, brands and types)

string GUID
Example:
88c9f22e-e436-35c0-bc72-f58ad6de8c02
ratio
Array required

Defines the ratio between events and counted entries

Object
operator
string required

The frequency’s operator

Enumeration:
EQUAL

Applicable for single value

BETWEEN

Applicable for range values

Default:
EQUAL
min
integer required

The number of event value or in the case of range operator like Between, the starting value

Default:
1
Example:
1
max
integer nullable

The maximum number of event value, required when using “range” operators like Between.

Example:
12
entries
integer nullable

The number of entries that will be counted for for this event

Default:
1
Example:
2
properties_operator
string nullable

Multiple properties can be added to apply additional filtering on the conditions. If more than one properties are specified, an operator is required that defines the logic between properties

Enumeration:
ALL

All conditions should be met

ANY

At least one condition should be met

properties
Array nullable

Detais about properties/attibutes that can be used as additional filtering conditions

Object
property
string required

The event property

Enumeration:
CLASSIFICATION
MERCHANT
VENUE
AMOUNT
PRODUCT_SKU
PRODUCT_NAME
PRODUCT_BRAND
PRODUCT_FAMILY
PROPDUCT_TYPE
type
string required

The property’s data type

Enumeration:
TEXT
AMOUNT
DATE
NUMBER
operator
string required

The property’s condition operator

Enumeration:
IS
IS_NOT
ON
BEFORE
AFTER
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
IS_EMPTY
IS_NOT_EMPTY
STARTS_WITH
DOES_NOT_START_WITH
ENDS_WITH
DOES_NOT_END_WITH
LIKE
NOT_LIKE
EQUAL
NOT_EQUAL
LESS_THAN_OR_EQUAL
MORE_THAN_OR_EQUAL
min
string required

The property value or in the case of range operator like Between, the starting value

Example:
5.00
max
string nullable

The maximum value for the property, required when using “range” operators like Between.

Example:
10
value_list
Array of string nullable

List of (string) values required when the operator implies multiple values comparison, such as contains or does not contain

list_name
string nullable

Represents the list name (applicable only if property is list based)

Example:
products
awards
Array required

The award settings based on which a reward offer’s award is defined (e.g. amount or percentage based)

Object
type
string

The award type

Enumeration:
FIXED

Award will be based on a fixed amount

PERCENTAGE

Award will be based on a percentage amount

QTY

Award will be differentiated based on item quantity

PRODUCT

Award will be based on a free product (brand, family, sku, type)

amount
number required

The award amount

Example:
10.99
quantity
number nullable

Defines the quantity based on which a award will be provided (e.g. 1 litres)

Example:
1
products
Object nullable

The award product conditions

id
string GUID nullable

The product condition identifier (can be the identifier of a product sku, brand, family or type)

Example:
2df28809-72ff-379e-50e9-93873f06bbd9
type
string required

The product condition type

Enumeration:
SKU

Product SKU

FAMILY

Product Family

BRAND

Product Brand

TYPE

Product Type

TARGETED

All targeted based products

restrictions
Object required

Award Restrictions

total_winners
integer nullable

The number of contacts that can win a lotter draw

Default:
1
Example:
2
total_contacts
integer nullable

The total number of contacts that can be awarded. After that the offer (still active) will not award any more contacts

Example:
1
amount_cap
number nullable

The maximum awarded amount that can be provided (applicable when award is based on percentage)

Example:
99.99
frequency_cap
Object nullable

Restrict awards provided to a maximum threshold, such as 1 per day

frequency
number required

How many times an award will be provided

Example:
1
period
integer required

Period duration

Example:
1
uot
string nullable

Unit of Time of Period

Enumeration:
DAY
MONTH
YEAR
redeem
Object required

Award Restrictions

method
string

Defines which redeem methods are allowed

Enumeration:
DEFERRED
INSTANT
commerce_pool_id
string required nullable

The commerce pool identifier (required only if redeem method is deferred)

Example:
1783d4bb-2c1c-b40a-2955-ea89abc929d0
expiration
Object required nullable

Expiration (valid to) condition

type
string required

The award expiration type

Enumeration:
NEVER
SPECIFIC_DATE
PERIOD
MONTH_END
YEAR_END
specific_date
integer epoch nullable

The date that the amount expires (applicable for specific expiration type)

Example:
1590474228
period
integer nullable

The expiration period (applicable for period expiration type)

Example:
1
uot
string nullable

The award validity period unit (applicable for period validity type)

Enumeration:
HOUR
DAY
MONTH
YEAR

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The reward offer identifier

Example:
36b13448-dd9c-5a67-06e3-72ebda536c5c
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/reward_offers HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "10% off any purchase",
    "scheme_id": "4e485cda-e55a-b672-a9bd-a341335193a5",
    "availability": {
        "from": 1606819297,
        "to": 1606819297
    },
    "goal": "MEMBERSHIP",
    "type": "DISCOUNT",
    "short_description": "Enjoy awards with this new offer",
    "long_description": "Enjoy awards with this new offer and explore how rewards is good for you",
    "terms_and_conditions": "Applicable for all EU residents",
    "is_featured": "false",
    "targets": {
        "organisations": [
            "771993f9-ba38-9765-f1ac-1131de34a774"
        ]
    },
    "awards": [
        {
            "amount": 10.99,
            "currency_type": "DEFAULT"
        }
    ],
    "restrictions": {
        "total_contacts": 1
    },
    "redeem": {
        "method": "DEFERRED",
        "commerce_pool_id": "1783d4bb-2c1c-b40a-2955-ea89abc929d0"
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "36b13448-dd9c-5a67-06e3-72ebda536c5c"
}
Update Reward Offer
PUT /reward_offers/{id}

Update an existing reward offer

Path variables

id
string GUID required

The reward offer (identifier) that will be updated

Example:
ffb711de-2733-251f-e437-9bbdc864c4f2

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

Example:
10% off any purchase
availability
Object nullable

The offer availability (from-to) dates (whithin this period contacts will be awarded)

from
integer epoch required

The from date that the offer will be applicable

Example:
1606819297
to
integer epoch nullable

The to date that the offer will be applicable to

Example:
1606819297
short_description
string nullable

The offer short description

Example:
Reward Offer Short Description
long_description
string nullable

The offer long description

Example:
Reward Offer Long Description
terms_and_conditions
string nullable

Terms and Conditions

Example:
Applicable for all EU residents
is_featured
boolean nullable

Defines whether the reward offer will be featured (ordered higher) in customer facing clients

Default:
false
Example:
false
state
string

The offer life cycle state

Enumeration:
ACTIVE
INACTIVE
targets
Object nullable

Details about the reward offer’s target conditios

achievements
Object nullable

The targerted achievement (monetary) condition

monetary
Object

Details about monetary achievement

currency
string

The transaction currency

Example:
USD
value
string

The transaction value

Example:
2.99
operator
string

The transaction value operator that should be met

Enumeration:
EQUAL

Value should be equal to the configured one

EQUAL_GREATER

Value should be greater or equal to the configured one

EQUAL_LESS

Value should be greater or less to the configured one

LESS

Value should be less to the configured one

GREATER

Value should be greater to the configured one

segments
Array nullable

The targerted contact segments

Unique items: YES
string GUID
Example:
62e543b3-0ea2-d658-b67a-3d452ee0d26d
profile
Array nullable

The targerted contact profile completness details

Unique items: YES
Object
information
string

The profile information that is provided

Enumeration:
BIRTHDATE
NAMEDAY
ADDRESS
EMAIL
PHONE
GENDER
PHONE_VERIFICATION
reward_tiers
Array nullable

The targerted contact reward tiers

Unique items: YES
string GUID
Example:
4980ad63-aa75-9635-fd0b-6b94b8782c47
classifications
Array nullable

The targeted event classification

Unique items: YES
string GUID
Example:
5d660d3a-80bb-1925-ef77-e29fd4bbfc7b
evaluation
Object nullable

Details about the evaluation time

start_date
integer epoch required

The date that the offer will be evaluaed (just once)

Example:
1592317898
frequency
string required

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
organisations
Array nullable

The targerted organisations that events performed on should be located at

Unique items: YES
string GUID
Example:
771993f9-ba38-9765-f1ac-1131de34a774
countries
Array nullable

The targerted (organisations) countries that events performed on should be located at

Unique items: YES
string
Example:
CYP
referral
string nullable

Defines what is required to award such referral

Enumeration:
AFTER_PURCHASE

Award will be provided after the referred customer registers and makes a purchases

ON_REGISTRATION

Award will be provided after the referred customers registers

maturity
Object nullable

The targerted subscription maturity

uot
string required

The period for subscription maturity check

Enumeration:
MONTH
YEAR
value
integer required

The maturity period

transactions
Object nullable

List conditions on transaction

transaction_total
Object

Total transaction conditions

currency
string

The transaction currency

Example:
EUR
value
number

The transaction value

Example:
10.99
uot
string

The period for which cumulative will be performed

Enumeration:
DAY
WEEK
MONTH
YEAR
OVERALL
operator
string

The condition operator

Example:
AND
products
Array

Product conditions

Object
groups
Array

List of product group conditions

Object
group
string

The group name

Example:
G1
operator
string

The group operator

Example:
AND
conditions
Array

Details about group conditions

Object
condition
string

The condition name

Example:
C1
id
string GUID

the product condition (sku/brand/etc) identifier

Example:
46332fda-8f84-4b6a-bd46-f00e48445b82
type
string

The condition type

Enumeration:
SKU
BRAND
FAMILY
name
string

The condition name

Example:
Product conditions
qty
integer

The product condition quantity

Example:
1
value
number

The product condition value

Example:
2.5
currency
string

The currency for product value

Example:
EUR
unit_of_time
string

The period for which cumulative will be performed

Enumeration:
DAY
WEEK
MONTH
YEAR
OVERALL
operator
string

The condition operator

Example:
AND
timings
Object

Timing Conditions

is_birthday
boolean

Offer targets condition on customer birthday

Example:
true
is_nameday
boolean

Offer targets condition on customer nameday

Example:
true
days_before
number

Offer will target X days before birthday/nameday

Example:
1
days_after
number

Offer will target X days after birthday/nameday

Example:
1
availability
Array

List of days/times that offer will target

Object
month
integer

The availability month

Example:
1
day
integer

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

Example:
1
start_time
string

The availability start time

Example:
19:00
end_time
string

The availability end time

Example:
21:00
entries
Object nullable

The targeted contact events that entries will be based on (e.g. every purchase made counts as 2 entries)

frequency
Object required

The frequency of an event, i.e hw many times an Event occured withn a period of time. Applicable and required for Event conditions.

operator
string required

The operator that shows he period of time during which Events must fall within in order for contacts to be included in the segment. Operators Between, On, Since require date(s) filters, whereas the rest of the operators need an integrer value(s)

Enumeration:
OVERALL
LAST_MONTHS
LAST_WEEKS
LAST_DAYS
period
integer nullable

The period of time that events will be evaluated for entries

Example:
2
events
Array required

The events that will be converted into lottery entries

Object

Details about contact behavioral actions

event
Object required

The event that a contact performed

type
string

The name of the event that a contact performed or not. Applicable and required only for conditions of type Event. If not specified, then contacts that performed any event are eligible to be included in the segment

Enumeration:
PURCHASE
PURCHASE_AMOUNT
PURCHASED_SKU
PURCHASED_BRANDS
PURCHASED_FAMILIES
PURCHASED_TYPES
REFERRAL
ACHIEVEMENT
ACHIEVEMENT_AMOUNT
ids
Array nullable

The related event type conditions that contact should meet as part of the performed event (applicable only for type based on product skus, families, brands and types)

string GUID
Example:
88c9f22e-e436-35c0-bc72-f58ad6de8c02
ratio
Array required

Defines the ratio between events and counted entries

Object
operator
string required

The frequency’s operator

Enumeration:
EQUAL

Applicable for single value

BETWEEN

Applicable for range values

Default:
EQUAL
min
integer required

The number of event value or in the case of range operator like Between, the starting value

Default:
1
Example:
1
max
integer nullable

The maximum number of event value, required when using “range” operators like Between.

Example:
12
entries
integer nullable

The number of entries that will be counted for for this event

Default:
1
Example:
2
properties_operator
string nullable

Multiple properties can be added to apply additional filtering on the conditions. If more than one properties are specified, an operator is required that defines the logic between properties

Enumeration:
ALL

All conditions should be met

ANY

At least one condition should be met

properties
Array nullable

Detais about properties/attibutes that can be used as additional filtering conditions

Object
property
string required

The event property

Enumeration:
CLASSIFICATION
MERCHANT
VENUE
AMOUNT
PRODUCT_SKU
PRODUCT_NAME
PRODUCT_BRAND
PRODUCT_FAMILY
PROPDUCT_TYPE
type
string required

The property’s data type

Enumeration:
TEXT
AMOUNT
DATE
NUMBER
operator
string required

The property’s condition operator

Enumeration:
IS
IS_NOT
ON
BEFORE
AFTER
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
IS_EMPTY
IS_NOT_EMPTY
STARTS_WITH
DOES_NOT_START_WITH
ENDS_WITH
DOES_NOT_END_WITH
LIKE
NOT_LIKE
EQUAL
NOT_EQUAL
LESS_THAN_OR_EQUAL
MORE_THAN_OR_EQUAL
min
string required

The property value or in the case of range operator like Between, the starting value

Example:
5.00
max
string nullable

The maximum value for the property, required when using “range” operators like Between.

Example:
10
value_list
Array of string nullable

List of (string) values required when the operator implies multiple values comparison, such as contains or does not contain

list_name
string nullable

Represents the list name (applicable only if property is list based)

Example:
products
awards
Object nullable
type
string

The award type

Enumeration:
FIXED

Award will be based on a fixed amount

PERCENTAGE

Award will be based on a percentage amount

QTY

Award will be differentiated based on item quantity

PRODUCT

Award will be based on a free product (brand, family, sku, type)

amount
number required

The award amount

Example:
10.99
quantity
number nullable

Defines the quantity based on which a award will be provided (e.g. 1 litres)

Example:
1
products
Object nullable

The award product conditions

id
string GUID nullable

The product condition identifier (can be the identifier of a product sku, brand, family or type)

Example:
2df28809-72ff-379e-50e9-93873f06bbd9
type
string required

The product condition type

Enumeration:
SKU

Product SKU

FAMILY

Product Family

BRAND

Product Brand

TYPE

Product Type

TARGETED

All targeted based products

restrictions
Object nullable

Award Restrictions

total_winners
integer nullable

The number of contacts that can win a lotter draw

Default:
1
Example:
2
total_contacts
integer nullable

The total number of contacts that can be awarded. After that the offer (still active) will not award any more contacts

Example:
1
amount_cap
number nullable

The maximum awarded amount that can be provided (applicable when award is based on percentage)

Example:
99.99
frequency_cap
Object nullable

Restrict awards provided to a maximum threshold, such as 1 per day

frequency
number required

How many times an award will be provided

Example:
1
period
integer required

Period duration

Example:
1
uot
string nullable

Unit of Time of Period

Enumeration:
DAY
MONTH
YEAR
redeem
Object nullable

Award Restrictions

method
string

Defines which redeem methods are allowed

Enumeration:
DEFERRED
INSTANT
commerce_pool_id
string required nullable

The commerce pool identifier (required only if redeem method is deferred)

Example:
1783d4bb-2c1c-b40a-2955-ea89abc929d0
expiration
Object required nullable

Expiration (valid to) condition

type
string required

The award expiration type

Enumeration:
NEVER
SPECIFIC_DATE
PERIOD
MONTH_END
YEAR_END
specific_date
integer epoch nullable

The date that the amount expires (applicable for specific expiration type)

Example:
1590474228
period
integer nullable

The expiration period (applicable for period expiration type)

Example:
1
uot
string nullable

The award validity period unit (applicable for period validity type)

Enumeration:
HOUR
DAY
MONTH
YEAR

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The reward offer identifier

Example:
ffb711de-2733-251f-e437-9bbdc864c4f2
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/reward_offers/ffb711de-2733-251f-e437-9bbdc864c4f2 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "10% off any purchase",
    "availability": {
        "from": 1606819297,
        "to": 1606819297
    },
    "short_description": "Reward Offer Short Description",
    "long_description": "Reward Offer Long Description",
    "terms_and_conditions": "Applicable for all EU residents",
    "is_featured": "false",
    "state": "ACTIVE",
    "targets": {
        "organisations": [
            "771993f9-ba38-9765-f1ac-1131de34a774"
        ]
    },
    "awards": {
        "amount": 10.99
    },
    "restrictions": {
        "total_contacts": 1,
    },
    "redeem": {
        "method": "DEFERRED",
        "commerce_pool_id": "1783d4bb-2c1c-b40a-2955-ea89abc929d0"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "ffb711de-2733-251f-e437-9bbdc864c4f2"
}
Delete Reward Offer
DELETE /reward_offers/{id}

Delete an existing reward offer

Path variables

id
string GUID required

The reward offer (identifier) that will be deleted

Example:
95f609ed-412e-d969-40c1-e283707a49f8

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/reward_offers/95f609ed-412e-d969-40c1-e283707a49f8 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 204 No Content 
List Reward Offers
GET /reward_offers

Retrieve a list of reward offers based on search criteria (e.g. all featured reward offers)

Request parameters

search_value
string optional

Filter based on search value (case insensitive) across name

Example:
Increase Visits
name
string optional

Filter based on reward offer name

Example:
1% cashback on all products
state
string optional

Filter based on reward offer state

Enumeration:
ACTIVE
INACTIVE
schemes
array of string optional

Filter based on reward scheme (defaults to All)

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

Filter based on organisation (identifier) that such reward offer is created for

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

Filter based on organisation (identifier) that such reward offers are owned by them

Collection format: csv
types
array of Reward Offer Type (enum) optional

Filter based on reward offer type

Collection format: csv
Unique items: YES
is_featured
boolean optional

Filter based on whether the reward offers will be featured (ordered higher)

Example:
false
include_approvals
boolean optional

Defines whether approval requests information should be retrieved or not

Example:
true
approval_state
string optional

Filter based on approval state

Enumeration:
PENDING
APPROVED
REJECTED
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 reward offer identifier

Example:
fb144452-703f-786c-7fb9-f3b4b3dbd042
name
string

The reward offer name

Example:
10% off any purchase
short_description
string

Short description used in Mobile or other APP experiences

Example:
Reward Offer Short Description
long_description
string

The reward offer description

Example:
Reward Offer Long Description
scheme
Object

The reward scheme that the offer belongs to

id
string GUID

The reward scheme identifier

Example:
622175bf-03b0-4e9e-9df9-adf85080a889
name
string

The reward scheme name

Example:
Coffee Scheme
goal
string

The offer goal

Enumeration:
ACHIEVEMENT
SPEND
VISITS
MEMBERSHIP
type
string

The offer type (each goal is related with a type)

Enumeration:
LOTTERY
ACHIEVEMENT
GIFT
DISCOUNT
BUNDLE
SIGNUP
REFER
PROFILE
HAPPYHOUR
REACH_TIER
SUBSCRIPTION_MATURITY
availability
Object

The offer availability (from-to) dates (whithin this period customers will be awarded)

from
integer epoch

The date of start period for offer

Example:
1606819297
to
integer epoch

The date of end period for offer

Example:
1606819297
state
string

The offer life cycle state

Enumeration:
ACTIVE
INACTIVE
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
is_featured
boolean

Defines whether the reward offer will be featured (ordered higher) in contact facing clients

Example:
false
owner
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
approvals
Object

Details about the application

state
string

The approval request state

Enumeration:
PENDING
APPROVED
REJECTED
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/reward_offers HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "6A24D2B5E44F44B28451FE021FCAD51E",
            "name": "10% off any purchase",
            "short_description": "Reward Offer Short Description",
            "long_description": "Reward Offer Long Description",
            "scheme": {
                "id": "622175bf-03b0-4e9e-9df9-adf85080a889",
                "name": "Coffee Scheme"
            },
            "goal": "SPEND",
            "reward_type": "KPI",
            "availability": {
                "available_from": 1606819297,
                "available_to": 1606819297
            },
            "tags": [
                {
                    "id": "wer-3rwefsf2rf-wef-2f-wef-2r",
                    "name": "Seasonal"
                }
            ],
            "life_cycle_state": "PENDING_APPROVAL",
            "creatives": [
                {
                    "id": "CA123456789AQWSXZAQWS1236547896541",
                    "usage_type": "MARKETING",
                    "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"
                        }
                    ]
                }
            ],
            "is_featured": "false",
            "owner": {
                "id": "0d943fdb-c30a-924a-a1ee-d7dbdff99cc5",
                "name": "CRM.COM"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Reward Offer
GET /reward_offers/{id}

Retrieve detailed information for a reward offer

Path variables

id
string GUID required

The reward offer (identifier) that will be retrieved

Example:
fb144452-703f-786c-7fb9-f3b4b3dbd042

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 reward offer identifier

Example:
fb144452-703f-786c-7fb9-f3b4b3dbd042
name
string

The reward offer name

Example:
10% off any purchase
scheme
Object

The reward scheme that the offer belongs to

id
string GUID

The reward scheme identifier

Example:
622175bf-03b0-4e9e-9df9-adf85080a889
name
string

The reward scheme name

Example:
Coffee Scheme
goal
string

The offer goal

Enumeration:
ACHIEVEMENT
SPEND
VISITS
MEMBERSHIP
type
string

The offer type (each goal is related with a type)

Enumeration:
LOTTERY
ACHIEVEMENT
GIFT
DISCOUNT
BUNDLE
SIGNUP
REFER
PROFILE
HAPPYHOUR
REACH_TIER
SUBSCRIPTION_MATURITY
short_description
string

The offer short description

Example:
Reward Offer Short Description
long_description
string

The offer long description

Example:
Reward Offer Long Description
terms_and_conditions
string

The offer terms and conditions

Example:
Applicable for all EU residents
availability
Object

The offer availability (from-to) dates (whithin this period customers will be awarded)

from
integer epoch

The date of start period for offer

Example:
1606819297
to
integer epoch

The date of end period for offer

Example:
1606819297
state
string

The offer life cycle state

Enumeration:
ACTIVE
INACTIVE
is_featured
boolean

Defines whether the reward offer will be featured (ordered higher) in customer facing clients

Example:
false
owner
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
targets
Object
segments
Array

The targeted contact segments

Object
id
string GUID

The segment identifier

Example:
65019442-661a-6b5e-c0db-7d62b5b624a6
name
string

The segment name

Example:
VIP Customers
description
string

The segment description

Example:
All customers that are classified as VIP
size
integer

The number of results for that segment

Example:
112
reward_tiers
Array

The targeted reward tiers

Object

Details about reward tier

id
string GUID

The reward tier identifier

Example:
a67e6e67-9752-9c58-d4d3-f166f6751fca
name
string

The reward tier name

Example:
Gold
profile
Array

The targeted profile completeness conditions

Object
information
string

The profile information that is provided

Enumeration:
BIRTHDATE
NAMEDAY
ADDRESS
EMAIL
PHONE
GENDER
PHONE_VERIFICATION
organisations
Array

The targerted organisations that events performed on should be located at

Object
id
string GUID

The organisation identifier

Example:
234234234234-23423sdfs-324234sfsf
type
string

The organisation type

Enumeration:
MERCHANT
VENUE
name
string

The organisation name

Example:
Bravo Bakery
locations
Array

The organisation locations

Object

Information about the organisation’s location

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
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
countries
Array

The targerted countries that events performed on should be located at

Object
country
string

The country (code) that is targetted

Example:
CYP
transactions
Object

The targeted transactions (items & total value)

transaction_total
Object

Transaction (total) Conditions

currency
string

The transaction currency

Example:
EUR
value
integer

The transaction value

Example:
50
uot
string

The period for which cumulative will be performed

Enumeration:
DAY
WEEK
MONTH
YEAR
OVERALL
operator
string

Condition operator

Example:
AND
products
Array

Product Conditions

Object
groups
Array

A list of group conditions

Object
group
string

The group name

Example:
G1
operator
string

The group condition operator

Example:
AND
conditions
Array

List group conditions

Object
condition
string

The condition name

Example:
C1
id
string GUID

The condition identifier (e.g. family identifier)

Example:
46332fda-8f84-4b6a-bd46-f00e48445b82
type
string

The condition type

Enumeration:
SKU
BRAND
FAMILY
name
string

The product condition (sku/brand/family) name

Example:
Coffee
description
string

The product condition (sku/brand/family) description

Example:
Cold Drinks
qty
integer

The product condition quantity

Example:
1
value
number

The product condition value

Example:
2.5
currency
string

The currency code

Example:
EUR
uot
string

The period for which cumulative will be performed

Enumeration:
DAY
WEEK
MONTH
YEAR
OVERALL
operator
string

The condition operator

Example:
AND
timings
Object

The targeted timings

is_birthday
boolean

Offer targets condition on customer birthday

Example:
true
is_nameday
boolean

Offer targets condition on customer nameday

Example:
true
days_before
number

Offer will target X days before birthday/nameday

Example:
1
days_after
number

Offer will target X days after birthday/nameday

Example:
1
availability
Array

List of days/times that offer will target

Object
month
integer

The availability month

Example:
1
day
integer

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

Example:
1
start_time
string

The availability start time

Example:
19:00
end_time
string

The availability end time

Example:
21:00
evaluation
Object

The targeted evaluation time period

timings
Object

DEtails about the evaluation time

start_date
integer epoch

The date that the offer will be evaluaed (just once)

Example:
1592317898
frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
passes
Array

The targeted pass redemption

Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
referrals
Object

The targeted referrals

action
string

Defines what is required to award such referral

Enumeration:
AFTER_PURCHASE

Award will be provided after the referred customer registers and makes a purchases

ON_REGISTRATION

Award will be provided after the referred customers registers

classifications
Array

The targeted customer event classifications

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

Tha targeted achievement monetary conditions

monetary
Object

Defines the monetary (amount) conditions

currency
string

The transaction currency

value
number

The transaction value

Example:
12.11
operator
string

The transaction value operator that should be met

Enumeration:
EQUAL

Value should be equal to the configured one

EQUAL_GREATER

Value should be greater or equal to the configured one

EQUAL_LESS

Value should be greater or less to the configured one

LESS

Value should be less to the configured one

GREATER

Value should be greater to the configured one

maturity
Object

Tha targeted subscription maturity

uot
string

The period for subscription maturity check

Enumeration:
MONTH
YEAR
value
integer

The maturity period

Example:
12
entries
Object

The targeted contact events that entries will be based on (e.g. every purchase made counts as 2 entries)

frequency
Object

The frequency of an event, i.e hw many times an Event occured withn a period of time. Applicable and required for Event conditions.

operator
string

The operator that shows he period of time during which Events must fall within in order for contacts to be included in the segment. Operators Between, On, Since require date(s) filters, whereas the rest of the operators need an integrer value(s)

Enumeration:
OVERALL
LAST_MONTHS
LAST_WEEKS
LAST_DAYS
period
integer

The period of time that events will be evaluated for entries

Example:
2
events
Array

The events that will be converted into lottery entries

Object

Details about contact behavioral actions

event
Object

The event that a contact performed

type
string required

The name of the event that a contact performed or not. Applicable and required only for conditions of type Event. If not specified, then contacts that performed any event are eligible to be included in the segment

Enumeration:
PURCHASE
PURCHASE_AMOUNT
PURCHASED_SKU
PURCHASED_BRANDS
PURCHASED_FAMILIES
PURCHASED_TYPES
REFERRAL
ACHIEVEMENT
ACHIEVEMENT_AMOUNT
entities
Array

The related event type conditions that contact should met as part of the performed event (applicable only for types based on product skus, families, brands and types)

Object
id
string GUID

The type entity identifier

Example:
c27407e1-89fa-924e-b275-5be62d858b69
name
string

The type entity name (e.g. product name)

Example:
Iced Latte
sku
string

The type entity sku (e.g. product SKU) applicable only for products

Example:
IL001
ratio
Array

Defines the ratio between events and counted entries

Object
operator
string

The frequency’s operator

Enumeration:
EQUAL

Applicable for single value

BETWEEN

Applicable for range values

Default:
EQUAL
min
integer

The number of event value or in the case of range operator like Between, the starting value

Default:
1
Example:
1
max
integer

The maximum number of event value, required when using “range” operators like Between.

Example:
12
entries
integer

The number of entries that will be counted for for this event

Default:
1
Example:
2
properties_operator
string

Multiple properties can be added to apply additional filtering on the conditions. If more than one properties are specified, an operator is required that defines the logic between properties

Enumeration:
ALL

All conditions should be met

ANY

At least one condition should be met

properties
Array

Detais about properties/attibutes that can be used as additional filtering conditions

Object
property
string

The event property

Enumeration:
CLASSIFICATION
MERCHANT
VENUE
AMOUNT
PRODUCT_SKU
PRODUCT_NAME
PRODUCT_BRAND
PRODUCT_FAMILY
PROPDUCT_TYPE
type
string

The property’s data type

Enumeration:
TEXT
AMOUNT
DATE
NUMBER
operator
string

The property’s condition operator

Enumeration:
IS
IS_NOT
ON
BEFORE
AFTER
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
IS_EMPTY
IS_NOT_EMPTY
STARTS_WITH
DOES_NOT_START_WITH
ENDS_WITH
DOES_NOT_END_WITH
LIKE
NOT_LIKE
EQUAL
NOT_EQUAL
LESS_THAN_OR_EQUAL
MORE_THAN_OR_EQUAL
min
string

The property value or in the case of range operator like Between, the starting value

Example:
5.00
max
string

The maximum value for the property, required when using “range” operators like Between.

Example:
10
value_list
Array of string

List of (string) values required when the operator implies multiple values comparison, such as contains or does not contain

list_name
string

Represents the list name (applicable only if property is list based)

Example:
products
awards
Array

The award settings based on which a reward offer’s award is defined (e.g. amount or percentage based)

Object
type
string

The award type

Enumeration:
FIXED

Award will be based on a fixed amount

PERCENTAGE

Award will be based on a percentage amount

QTY

Award will be differentiated based on item quantity

PRODUCT

Award will be based on a free product (brand, family, sku, type)

amount
number

The award amount

Example:
10.99
quantity
number

The product quantity ratio for award

Example:
1
products
Object

Details about award product conditions

id
string GUID

The product condition identifier (can be the identifier of a product sku, brand, family or type)

Example:
e2bc1ca2-264c-3f12-bbaf-a7ba4bb099e0
type
string

The product condition type

Enumeration:
SKU

Product SKU

FAMILY

Product Family

BRAND

Product Brand

TYPE

Product Type

TARGETED

All targeted based products

name
string

The product condition name (can be the identifier of a product sku, family or type)

Example:
SKU00001
description
string

The product condition description (can be the identifier of a product sku, family or type)

Example:
Coffee Latte
restrictions
Object

The award restrictions

total_winners
integer

The number of contacts that can win a lotter draw

Example:
2
total_contacts
integer

The total number of contacts that can get the award

Example:
1
amount_cap
number

The maximum amount that can be provided by a offer that awards based on percentage

Example:
1345.23
frequency_cap
Object

Details about the frequency that contacts can get the award

frequency
integer

The frequency of the award

Example:
1
period
integer

The frequency period

Example:
12
uot
string

Unit of Time of Period

Enumeration:
DAY
MONTH
YEAR
redeem
Object

The award restrictions

method
string

Defines which redeem methods are allowed

Enumeration:
DEFERRED
INSTANT
commerce_pool
Object

Details about spend condition

id
string GUID

The commerce pool identifier

Example:
dc01f65b-a482-48f1-9fda-c163df72f28f
name
string

The commerce pool name

Example:
Redeem Anywhere
description
string

The commerce pool description

Example:
Ability to redeem on any organisation/day/product
expiration
Object

Expiration (valid to) condition

type
string

The award expiration type

Enumeration:
NEVER
SPECIFIC_DATE
PERIOD
MONTH_END
YEAR_END
specific_date
integer epoch

The date that the amount expires (applicable for specific expiration type)

Example:
1590474228
period
integer

The specific expiration period (applicable for period expiration type)

Example:
2
uot
string

The award validity period unit (applicable for period validity type)

Enumeration:
HOUR
DAY
MONTH
YEAR
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/reward_offers/fb144452-703f-786c-7fb9-f3b4b3dbd042 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "fb144452-703f-786c-7fb9-f3b4b3dbd042",
    "name": "10% off any purchase",
    "scheme": {
        "id": "622175bf-03b0-4e9e-9df9-adf85080a889",
        "name": "Coffee Scheme"
    },
    "goal": "MEMBERSHIP",
    "type": "REACH_TIER",
    "short_description": "Reward Offer Short Description",
    "long_description": "Reward Offer Long Description",
    "terms_and_conditions": "Applicable for all EU residents",
    "availability": {
        "from": 1606819297,
        "to": 1606819297
    },
    "state": "ACTIVE",
    "is_featured": "false",
    "owner": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "media_groups": [
        {
            "id": "6A24D2B5E44F44B28451FE021FCAD51E",
            "name": "Marketing Media",
            "creatives": [
                {
                    "id": "CA123456789AQWSXZAQWS1236547896541",
                    "usage_type": "LANDING_PAGE_BACKGROUND_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"
                        }
                    ]
                }
            ]
        }
    ],
    "awards": [
        {
            "amount_type": "FIXED",
            "currency_type": "DEFAULT",
            "amount": 10.99
        }
    ],
    "restrictions": {
        "total_contacts": 1
    },
    "targets": {
        "segments": [
            {
                "id": "65019442-661a-6b5e-c0db-7d62b5b624a6",
                "name": "VIP Customers",
                "description": "All customers that are classified as VIP",
                "size": 112
            }
        ],
        "reward_tiers": [
            {
                "id": "a67e6e67-9752-9c58-d4d3-f166f6751fca",
                "name": "Gold"
            }
        ]
    },
    "redeem": {
        "commerce_pool": {
            "id": "dc01f65b-a482-48f1-9fda-c163df72f28f",
            "name": "Spend Anywhere"
        },
        "method": "DEFERRED"
    }
}
Get Awarded Contacts
GET /reward_offers/{id}/contacts

Retrieve a list of contacts that have been awarded from the reward offer (only for Lottery offers)

Path variables

id
string GUID required

The reward offer (identifier) whose awarded contacts will be returned

Example:
9f2e66af-d42d-4c15-9346-7e2cc0a89f6e

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

Details about award

amount
number

The awarded amount

Example:
9.99
product
Object

The awarded product (free product)

type
string

The awarded product type

Enumeration:
SKU
BRAND
FAMILY
TYPE
id
string GUID

The awarded product identifier

Example:
5ffe7466-aad3-11bb-1617-3c07a6db75d4
name
string

The awarded product name

Example:
Coffee
date
integer epoch

The date that the award was provided

Example:
1606376717
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/reward_offers/9f2e66af-d42d-4c15-9346-7e2cc0a89f6e/contacts HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "contact": {
                "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
                "name": "John Johnson",
                "code": "C123"
            },
            "award": {
                "amount": 9.99,
                "date": 1606376717
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Reward Offers Restrictions
GET /reward_offers/restrictions

Retrieve the allowed reward offer type(s) and redeen method(s) that can be used on reward offer creation

Notes

CORE BEHAVIOR

Service Owner restrictions will be applied on all Businesses (and their Merchants/Service Providers) that share the same contact registry, while Business restrictions (that have their own contact registry) will be applied only on their Merchants/Service Providers.

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

Successful Request

Body
Object
offer_types
Array

Defines the offer types that will be allowed to be created

Unique items: YES
string

The offer type (each goal is related with a type)

Enumeration:
LOTTERY
ACHIEVEMENT
GIFT
DISCOUNT
BUNDLE
SIGNUP
REFER
PROFILE
HAPPYHOUR
REACH_TIER
SUBSCRIPTION_MATURITY
redeem_methods
Array

Defines which redeem methods are allowed

Unique items: YES
string

Defines which redeem methods are allowed

Enumeration:
DEFERRED
INSTANT
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/reward_offers/restrictions HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "offer_types": [
        "BUNDLE"
    ],
    "redeem_methods": [
        "DEFERRED"
    ]
}
Media Group
POST /reward_offers/{id}/media_groups
Reward Offer Media Groups
POST /reward_offers/{id}/media_groups

Link a reward offer with one or more media groups

Path variables

id
string GUID required

The reward offer (identifier) that media groups will be set

Example:
1769c374-a4d4-5254-a9b5-1ea21325145a

Notes

MEDIA UPLOAD

Uploading media for a reward offer requires the execution of the following APIs

  1. Create new Media Group
  2. Create Reward Offer 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:
70b85ee1-c291-634d-2ddf-1f39c42e4f42

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
POST https://sandbox.crm.com/backoffice/v2/reward_offers/1769c374-a4d4-5254-a9b5-1ea21325145a/media_groups HTTP/1.1 

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

[
    {
        "media_group_id": "70b85ee1-c291-634d-2ddf-1f39c42e4f42"
    }
]

HTTP/1.1 204 No Content 
Content Translations
PUT /reward_offers/{id}/translations
GET /reward_offers/{id}/translations
PUT /reward_offers/{id}/translations/actions
Update Reward Offer Translations
PUT /reward_offers/{id}/translations

Update the content translations for an existing reward offer

Path variables

id
string GUID required

The reward offer (identifier) of which content translations will be updated

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

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
language_code
string required
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array nullable

The content translations for the specified language

Object
key
string required

The content (attribute) key

Example:
name
value
string required

The content (attribute) translated value

Example:
10% cashback return

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
PUT https://sandbox.crm.com/backoffice/v2/reward_offers/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

[
    {
        "language_code": "EN",
        "translations": [
            {
                "key": "name",
                "value": "10% cashback return"
            }
        ]
    }
]

HTTP/1.1 204 No Content 
Get Reward Offer Translations
GET /reward_offers/{id}/translations

Retrieve the content translations for an existing reward offer

Path variables

id
string GUID required

The reward offer (identifier) of which content translations will be retrieved

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Request parameters

language_code
string optional

Filter based on language

Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN

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
language_code
string
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array

The content translations for the specified language

Object
key
string

The content (attribute) key

Example:
name
value
string

The content (attribute) translated value

Example:
10% cashback return
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/reward_offers/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "language_code": "EN",
            "translations": [
                {
                    "key": "name",
                    "value": "10% cashback return"
                }
            ]
        }
    ]
}
Perform Reward Offer Translation Actions
PUT /reward_offers/{id}/translations/actions

Perform content translation actions on an existing entity (e.g. export a reward offer’s translations)

Path variables

id
string GUID required

The reward offer (identifier) of which content translation actions will be performed

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Notes

IMPORT CONTENT TRANSLATIONS FLOW

Importing content translations should be made based on the following API order

  1. Upload File Signature
  2. Import Translations
EXPORT CONTENT TRANSLATIONS FLOW

Exporting content translations into different file should be made using the following API order

  1. Export Translations

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 action that will be applied

Enumeration:
IMPORT
EXPORT
file
Object required

The file (identifier) that will be used for importing translations (required only for import action)

id
string GUID required nullable

The file (identifier) that will be used for importing translations (required only for import action)

Example:
1e347d4d-ab96-6957-fdb6-35e72b3d9185
mime
string required nullable

The file (mime type) that will be used for exporting translations (required only for export action)

Example:
json

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
Example 2
PUT https://sandbox.crm.com/backoffice/v2/reward_offers/a42dd7c4-e755-92fb-963b-5f658a59908e/translations/actions HTTP/1.1 

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

{
    "action": "IMPORT",
    "file": {
        "id": "1e347d4d-ab96-6957-fdb6-35e72b3d9185"
    }
}

HTTP/1.1 204 No Content 
PUT https://sandbox.crm.com/backoffice/v2/reward_offers/a42dd7c4-e755-92fb-963b-5f658a59908e/translations/actions HTTP/1.1 

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

{
    "action": "EXPORT",
    "file": {
        "mime": "json"
    }
}

HTTP/1.1 204 No Content 
Reward Schemes
POST /reward_schemes
PUT /reward_schemes/{id}
GET /reward_schemes
GET /reward_schemes/{id}
Create Reward Scheme
POST /reward_schemes

Create a reward scheme. Contacts can sign up to reward schemes and based on their behavioral events (e.g. purchase, achievement) can be awarded from offers that are created under such schemes (given offer’s target conditions are met).

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 reward scheme name

Example:
CRMdotCOM Scheme
description
string nullable

The reward scheme description

Example:
The main reward scheme of CRMdotCOM
sign_up_option
string required

Defines how customers can sign up to the reward scheme

Enumeration:
AUTO_SIGN_UP

Contacts will sign up upon registration automatically

SELF_SIGN_UP

Contacts can sign up manually

CLOSED_SIGN_UP

Contacts can be signed up on a selective and controlled manner (request to sign up), usually based on domain specific emails

Default:
SELF_SIGN_UP
sign_up_code
string nullable

Defines whether close loop (controlled) sign ups will be validated based on a third-party identification (external system) or domain specific emails. Required if the sign up option = controlled sign up

Enumeration:
EMAIL_DOMAIN
email_domains
Array nullable

Defines the supported email domains for closed loop sign ups based on domain. Required when sign up is based on email domain

string
Example:
crm.com
terms_and_conditions
string nullable

The reward scheme terms and conditions

Example:
Only customers that already have CRMdotCOM reward app can join this scheme

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The reward scheme identifier

Example:
9fa92a4e-575e-7b76-6f8a-c189112789d6
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

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/reward_schemes HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "CRMdotCOM Scheme",
    "description": "The main reward scheme of CRMdotCOM",
    "sign_up_option": "CLOSED_SIGN_UP",
    "sign_up_code": "EMAIL_DOMAIN",
    "email_domains": [
        "crm.com"
    ],
    "terms_and_conditions": "Only customers that already have CRMdotCOM reward app can join this scheme"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "9fa92a4e-575e-7b76-6f8a-c189112789d6"
}
Update Reward Scheme
PUT /reward_schemes/{id}

Update an existing reward scheme

Path variables

id
string GUID required

The reward scheme (identifier) that will be updated

Example:
9fa92a4e-575e-7b76-6f8a-c189112789d6

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 reward scheme name

Example:
CRMdotCOM Scheme
description
string nullable

The reward scheme description

Example:
The main reward scheme of CRMdotCOM
email_domains
Array nullable

Defines the supported email domains for closed loop sign ups based on domain. Required on closed loop reward schemes and the sign up is based on email domain

string
Example:
crm.com
terms_and_conditions
string nullable

The reward scheme terms and conditions

Example:
Only contacts that already have CRM.COM reward app can join this scheme
state
string nullable

The offer life cycle state

Enumeration:
ACTIVE
INACTIVE

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The reward scheme identifier

Example:
9fa92a4e-575e-7b76-6f8a-c189112789d6
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

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/reward_schemes/9fa92a4e-575e-7b76-6f8a-c189112789d6 HTTP/1.1 

Content-Type: application/json

{
    "name": "CRMdotCOM Scheme",
    "description": "The main reward scheme of CRMdotCOM",
    "email_domains": [
        "crm.com"
    ],
    "terms_and_conditions": "Only contacts that already have CRMdotCOM reward app can join this scheme"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9fa92a4e-575e-7b76-6f8a-c189112789d6"
}
List Reward Schemes
GET /reward_schemes

Retrieve a list of reward schemes based on search criteria (e.g. all closed loop reward schemes)

Request parameters

name
string optional

Filter based on reward scheme name

Example:
CRMdotCOM
sign_up_option
string optional

Filter based on how contacts can sign up to a reward scheme

Enumeration:
AUTO_SIGN_UP

Contacts will sign up upon registration automatically

SELF_SIGN_UP

Contacts can sign up manually

CLOSED_SIGN_UP

Contacts can be signed up on a selective and controlled manner (request to sign up), usually based on domain specific emails

Default:
SELF_SIGN_UP
state
string optional

Filter based on reward scheme state

Enumeration:
ACTIVE
INACTIVE

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 reward scheme identifier

Example:
9fa92a4e-575e-7b76-6f8a-c189112789d6
name
string

The reward scheme name

Example:
CRMdotCOM Scheme
description
string

The reward scheme description

Example:
The main reward scheme of CRMdotCOM
sign_up_option
string

Defines how customers can sign up to the reward scheme

Enumeration:
AUTO_SIGN_UP

Contacts will sign up upon registration automatically

SELF_SIGN_UP

Contacts can sign up manually

CLOSED_SIGN_UP

Contacts can be signed up on a selective and controlled manner (request to sign up), usually based on domain specific emails

Default:
SELF_SIGN_UP
state
string

The reward scheme state

Enumeration:
ACTIVE
INACTIVE
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/reward_schemes HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "9fa92a4e-575e-7b76-6f8a-c189112789d6",
            "name": "CRMdotCOM Scheme",
            "description": "The main reward scheme of CRMdotCOM",
            "sign_up_option": "SELF_SIGN_UP",
            "state": "INACTIVE"
        }
    ]
}
Get Reward Scheme
GET /reward_schemes/{id}

Retrieve detailed information for a reward scheme

Path variables

id
string GUID required

The reward scheme (identifier) that will be retrieved

Example:
9fa92a4e-575e-7b76-6f8a-c189112789d6

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 reward scheme identifier

Example:
9fa92a4e-575e-7b76-6f8a-c189112789d6
name
string

The reward scheme name

Example:
CRMdotCOM Scheme
description
string

The reward scheme description

Example:
The main reward scheme of CRMdotCOM
terms_and_conditions
string

The reward scheme terms and conditions

Example:
Only customers that already have CRMdotCOM reward app can join this scheme
sign_up_option
string

Defines how customers can sign up to the reward scheme

Enumeration:
AUTO_SIGN_UP

Contacts will sign up upon registration automatically

SELF_SIGN_UP

Contacts can sign up manually

CLOSED_SIGN_UP

Contacts can be signed up on a selective and controlled manner (request to sign up), usually based on domain specific emails

Default:
SELF_SIGN_UP
sign_up_code
string

Defines whether close loop (controlled) sign ups will be validated based on a third-party identification (external system) or domain specific emails. Required if the sign up option = controlled sign up

Enumeration:
EMAIL_DOMAIN
email_domains
Array

Defines the supported email domains for closed loop sign ups based on domain. Required when the sign up is based on email domain

string
Example:
crm.com
state
string

The reward scheme state

Enumeration:
ACTIVE
INACTIVE
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/reward_schemes/9fa92a4e-575e-7b76-6f8a-c189112789d6 HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9fa92a4e-575e-7b76-6f8a-c189112789d6",
    "name": "CRMdotCOM Scheme",
    "description": "The main reward scheme of CRMdotCOM",
    "sign_up_option": "SELF_SIGN_UP"
}
Content Translations
PUT /reward_schemes/{id}/translations
GET /reward_schemes/{id}/translations
PUT /reward_schemes/{id}/translations/actions
Update Reward Scheme Translations
PUT /reward_schemes/{id}/translations

Update the content translations for an existing reward scheme

Path variables

id
string GUID required

The reward scheme (identifier) of which content translations will be updated

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

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
language_code
string required
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array nullable

The content translations for the specified language

Object
key
string required

The content (attribute) key

Example:
name
value
string required

The content (attribute) translated value

Example:
10% cashback return

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
PUT https://sandbox.crm.com/backoffice/v2/reward_schemes/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

[
    {
        "language_code": "EN",
        "translations": [
            {
                "key": "name",
                "value": "10% cashback return"
            }
        ]
    }
]

HTTP/1.1 204 No Content 
Get Reward Scheme Translations
GET /reward_schemes/{id}/translations

Retrieve the content translations for an existing reward scheme

Path variables

id
string GUID required

The reward scheme (identifier) of which content translations will be retrieved

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Request parameters

language_code
string optional

Filter based on language

Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN

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
language_code
string
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array

The content translations for the specified language

Object
key
string

The content (attribute) key

Example:
name
value
string

The content (attribute) translated value

Example:
10% cashback return
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/reward_schemes/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "language_code": "EN",
            "translations": [
                {
                    "key": "name",
                    "value": "10% cashback return"
                }
            ]
        }
    ]
}
Perform Reward Scheme Translation Actions
PUT /reward_schemes/{id}/translations/actions

Perform content translation actions on a reward scheme (e.g. export a reward scheme’s translations)

Path variables

id
string GUID required

The reward scheme (identifier) of which content translation actions will be performed

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Notes

IMPORT CONTENT TRANSLATIONS FLOW

Importing content translations should be made based on the following API order

  1. Upload File Signature
  2. Import Translations
EXPORT CONTENT TRANSLATIONS FLOW

Exporting content translations into different file should be made using the following API order

  1. Export Translations

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 action that will be applied

Enumeration:
IMPORT
EXPORT
file
Object required

The file (identifier) that will be used for importing translations (required only for import action)

id
string GUID required nullable

The file (identifier) that will be used for importing translations (required only for import action)

Example:
1e347d4d-ab96-6957-fdb6-35e72b3d9185
mime
string required nullable

The file (mime type) that will be used for exporting translations (required only for export action)

Example:
json

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
Example 2
PUT https://sandbox.crm.com/backoffice/v2/reward_schemes/a42dd7c4-e755-92fb-963b-5f658a59908e/translations/actions HTTP/1.1 

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

{
    "action": "IMPORT",
    "file": {
        "id": "1e347d4d-ab96-6957-fdb6-35e72b3d9185"
    }
}

HTTP/1.1 204 No Content 
PUT https://sandbox.crm.com/backoffice/v2/reward_schemes/a42dd7c4-e755-92fb-963b-5f658a59908e/translations/actions HTTP/1.1 

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

{
    "action": "EXPORT",
    "file": {
        "mime": "json"
    }
}

HTTP/1.1 204 No Content 
Merchants
GET /rewards/merchants
List Reward Merchants
GET /rewards/merchants

Retrieve a list of organisations (business, merchant/service provider) based on search criteria (e.g. all merchants)

Request parameters

name
string optional

Filter based on organisation name

Example:
CRM
non_blocked_reward_terms
boolean optional

Filter based on whether the organisation (business/merchant) has (non-blocked) reward commercial terms

Example:
true
include_taps
boolean optional

Defines whether transaction acquiring points should be retrieved or not

Example:
true
include_schemes
boolean optional

Defines whether reward scheme information should be retrieved or not

Example:
true
include_venues
boolean optional

Defines whether venue/service point information should be retrieved or not

Example:
true
include_custom_fields
boolean optional

Defines whether custom fields will be retrieved or not

Example:
true
custom_fields
string optional

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

Example:
key;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 organisation identifier

Example:
4f234f2f-d993-4c36-2c80-ba2ff7e5df24
name
string

The organisation name

Example:
Delicious Burger
is_parent
boolean

Indicates whether the organisation has no other child organisations

Example:
true
taps
Array

Information about the transaction acquiring points (retrieved only if requested)

Object

Information about the organisation’s external references

id
string GUID

The tap identifier

Example:
cd953fe3-e2f6-2ae2-8a40-1bd8154c0f29
name
string

The tap name

Example:
ePOS
code
string

The tap code

Example:
EP12
type
string

The transaction acquiring point type

Enumeration:
EXTERNAL_REF
POS
PRINTER_RECEIPT
CARD_TERMINAL
external_type
string

Optional specification of external reference

Enumeration:
JCC
TWINSOFT
ALOHA
WIFI_PLATFORM
is_active
boolean

Defines whethe tap is active or not

Example:
true
reward_schemes
Array

Information about the reward schemes that the organisation participates (retrieved only if requested)

Object

The reward scheme that the offer belongs to

id
string GUID

The reward scheme identifier

Example:
622175bf-03b0-4e9e-9df9-adf85080a889
name
string

The reward scheme name

Example:
Coffee Scheme
venues
Array

Details about the venues of the merchant (retrieved only if requested)

Object
id
string GUID

The organisation identifier

Example:
01f18103-75e0-10b1-31c1-74523f240911
name
string

The organisation name

Example:
Delicious Burger Nicosia
taps
Array

Details about the organisation’s taps (retrieved only if requested)

Object

Information about the organisation’s external references

id
string GUID

The tap identifier

Example:
cd953fe3-e2f6-2ae2-8a40-1bd8154c0f29
name
string

The tap name

Example:
ePOS
code
string

The tap code

Example:
EP12
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
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/rewards/merchants HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4f234f2f-d993-4c36-2c80-ba2ff7e5df24",
            "name": "Delicious Burger",
            "is_parent": true,
            "taps": [
                {
                    "id": "cd953fe3-e2f6-2ae2-8a40-1bd8154c0f29",
                    "name": "ePOS",
                    "code": "EP12"
                }
            ],
            "reward_schemes": [
                {
                    "id": "622175bf-03b0-4e9e-9df9-adf85080a889",
                    "name": "Coffee Scheme"
                }
            ],
            "venues": [
                {
                    "id": "01f18103-75e0-10b1-31c1-74523f240911",
                    "name": "Delicious Burger Nicosia",
                    "taps": [
                        {
                            "id": "cd953fe3-e2f6-2ae2-8a40-1bd8154c0f29",
                            "name": "ePOS",
                            "code": "EP12"
                        }
                    ]
                }
            ],
            "custom_fields": [
                {
                    "key": "back_office",
                    "value": "0001-12345"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Segments
POST /segments
PUT /segments/{id}
DELETE /segments/{id}
GET /segments
GET /segments/{id}
PUT /segments/{id}/actions
GET /segments/{id}/contacts
Create Segment
POST /segments

Create a new segment

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 segment’s name which i smandatory and has to be unique

Example:
Marketing customers
description
string nullable
Example:
A list of customers that own an accoun
refresh_frequency
string nullable

How often the segment is automatically refreshed - provided in a cron expression pattern

Example:
0 0 12 * * ?
accessibility
Object nullable

Defines which organisations can be access and use it

type
string required

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array nullable

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Unique items: YES
string GUID
Example:
341fc467-c925-2f70-da87-162c4947eb45
conditions
Object required

The segment conditions

groups
Array required

The segment’s groups of conditions

Object
name
string required

The name of the conditions group. If not specified, then the group is named after a letter of the Latin alphabet starting from A, then B etc.

Example:
A
type
string required

Each group includes conditions that refer to either an Event that was performed or Contact information

Enumeration:
EVENT
CONTACT
event_name
string required nullable

The name of the event that a contact performed or not. Applicable and required only for conditions of type Event. If not specified, then contacts that performed any event are eligible to be included in the segment

Enumeration:
PURCHASE
PURCHASE_CANCELLED
AWARD
SPEND
INVOICE
CREDIT_NOTE
PAYMENT
REFUND
ORDER
REFERRAL
REFERRAL_CANCELLED
TOP_UP
TRANSFER
inclusion
string required

Defines the operator that will be used accoridng to the condition’s type. When the condition refers to an Event, then contact are included in the segment if they did or did not perform that Event. When the condition refers to Contact information, then contacts are included in the segment if they have or do not have the specified contact related information.

Enumeration:
DID

Applicable for Events only

DID_NOT

Applicable for Events only

HAVE

Applicable for Contacts only

HAVE_NOT

Applicable for Contacts only

frequency
Object

The frequency of an event, i.e hw many times an Event occured withn a period of time. Applicable and required for Event conditions.

operator
string required

The frequency’s operator

Enumeration:
AT_LEAST
BETWEEN
MORE_THAN
LESS_THAN
EQUAL
Default:
AT_LEAST
min_times
integer required

The minimum number of times the Event occured.

Example:
1
max_times
integer nullable

The maximum number of times the Event occured. Required only when the operator is set to BETWEEN

Example:
5
period
Object nullable

The period of time during which the Event(s) occured

operator
string required

The operator that shows he period of time during which Events must fall within in order for contacts to be included in the segment. Operators Between, On, Since require date(s) filters, whereas the rest of the operators need an integrer value(s)

Enumeration:
BETWEEN
SINCE
ON
LAST_DAYS
LAST_MONTHS
LAST_HOURS
LAST_WEEKS
from
string required

The starting period of time. For dates, this should be an epoch value

Example:
1
to
string nullable

The ending period. Required only for Between operator. For dates, this should be an epoch value

Example:
3
type
string required

The from/to filters date type depending on the selected operator.

Enumeration:
STRING
NUMBER
DATE
INTEGER
properties_operator
string required

Multiple properties can be added to apply additional filtering on the conditions. So if more than one properties are specified, an operator is required that defines the logic between properties. This operator can only be ALL (all properties must be met) or ANY (at least one must be met) to incldue the contact in the segment.

Enumeration:
ALL
ANY
Default:
ALL
properties
Array

List of event properties/attibutes that can be used as additional filtering conditions.

Object
property
string required

The name of the property which depends on the selected event. Each event has its own set of properties.

Example:
purchase.amount
operator
string required

The property’s condition operator

Enumeration:
IS
IS_NOT
ON
BEFORE
AFTER
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
IS_EMPTY
IS_NOT_EMPTY
STARTS_WITH
DOES_NOT_START_WITH
ENDS_WITH
DOES_NOT_END_WITH
LIKE
NOT_LIKE
EQUAL
NOT_EQUAL
LESS_THAN_OR_EQUAL
MORE_THAN_OR_EQUAL
min_value
string required

The property’s value or in the case of range operator like Between, the starting value.

Example:
5.00
max_value
string nullable

The maximum value for the property, required when using “range” operators like Between.

Example:
10
value_list
Array of string nullable

List of String values required when the operator implies multiple values comparison like Contains,Does not contain.

type
string required

The property’s data type

Enumeration:
STRING
NUMBER
INTEGER
DATE
list_name
string nullable

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

Example:
products
logical_expression
string required

The logical expression between the Groups. Required if more than one groups are specified

Example:
(A OR B) AND C
Examples

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The segment identifier

Example:
a48eedcf-566f-de3e-684b-570bfbb4010c
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/segments HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Marketing customers",
    "description": "A list of customers that own an accoun",
    "refresh_frequency": "0 0 12 * * ?",
    "accessibility": {
        "type": "SPECIFIC_ORG",
        "organisations": [
            "CAD1E31269B76D7A65ACCE45B2E68DFD"
        ]
    },
    "conditions": {
        "groups": [
            {
                "name": "A",
                "type": "CONTACT",
                "event_name": "ORDER",
                "inclusion": "HAVE",
                "frequency": {
                    "operator": "AT_LEAST",
                    "min_times": 1,
                    "max_times": 5,
                    "period": {
                        "operator": "LAST_HOURS",
                        "from": "1",
                        "to": "3",
                        "type": "DATE"
                    }
                },
                "properties_operator": "ALL",
                "properties": [
                    {
                        "property": "purchase.amount",
                        "operator": "LIKE",
                        "min_value": "5.00",
                        "max_value": "10",
                        "value_list": [
                            ""
                        ],
                        "type": "INTEGER",
                        "list_name": "products"
                    }
                ]
            }
        ],
        "logical_expression": "(A OR B) AND C"
    }
}

HTTP/1.1 201 Created

Content-Type: application/json

{
    "id": "a48eedcf-566f-de3e-684b-570bfbb4010c"
}
Update Segment
PUT /segments/{id}

Update an existing segment

Path variables

id
string GUID required

The segment (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 segment name

Example:
All Contacts
description
string nullable

The segment’s description

Example:
List of contacts owning a non-terminated account
refresh_frequency
string nullable

How often the segment is automatically refreshed - provided in a cron expression pattern

Example:
0 0 12 * * ?
accessibility
Object nullable

Defines which organisations can be access and use it

type
string required

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array nullable

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Unique items: YES
string GUID
Example:
341fc467-c925-2f70-da87-162c4947eb45
conditions
Object nullable

The segment conditions

groups
Array required

The segment’s groups of conditions

Object
name
string required

The name of the conditions group. If not specified, then the group is named after a letter of the Latin alphabet starting from A, then B etc.

Example:
A
type
string required

Each group includes conditions that refer to either an Event that was performed or Contact information

Enumeration:
EVENT
CONTACT
event_name
string required nullable

The name of the event that a contact performed or not. Applicable and required only for conditions of type Event. If not specified, then contacts that performed any event are eligible to be included in the segment

Enumeration:
PURCHASE
PURCHASE_CANCELLED
AWARD
SPEND
INVOICE
CREDIT_NOTE
PAYMENT
REFUND
ORDER
REFERRAL
REFERRAL_CANCELLED
TOP_UP
TRANSFER
inclusion
string required

Defines the operator that will be used accoridng to the condition’s type. When the condition refers to an Event, then contact are included in the segment if they did or did not perform that Event. When the condition refers to Contact information, then contacts are included in the segment if they have or do not have the specified contact related information.

Enumeration:
DID

Applicable for Events only

DID_NOT

Applicable for Events only

HAVE

Applicable for Contacts only

HAVE_NOT

Applicable for Contacts only

frequency
Object

The frequency of an event, i.e hw many times an Event occured withn a period of time. Applicable and required for Event conditions.

operator
string required

The frequency’s operator

Enumeration:
AT_LEAST
BETWEEN
MORE_THAN
LESS_THAN
EQUAL
Default:
AT_LEAST
min_times
integer required

The minimum number of times the Event occured.

Example:
1
max_times
integer nullable

The maximum number of times the Event occured. Required only when the operator is set to BETWEEN

Example:
5
period
Object nullable

The period of time during which the Event(s) occured

operator
string required

The operator that shows he period of time during which Events must fall within in order for contacts to be included in the segment. Operators Between, On, Since require date(s) filters, whereas the rest of the operators need an integrer value(s)

Enumeration:
BETWEEN
SINCE
ON
LAST_DAYS
LAST_MONTHS
LAST_HOURS
LAST_WEEKS
from
string required

The starting period of time. For dates, this should be an epoch value

Example:
1
to
string nullable

The ending period. Required only for Between operator. For dates, this should be an epoch value

Example:
3
type
string required

The from/to filters date type depending on the selected operator.

Enumeration:
STRING
NUMBER
DATE
INTEGER
properties_operator
string required

Multiple properties can be added to apply additional filtering on the conditions. So if more than one properties are specified, an operator is required that defines the logic between properties. This operator can only be ALL (all properties must be met) or ANY (at least one must be met) to incldue the contact in the segment.

Enumeration:
ALL
ANY
Default:
ALL
properties
Array

List of event properties/attibutes that can be used as additional filtering conditions.

Object
property
string required

The name of the property which depends on the selected event. Each event has its own set of properties.

Example:
purchase.amount
operator
string required

The property’s condition operator

Enumeration:
IS
IS_NOT
ON
BEFORE
AFTER
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
IS_EMPTY
IS_NOT_EMPTY
STARTS_WITH
DOES_NOT_START_WITH
ENDS_WITH
DOES_NOT_END_WITH
LIKE
NOT_LIKE
EQUAL
NOT_EQUAL
LESS_THAN_OR_EQUAL
MORE_THAN_OR_EQUAL
min_value
string required

The property’s value or in the case of range operator like Between, the starting value.

Example:
5.00
max_value
string nullable

The maximum value for the property, required when using “range” operators like Between.

Example:
10
value_list
Array of string nullable

List of String values required when the operator implies multiple values comparison like Contains,Does not contain.

type
string required

The property’s data type

Enumeration:
STRING
NUMBER
INTEGER
DATE
list_name
string nullable

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

Example:
products
logical_expression
string required

The logical expression between the Groups. Required if more than one groups are specified

Example:
(A OR B) AND C

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The segment 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/v2/segments/c0d4712e-6688-4604-b3d6-d084e4d2dc05 HTTP/1.1 

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

{
    "name": "All Contacts",
    "description": "List of contacts owning a non-terminated account",
    "refresh_frequency": "0 0 12 * * ?",
    "accessibility": {
        "type": "BUSINESS",
        "organisations": [
            "CAD1E31269B76D7A65ACCE45B2E68DFD"
        ]
    },
    "conditions": {
        "groups": [
            {
                "name": "A",
                "type": "EVENT",
                "event_name": "PAYMENT",
                "inclusion": "HAVE_NOT",
                "frequency": {
                    "operator": "AT_LEAST",
                    "min_times": 1,
                    "max_times": 5,
                    "period": {
                        "operator": "LAST_MONTHS",
                        "from": "1",
                        "to": "3",
                        "type": "DATE"
                    }
                },
                "properties_operator": "ALL",
                "properties": [
                    {
                        "property": "purchase.amount",
                        "operator": "IS_NOT",
                        "min_value": "5.00",
                        "max_value": "10",
                        "value_list": [
                            ""
                        ],
                        "type": "NUMBER",
                        "list_name": "products"
                    }
                ]
            }
        ],
        "logical_expression": "(A OR B) AND C"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "c0d4712e-6688-4604-b3d6-d084e4d2dc05"
}
Delete Segment
DELETE /segments/{id}

Delete an existing segment

Path variables

id
string GUID required

The segment (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

204 No Content

The request has succeded

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/segments/c0d4712e-6688-4604-b3d6-d084e4d2dc05 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Segments
GET /segments

Retrieve a list of segments based on search criteria (e.g. all contacts)

Request parameters

search_value
string optional

Search for segments based on their name or description

Example:
all contacts
created_on
string optional

The date on which the segment was created. The value can be a string with a date in epoch format. Each option must also include an operator. Use up to two of the following options based on the required search:

Enumeration:
created_on[gt]

Returns results where the ‘created on’ field is greater than this value.

created_on[gte]

Return results where the ‘created on’ field is greater than or equal to this value.

created_on[lt]

Return results where the ‘created on’ field is less than or equal to this value.

created_on[lte]

Return results where the ‘created on’ field is less than 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 succeded

Body
Object
content
Array
Object
id
string GUID

The segment identifier

Example:
3c936a49-0a40-1785-a636-ff7e872a987e
name
string

The segment name

Example:
Marketing customers
descripion
string

The segment description

Example:
List customers owning an account
size
integer

The segment size (total number of contacts)

Example:
95
imported_from
string

The analytics tool from which the segment was imported

Enumeration:
MIXPANEL
Example:
MIXPANEL
resfresh_frequency
string

How often the segment is automatically refreshed (represented as a cron expression)

Example:
0 0 12 * * ?
accessibility
Object

Defines how the segment can be accessed from business network

type
string

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Object
id
string GUID

The organisation identifier

Example:
feedcd4b-8470-04b3-73bf-9ce9a4340822
name
string

The organisation name

Example:
CRM
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/segments HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "3c936a49-0a40-1785-a636-ff7e872a987e",
            "name": "Marketing customers",
            "descripion": "List customers owning an account",
            "size": 95,
            "imported_from": "MIXPANEL",
            "resfresh_frequency": "0 0 12 * * ?",
            "accessibility": {
                "type": "SPECIFIC_ORG",
                "organisations": [
                    {
                        "id": "feedcd4b-8470-04b3-73bf-9ce9a4340822",
                        "name": "CRM"
                    }
                ]
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Segment
GET /segments/{id}

Retrieve detailed information for a segment

Path variables

id
string GUID required

The segment (identifier) that will be retrieved

Example:
ad7a97fe-104a-8eb1-a49b-1f4b766e53a8

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 segment identifier

Example:
ad7a97fe-104a-8eb1-a49b-1f4b766e53a8
name
string

The segment name

Example:
Marketing contacts
description
string

The segment description

Example:
List contacts owning an account
refresh_frequency
string

How often the segment is automatically refreshed (represented as a cron expression)

Example:
0 0 12 * * ?
size
integer

The segment size (total number of contacts)

Example:
2
imported_from
string

The analytics tool from which the segment was imported

Enumeration:
MIXPANEL
Example:
MIXPANEL
accessibility
Object

Defines how the segment can be accessed from business network

type
string

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Object
id
string GUID

The organisation identifier

Example:
feedcd4b-8470-04b3-73bf-9ce9a4340822
name
string

The organisation name

Example:
CRM
conditions
Object

The segment conditions

groups
Array

The segment’s groups of conditions

Object
name
string

The name of the conditions group. If not specified, then the group is named after a letter of the Latin alphabet starting from A, then B etc.

Example:
A
type
string

Each group includes conditions that refer to either an Event that was performed or Contact information

Enumeration:
EVENT
CONTACT
event_name
string

The name of the event that a contact performed or not. Applicable and required only for conditions of type Event. If not specified, then contacts that performed any event are eligible to be included in the segment

Enumeration:
PURCHASE
PURCHASE_CANCELLED
AWARD
SPEND
INVOICE
CREDIT_NOTE
PAYMENT
REFUND
ORDER
REFERRAL
REFERRAL_CANCELLED
TOP_UP
TRANSFER
inclusion
string

Defines the operator that will be used accoridng to the condition’s type. When the condition refers to an Event, then contact are included in the segment if they did or did not perform that Event. When the condition refers to Contact information, then contacts are included in the segment if they have or do not have the specified contact related information.

Enumeration:
DID

Applicable for Events only

DID_NOT

Applicable for Events only

HAVE

Applicable for Contacts only

HAVE_NOT

Applicable for Contacts only

frequency
Object

The frequency of an event, i.e hw many times an Event occured withn a period of time. Applicable and required for Event conditions.

operator
string

The frequency’s operator

Enumeration:
AT_LEAST
BETWEEN
MORE_THAN
LESS_THAN
EQUAL
Default:
AT_LEAST
min_times
integer

The minimum number of times the Event occured.

Example:
1
max_times
integer

The maximum number of times the Event occured. Required only when the operator is set to BETWEEN

Example:
5
period
Object

The period of time during which the Event(s) occured

operator
string

The operator that shows he period of time during which Events must fall within in order for contacts to be included in the segment. Operators Between, On, Since require date(s) filters, whereas the rest of the operators need an integrer value(s)

Enumeration:
BETWEEN
SINCE
ON
LAST_DAYS
LAST_MONTHS
LAST_HOURS
LAST_WEEKS
from
string

The starting period of time. For dates, this should be an epoch value

Example:
3
to
string

The ending period. Required only for Between operator. For dates, this should be an epoch value

Example:
5
type
string

The operator that shows he period of time during which Events must fall within in order for contacts to be included in the segment. Operators Between, On, Since require date(s) filters, whereas the rest of the operators need an integrer value(s)

Enumeration:
BETWEEN
SINCE
ON
LAST_DAYS
LAST_MONTHS
LAST_HOURS
LAST_WEEKS
properties_operator
string

Multiple properties can be added to apply additional filtering on the conditions. So if more than one properties are specified, an operator is required that defines the logic between properties. This operator can only be ALL (all properties must be met) or ANY (at least one must be met) to incldue the contact in the segment.

Enumeration:
ALL
ANY
Default:
ALL
Example:
ALL
properties
Array

List of event properties/attibutes that can be used as additional filtering conditions.

Object
property
string required

The name of the property which depends on the selected event. Each event has its own set of properties.

Example:
purchase.amount
operator
string

The property’s condition operator

Enumeration:
IS
IS_NOT
ON
BEFORE
AFTER
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
IS_EMPTY
IS_NOT_EMPTY
STARTS_WITH
DOES_NOT_START_WITH
ENDS_WITH
DOES_NOT_END_WITH
LIKE
NOT_LIKE
EQUAL
NOT_EQUAL
LESS_THAN_OR_EQUAL
MORE_THAN_OR_EQUAL
min_value
string required

The property’s value or in the case of range operator like Between, the starting value.

Example:
5.00
max_value
string

The maximum value for the property, required when using “range” operators like Between.

Example:
10
value_list
Array of string

List of String values required when the operator implies multiple values comparison like Contains,Does not contain.

type
string

The property’s data type

Enumeration:
STRING
NUMBER
INTEGER
DATE
list_name
string

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

Example:
products
logical_expression
string required

The logical expression between the Groups. Required if more than one groups are specified

Example:
(A OR B) AND C
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/segments/ad7a97fe-104a-8eb1-a49b-1f4b766e53a8 HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "ad7a97fe-104a-8eb1-a49b-1f4b766e53a8",
    "name": "Marketing contacts",
    "description": "List contacts owning an account",
    "refresh_frequency": "0 0 12 * * ?",
    "size": 2,
    "imported_from": "MIXPANEL",
    "accessibility": {
        "type": "BUSINESS",
        "organisations": [
            {
                "id": "feedcd4b-8470-04b3-73bf-9ce9a4340822",
                "name": "CRM"
            }
        ]
    },
    "conditions": {
        "groups": [
            {
                "name": "A",
                "type": "CONTACT",
                "event_name": "AWARD",
                "inclusion": "DID",
                "frequency": {
                    "operator": "AT_LEAST",
                    "min_times": 1,
                    "max_times": 5,
                    "period": {
                        "operator": "LAST_MONTHS",
                        "from": "3",
                        "to": "5",
                        "type": "SINCE"
                    }
                },
                "properties_operator": "ALL",
                "properties": [
                    {
                        "property": "purchase.amount",
                        "operator": "BETWEEN",
                        "min_value": "5.00",
                        "max_value": "10",
                        "value_list": [
                            ""
                        ],
                        "type": "INTEGER",
                        "list_name": "products"
                    }
                ]
            }
        ],
        "logical_expression": "(A OR B) AND C"
    }
}
Perform Segment Actions
PUT /segments/{id}/actions

Perform an action on an existing segment.

Path variables

id
string GUID required

The segment (identifier) on which an action is performed

Example:
d24a32fd-fac8-3bc0-66a1-533ae7c4707f

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 action to be performed on the segment

Enumeration:
REFRESH

Update the segment contacts based on conditions

EXPORT

Export the contacts of a segment to a .csv file and send it to the logged in user’s email

Default:
REFRESH

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The segment identifier

Example:
d24a32fd-fac8-3bc0-66a1-533ae7c4707f
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/segments/d24a32fd-fac8-3bc0-66a1-533ae7c4707f/actions HTTP/1.1 

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

{
    "action": "REFRESH"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "d24a32fd-fac8-3bc0-66a1-533ae7c4707f"
}
Get Segment Contacts
GET /segments/{id}/contacts

Returns a list of contacts which are included in an existing segment.

Path variables

id
string GUID required

The segment (identifier) of which contact will be retrieved

Example:
3ebf9ee1-6a38-85db-f7f5-605becaf2022

Request parameters

search_value
string optional

Search for contacts based on their code, name, phone or email address

Example:
john doe
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 contact’s unique identifier

Example:
5e2fc32d-efb5-8c5a-b4c5-7e3861db8ddd
name
string

The contact’s name (full name for Persons, company name for Companies)

Example:
John Smith
code
string

The contact’s code

Example:
0049304938571623
phone_number
string

The contact’s phone number (including counry code)

Example:
+306954000112
email_address
string

The contact’s email address

Example:
bill@gmail.com
phone
Object

The contact’s phone number

country_code
string

The phone country code (based on ISO 3 char code)

Example:
CYP
number
string

The phone number

Example:
99123456
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/segments/{id}/contacts HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "name": "John Smith",
            "code": "0049304938571623",
            "phone_number": "+306954000112",
            "email_address": "bill@gmail.com"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Service Requests

Service Requests are customer requests submitted either by a back-end user (using CRM.COM), or a Contact (via a self-service platform such as an app or portal), to initiate a service action.

POST /service_requests
PUT /service_requests/{id}
DELETE /service_requests/{id}
GET /service_requests
GET /service_requests/{id}
PUT /service_requests/{id}/actions
GET /service_requests/{id}/queues/stages
Create Service Request
POST /service_requests

Create a new service request for a contact. New service requests will automatically acquire a state of ‘New’, and a queue stage of ‘New’ (i.e. the first stage in the queue set up).

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
contact_id
string GUID required

The unique identifier of the contact for whom the service request is being raised

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
queue_id
string GUID required

The id of the queue which will be assigned to the service request

Example:
3203babc-8588-477c-9fe4-d5c6da754fb8
description
string required

Description of the required service

Example:
The customer has a recurring issue with their billing.
address
Object

Service request address information

id
string nullable

The contact’s address id associated to the service request (either ‘id’ or ‘other’ can be specified)

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244
other
Object nullable
address_line_1
string required

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
affected_entities
Array

List any entities being affected by the issue on the service request

Object
id
string GUID

The unique id of the entity (e.g. id of a subscription service)

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
type
string

The entity type

Example:
SUBSCRIPTION_SERVICES
categories
Array

The categories applicable to this service request. Each service request has a unique set of categories.

Unique items: YES
Object
id
string GUID

Service request category unique id

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
assign_to
Object nullable

Service request owner

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

Urgency and impact settings are used to calculate the priority of a service request according to queue settings, if not provided then defaults to MEDIUM for both levels

urgency
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
MEDIUM
impact
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
LOW
links
Array

Other service requests linked to this one

Object
id
string GUID

The id of the service request to be linked

Example:
12640ac3-effa-406e-a09f-a8e6e9c3c120
custom_fields
Array

Custom fields relevant to this service request

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

The GUID for the new service request created

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
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/service_requests HTTP/1.1 

Content-Type: application/json

{
    "contact_id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
    "queue_id": "3203babc-8588-477c-9fe4-d5c6da754fb8",
    "description": "The customer has a recurring issue with their billing.",
    "address": {
        "id": "61c943c8-dfeb-4c09-a25c-b054f48bf244",
        "other": {
            "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"
        }
    },
    "affected_entities": [
        {
            "id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
            "type": "SUBSCRIPTION_SERVICES"
        }
    ],
    "categories": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "assign_to": {
        "user_id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
        "team_id": "a43f08ca-998b-afbc-6ed4-c9dc2d136935"
    },
    "priority_matrix": {
        "urgency": "MEDIUM",
        "impact": "LOW"
    },
    "links": [
        {
            "id": "12640ac3-effa-406e-a09f-a8e6e9c3c120"
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "33f6614d-0c25-4bc6-b360-fa74687956b8"
}
Update Service Request
PUT /service_requests/{id}

Update an existing service request for a contact

Path variables

id
string required

The GUID of the service request to be updated

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8

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

Description of the required service

Example:
The customer has a recurring issue with their billing.
approximate_close_date
integer epoch

The approximate closing date & time of the service request (based on queue and priority settings)

Example:
1653310820
alert_date
integer

The calculated alert time based on the queue type and priority set for this service request, alert times are configured to notify users when a service request has not progressed from the ‘New’ status

Example:
1655989275
priority_matrix
Object

Urgency and impact settings are used to calculate the priority of a service request according to queue configuration

urgency
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
MEDIUM
impact
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
LOW
categories
Array

One or more categories associated to service request

Unique items: YES
Object
id
string GUID

Service request category unique id

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

If the service request is being raised for a particular contact entity (e.g. subscription) then provide details here

Object
id
string GUID

The unique id of the entity (e.g. id of a subscription service)

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
type
string

The entity type

Example:
SUBSCRIPTION_SERVICES
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
address
Object

Service request address information

id
string nullable

The contact’s address id associated to the service request (either ‘id’ or ‘other’ can be specified)

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244
other
Object nullable
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
links
Array

Other service requests linked to this one

Object
id
string GUID

The id of the service request to be linked

Example:
12640ac3-effa-406e-a09f-a8e6e9c3c120
custom_fields
Array

Custom fields relevant to this service request

Object
key
string

The custom field’s unique key

Example:
back_office
value
string

The custom field’s value

Example:
0001-12345
stage
Object

Update the comments of a stage

id
string GUID

Stage id

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

Specific stage comment

Example:
Ensure that customer submits signed agreement prior to progressing to the next stage

Responses

200 OK
Body
Object
id
string

The GUID for the updated service request

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
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/service_requests/33f6614d-0c25-4bc6-b360-fa74687956b8 HTTP/1.1 

Content-Type: application/json

{
    "description": "The customer has a recurring issue with their billing.",
    "approximate_close_date": 1653310820,
    "alert_date": 1655989275,
    "priority_matrix": {
        "urgency": "MEDIUM",
        "impact": "LOW"
    },
    "categories": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "affected_entities": [
        {
            "id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
            "type": "SUBSCRIPTION_SERVICES"
        }
    ],
    "assign_to": {
        "user_id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
        "team_id": "a43f08ca-998b-afbc-6ed4-c9dc2d136935"
    },
    "address": {
        "id": "61c943c8-dfeb-4c09-a25c-b054f48bf244",
        "other": {
            "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"
        }
    },
    "links": [
        {
            "id": "12640ac3-effa-406e-a09f-a8e6e9c3c120"
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "stage": {
        "id": "609a369e-3f10-492a-8332-679ecbe56b65",
        "comment": "Ensure that customer submits signed agreement prior to progressing to the next stage"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "33f6614d-0c25-4bc6-b360-fa74687956b8"
}
Delete Service Request
DELETE /service_requests/{id}

Delete a single service request. The service request can be in any stage or state (New, In Progress, Closed)

Path variables

id
string GUID required

The segment (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

204 No Content

The request has succeded

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/service_requests/c0d4712e-6688-4604-b3d6-d084e4d2dc05 HTTP/1.1 

HTTP/1.1 204 No Content 
List Service Requests
GET /service_requests

Retrieve service requests according to applied filters

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 for a service request using Contact person’s name, Owner, Description, number,status, date_created, date_closed

Example:
SR0001ABC,NAME,OWNER,DESCRIPTION,TICKET NUMBER,QUEUE, STATUS, DATE_CREATED, DATE_CLOSED
queue_id
string optional

he queue GUID (to view service request)

Example:
bf58e2a0-f73b-4ebb-8425-92ff4253d6be
contact_id
string optional

The unique contact id

Example:
39d271af-16b8-4bb0-962a-25b37b0d4d3c
resolved
boolean optional

Whether the SR is resolved. Default is unresolved

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

priority
string optional

Filter based on priority

Enumeration:
URGENT
HIGH
MEDIUM
LOW
stage_ids
string csv optional

Array of queue stage ids

tag_ids
string csv optional

List of tag ids to filter by

include_tags
boolean optional

Defines whether tags should be retrieved or not

Example:
false
closure_reason_ids
string csv optional

List of closure reasons to filter by

approximate_close_date
string optional

The approximate closure date of SR. Date range. ie. between today and next week Monday.The value can be a string with a date in epoch format. Each option must also include an operator. Eg: &approximate_close_date.[gte]=1609459200&approximate_close_date.[lt]=1609459200. Use up to two of the following options based on the required search:

Enumeration:
approximate_close_date[gt]

Returns results where the ‘approx_close_date’ field is greater than this value.

approximate_close_date[gte]

Return results where the ‘approx_close_date’ field is greater than or equal to this value.

approximate_close_date[lt]

Return results where the ‘approx_close_date’ field is less than or equal to this value.

approximate_close_date[lte]

Return results where the ‘approx_close_date’ field is less than or equal to this value.

alert_date
string optional

The alert dates of SR’s. Date range. ie. between today and next week Monday.The value can be a string with a date in epoch format. Each option must also include an operator. Eg: &alert_date.[gte]=1609459200&alert_date.[lt]=1609459200. Use up to two of the following options based on the required search:

Enumeration:
alert_date[gt]

Returns results where the ‘alert_date’ field is greater than this value.

alert_date[gte]

Return results where the ‘alert_date’ field is greater than or equal to this value.

alert_date[lt]

Return results where the ‘alert_date’ field is less than or equal to this value.

alert_date[lte]

Return results where the ‘alert_date’ field is less than or equal to this value.

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
category_id
array of string optional

Filter by category ids

Collection format: csv
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

include_approvals
boolean optional

Defines whether approval requests information should be retrieved or not

Example:
true
approval_state
string optional

Filter based on approval state

Enumeration:
PENDING
APPROVED
REJECTED
state
string optional

Filer according to service request state(s)

Enumeration:
NEW
IN_PROGRESS
CLOSED
CANCELLED
Example:
IN_PROGRESS
address
string optional

Search for Service Requests based on the address at which they will be delivered

Example:
Main street 34

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 GUID

The service request unique identifier

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
number
string

The unique Service Request number geerated based on Numbering schemes.

Example:
SR123ABC
description
string

A brief description of the service request

Example:
Customer is interested in upgrading to DELUXE 10
state
string
Enumeration:
NEW
IN_PROGRESS
CLOSED
CANCELLED
creation_date
integer epoch

Date service request was created

Example:
1655989220
alert_date
integer epoch

The calculated alert time based based on queue and priority settings of the service request

Example:
1672837220
approximate_close_date
integer epoch

The approximate closing date of the service request, calculated according to the queue and priority of the service request

Example:
1
priority
string
Enumeration:
URGENT
HIGH
MEDIUM
LOW
resolved
boolean

Has the service request been resolved?

queue
Object

service request queue information

id
string GUID

The service request queue id

Example:
c84beadd-52f0-4d2a-aa5e-5b81a9978056
name
string

The service request queue name

Example:
Billing Issues
stage
Object

Current queue stage information of the service request

id
string GUID

Id of the current queue stage that the service request is in

Example:
07132e7d-b4a0-4070-ad7b-7df2a8be0ebf
name
string

The name of the current queue stage

Example:
Proposal submitted
colour
string

The hex colour code associated to the status

Example:
#FDS7GH
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:
C12905723
closure_reason
Object

The service request closure reason, applicable only when a service request has been closed

id
string GUID

The id of the closure reason for this service request

Example:
a90b9421-195f-4e41-867f-b8fcb4c5161a
name
string

The closure reason name

Example:
Referred to associate Tech.Com
tags
Array

Tags associated with the service request

Object
id
string GUID

Tag unque 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
assign_to
Object
user
Object

Details about the user that the record is assigned to

id
string

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

The team identifier

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

The team name

Example:
Support
approvals
Object

Details about the application

state
string

The approval request state

Enumeration:
PENDING
APPROVED
REJECTED
Example:
APPROVED
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
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/service_requests HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
            "number": "SR123ABC",
            "description": "Customer is interested in upgrading to DELUXE 10",
            "state": "CLOSED",
            "creation_date": 1655989220,
            "alert_date": 1672837220,
            "approximate_close_date": 1,
            "priority": "URGENT",
            "resolved": true,
            "queue": {
                "id": "c84beadd-52f0-4d2a-aa5e-5b81a9978056",
                "name": "Billing Issues"
            },
            "stage": {
                "id": "07132e7d-b4a0-4070-ad7b-7df2a8be0ebf",
                "name": "Proposal submitted",
                "colour": "#FDS7GH"
            },
            "contact": {
                "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
                "name": "John Doe",
                "code": "C12905723"
            },
            "closure_reason": {
                "id": "a90b9421-195f-4e41-867f-b8fcb4c5161a",
                "name": "Referred to associate Tech.Com"
            },
            "tags": [
                {
                    "id": "609a369e-3f10-492a-8332-679ecbe56b65",
                    "name": "Maintenance",
                    "colour": "FR547F"
                }
            ],
            "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"
                }
            },
            "approvals": {
                "state": "APPROVED"
            },
            "custom_fields": [
                {
                    "key": "back_office",
                    "value": "Back Office"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Service Request
GET /service_requests/{id}

Retrieve the information for a specific service request.

Path variables

id
string required

The service request GUID to be retrieved

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

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

Service request id

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

Service request number

Example:
SR0001ABC
description
string

Service request description

Example:
STB error
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
closing_comment
string

Applicable if the service request has been ‘Closed’

Example:
Installation issue resolved by external counterpart H & P Ltd.
creation_date
integer epoch

Date service request was created

Example:
1672837220
approximate_close_date
integer epoch

The approximate closing date of the service request, calculated according to the queue and priority of the service request

Example:
1704459620
alert_date
integer epoch

The calculated alert time based based on queue and priority settings of the service request

Example:
1672837220
resolved
boolean

Has service request been resolved? Applicable only when service request has been closed

Example:
true
queue
Object

Service request queue information

id
string

The service request queue id

Example:
84beadd-52f0-4d2a-aa5e-5b81a9978056
name
string

The service request queue name

Example:
Billing issues
stage
Object

Current queue stage information of the service request

id
string GUID

Id of the current queue stage that the service request is in

Example:
07132e7d-b4a0-4070-ad7b-7df2a8be0ebf
name
string

The name of the queue stage

Example:
Response submitted
colour
string

The hex colour code used for this stage

Example:
#FA89CB
priority_matrix
Object

Priority information

priority
string
Enumeration:
URGENT
HIGH
MEDIUM
LOW
Example:
MEDIUM
urgency
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
LOW
impact
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
MEDIUM
closure_reason
Object

The closure reason, applicable only if service request has been closed without being resolved

id
string

The id of the closure reason

Example:
07132e7d-b4a0-4070-ad7b-7df2a8be0ebf
name
string

Closure reason name

Example:
To be handled by associate Tech.Com
invoice
Object

The invoice raised against the service request when the service request was closed, applicable only if charges have been incurred

id
string

Invoice unique id

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
number
string

Invoice number

Example:
INV87386IUGY
affected_entities
Array

If the service request raised for a specific contact entity

Object
id
string

The unique GUID of the affected entity (e.g. a subscription service)

Example:
a5a02147-3d9b-4363-aaf0-83eb0a3f6e92
type
string

The type of entity

Example:
SUBSCRIPTION_SERVICES
value
string

The name/number of the object. If the entity_type is SUBSCRIPTION_SERVICES then the entity_value should be the service’s name (product name)

Example:
Streaming service P007NDR
categories
Array

The categories assigned to the service request

Object
id
string

The id of the category

Example:
c8ddcdbc-3873-46e6-adb8-6b317e5f8079
name
string

The name of the category

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

The team identifier

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

The team name

Example:
Support
address
Object
address_line_1
string
Example:
Elia Papakyriakou
address_line_2
string
Example:
7 Tower Stars
state_province_county
string
Example:
Egkomi
town_city
string
Example:
Nicosia
postal_code
string
Example:
2015
country
string
Example:
CYP
lat
number
Example:
35.157115
lon
number
Example:
33.313719
google_place_id
string
Example:
ChIJrTLr-GyuEmsRBfy61i59si0
approval
Object

Details about the application

state
string

The approval request state

Enumeration:
PENDING
APPROVED
REJECTED
Example:
APPROVED
links
Array
Object
id
string GUID

The id of the service request to be linked

Example:
12640ac3-effa-406e-a09f-a8e6e9c3c120
number
string

The ticket number of the linked service request

Example:
SR00103
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
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/service_requests/609a369e-3f10-492a-8332-679ecbe56b65 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "609a369e-3f10-492a-8332-679ecbe56b65",
    "number": "SR0001ABC",
    "description": "STB error",
    "contact": {
        "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
        "name": "John Doe",
        "code": "C123"
    },
    "closing_comment": "Installation issue resolved by external counterpart H & P Ltd.",
    "creation_date": 1672837220,
    "approximate_close_date": 1704459620,
    "alert_date": 1672837220,
    "resolved": true,
    "queue": {
        "id": "84beadd-52f0-4d2a-aa5e-5b81a9978056",
        "name": "Billing issues"
    },
    "stage": {
        "id": "07132e7d-b4a0-4070-ad7b-7df2a8be0ebf",
        "name": "Response submitted",
        "colour": "#FA89CB"
    },
    "priority_matrix": {
        "priority": "MEDIUM",
        "urgency": "LOW",
        "impact": "MEDIUM"
    },
    "closure_reason": {
        "id": "07132e7d-b4a0-4070-ad7b-7df2a8be0ebf",
        "name": "To be handled by associate Tech.Com"
    },
    "invoice": {
        "id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
        "number": "INV87386IUGY"
    },
    "affected_entities": [
        {
            "id": "a5a02147-3d9b-4363-aaf0-83eb0a3f6e92",
            "type": "SUBSCRIPTION_SERVICES",
            "value": "Streaming service P007NDR"
        }
    ],
    "categories": [
        {
            "id": "c8ddcdbc-3873-46e6-adb8-6b317e5f8079",
            "name": "Maintenance"
        }
    ],
    "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"
        }
    },
    "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"
    },
    "approval": {
        "state": "APPROVED"
    },
    "links": [
        {
            "id": "12640ac3-effa-406e-a09f-a8e6e9c3c120",
            "number": "SR00103"
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}
Service Request Actions
PUT /service_requests/{id}/actions

Action a service request, in one of the following ways:

  • Progress a service request to another stage in the queue
  • Regress a service request to the previous stage in the queue
  • Change the state of a service request (e.g. from ‘In Progress’ to ‘Closed’)

Path variables

id
string required

The GUID of the service request for which an action will be performed against, can be one of:

  • id of the service request whose state will be changed
  • id of the service request whose queue stage will be changed
Example:
6f279898-d873-4175-941f-77eec76709c1

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

Action to be performed against the service request

Enumeration:
START_PROGRESS

Change the service request state to ‘In Progress’ from ‘New’

CLOSE

Change the service request state to ‘Closed’

PROGRESS

Progress a service request to the next stage in the queue

REGRESS

Regress a service request to a previous stage in the queue

Example:
PROGRESS
stage_id
string GUID

The new queue stage id, applicable and required if action = PROGRESS

Example:
6f279898-d873-4175-941f-77eec76709c1
date_achieved
integer epoch required

Date & time action was performed, defaults to current date & time. Required for all actions

Example:
1583846865
comment
string

Optional comments relevant to the stage of the queue, applicable if action = PROGRESS or REGRESS. Multiple comments can be created per stage

Example:
The customer must submit their signed contract asap
resolved
boolean

Has the ticket been resolved? Applicable only when action = CLOSE

Example:
true
closure_reason_id
string

Reason for closing the ticket, appliable only when action = CLOSE and resolved = false

Example:
6f89ff50-4dc8-42cc-862f-4f0a50e5f8f9
account_id
string

The account id relating to the charges associated with the service request. This account will be invoiced for the charges when closing the service request.

Example:
038af54e-282c-40ad-ae5d-cc74f2c80f40
closing_comment
string

Any user comments added prior to closing the service request, appliable only when action = CLOSE

Example:
This issue is closed and mitigated. Faulty installation.

Responses

200 OK
Body
Object
id
string

The GUID of the service request which has been actioned

Example:
6f279898-d873-4175-941f-77eec76709c1
approval_requests
Array

Determines whether approval reuqests are applied or not, if not null an approval is requested

Object
id
string

The service approval identifier

Example:
3a4aad81-e5c2-72b7-3a86-903239d08767
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/service_requests/6f279898-d873-4175-941f-77eec76709c1/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "PROGRESS",
    "stage_id": "6f279898-d873-4175-941f-77eec76709c1",
    "date_achieved": 1583846865,
    "comment": "The customer must submit their signed contract asap",
    "resolved": true,
    "closure_reason_id": "6f89ff50-4dc8-42cc-862f-4f0a50e5f8f9",
    "account_id": "038af54e-282c-40ad-ae5d-cc74f2c80f40",
    "closing_comment": "This issue is closed and mitigated. Faulty installation."
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "6f279898-d873-4175-941f-77eec76709c1",
    "approval_requests": [
        {
            "id": "3a4aad81-e5c2-72b7-3a86-903239d08767"
        }
    ]
}
List Service Request Queue Stages
GET /service_requests/{id}/queues/stages

Retrieve all the queue stages that a service request has progressed through until now.

Path variables

id
string required

The GUID of the service request whose queue stages will be retrieved

Example:
1fda2322-ed57-4f2b-93e2-9198eebcea07

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

The id of the service request

Example:
1fda2322-ed57-4f2b-93e2-9198eebcea07
date_achieved
integer

Date of achieving this stage

Example:
1653397883
state
string

Service request current state

Enumeration:
NEW
IN_PROGRESS
CLOSED
CANCELLED
stage
Object

Queue stage information

id
string

Queue stage unique id

Example:
2eb909cf-2467-4827-81ca-498ad4b2421f
order
integer

Queue stage order within the queue

Example:
1
name
string

Queue stage name

Example:
Service Scheduled
colour
string

Stage hex colour code

Example:
#2c8ef8
comment_type
string

Comment type - optional when progresssing to the next stage, mandatory if regressing to a previous stage

Enumeration:
PROGRESS
REGRESS
comment
string

The comment body

Example:
The customer must submit their signed contract asap
performed_by
Object

Details of the user who performed the action

id
string

The GUID of the user

Example:
2fc8c9c8-9d66-4c58-84e1-949c68273e22
username
string

The name of the user

Example:
Sam Jackson
modified_date
string epoch

Date SR stage modified (relevant to service request history)

Example:
1668428511
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/service_requests/1fda2322-ed57-4f2b-93e2-9198eebcea07/queues/stages HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "1fda2322-ed57-4f2b-93e2-9198eebcea07",
            "date_achieved": 1653397883,
            "state": "IN_PROGRESS",
            "stage": {
                "id": "2eb909cf-2467-4827-81ca-498ad4b2421f",
                "order": 1,
                "name": "Service Scheduled",
                "colour": "#2c8ef8"
            },
            "comment_type": "REGRESS",
            "comment": "The customer must submit their signed contract asap",
            "performed_by": {
                "id": "2fc8c9c8-9d66-4c58-84e1-949c68273e22",
                "username": "Sam Jackson"
            },
            "modified_date": "1668428511"
        }
    ]
}
Notes
POST /service_requests/{id}/notes
PUT /service_requests/{id}/notes/{note_id}
DELETE /service_requests/{id}/notes/{note_id}
GET /service_requests/{id}/notes
Create Service Request Note
POST /service_requests/{id}/notes

Create a new note for a service request

Path variables

id
string GUID required

The service request (identifier) that a note will be added

Example:
8ade0c06-6ba3-4ed0-9e04-228201e1b30c

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

The note contents

Example:
After my telephone conversation with Zack this morning, it was decided that....
pinned
boolean required

Pinned notes appear at the top of the notes list

Example:
true
Examples

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The note identifier

Example:
1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf
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/service_requests/8ade0c06-6ba3-4ed0-9e04-228201e1b30c/notes HTTP/1.1 

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

{
    "note": "After my telephone conversation with Zack this morning, it was decided that....",
    "pinned": true
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf"
}
Update Service Request Note
PUT /service_requests/{id}/notes/{note_id}

Update a note for a service request. Only the user who created the note can edit it.

Path variables

id
string GUID required

The service request (identifier) whose note will be updated

Example:
8ade0c06-6ba3-4ed0-9e04-228201e1b30c
note_id
string GUID required

The note (identifier) that will be updated

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

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

The actual note contents

Example:
After my telephone conversation with Zack this morning, it was decided that....
pinned
boolean nullable

Pinned notes appear at the top of the notes list.

Example:
true
Examples

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The note identifier

Example:
1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf
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/service_requests/8ade0c06-6ba3-4ed0-9e04-228201e1b30c/notes/1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf HTTP/1.1 

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

{
    "note": "After my telephone conversation with Zack this morning, it was decided that....",
    "pinned": true
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf"
}
Delete Service Request Note
DELETE /service_requests/{id}/notes/{note_id}

Delete a single note for a service request. Only the user who created the note can delete it.

Path variables

id
string GUID required

The service request (identifier) of which a note will be deleted

Example:
8ade0c06-6ba3-4ed0-9e04-228201e1b30c
note_id
string GUID required

The note (identifier) to be deleted

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

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

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/service_requests/8ade0c06-6ba3-4ed0-9e04-228201e1b30c/notes/1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Service Request Notes
GET /service_requests/{id}/notes

Retrieve all notes for a single service request

Path variables

id
string GUID required

The service request (identifier) whose notes are to be retrieved

Example:
8ade0c06-6ba3-4ed0-9e04-228201e1b30c

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 200

Successful Request

Body
Object
content
Array
Object
id
string GUID

The note identifier

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

The note contents

Example:
After my telephone conversation with Zack this morning, it was decided that....
created_by
Object

Details of the user who created the note

id
string

The GUID of the user who created the note

Example:
c8079ee1-8081-4be1-ab09-5091f55b2d4e
username
string

The name of the user who created the note

Example:
Sam Jackson
created_on
string epoch

Date and time the note was created

Example:
9876577501
updated_on
string epoch

Date and time the note was updated

Example:
9876579547
pinned
boolean

Is note pinned so that it appears at the top of the notes list?

Example:
true
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/service_requests/8ade0c06-6ba3-4ed0-9e04-228201e1b30c/notes HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
            "note": "After my telephone conversation with Zack this morning, it was decided that....",
            "created_by": {
                "id": "c8079ee1-8081-4be1-ab09-5091f55b2d4e",
                "username": "Sam Jackson"
            },
            "created_on": "9876577501",
            "updated_on": "9876579547",
            "pinned": "true"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Tags
PUT /service_requests/{id}/tags
GET /service_requests/{id}/tags
Update Service Request Tags
PUT /service_requests/{id}/tags

Update the tags associated with the service request

Path variables

id
string GUID required

The service request (identifier) on which tags will be updated

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 organisation 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/service_requests/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 Service Request Tags
GET /service_requests/{id}/tags

Retrieve a list of tags that are associated with the service request

Path variables

id
string GUID required

The service request (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/service_requests/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"
        }
    ]
}
Attachment Files
POST /service_requests/{id}/attachments
DELETE /service_requests/{id}/attachments/{file_id}
GET /service_requests/{id}/files
Add Service Request Attachment
POST /service_requests/{id}/attachments

Connect an uploaded attachment to an existing service request

Path variables

id
string GUID required

The service request (identifier) that attachment will be attached

Example:
66451204-4404-894c-4dc6-486c540ece40

Notes

FILE UPLOAD FLOW

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

  1. Upload File Signature
  2. Connect a file to a Service Request

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 nullable

The uploaded file signature (identifier) to be attached (file or link should be provided)

Example:
60556f0c-1c94-45b5-01b8-4dc7fa72001a
link
string required nullable

The URL endpoint to be attached (file or link should be provided)

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
description
string nullable

The file description

Example:
contact screenshot

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The attachment identifier

Example:
66451204-4404-894c-4dc6-486c540ece40
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/service_requests/66451204-4404-894c-4dc6-486c540ece40/files HTTP/1.1 

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

{
    "file_id": "30526723-24a3-e4e3-1a75-b26b1b41f05c",
    "url": "https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug",
    "description": "Screenshot sent by customer"
}

HTTP/1.1 201 Created

Content-Type: application/json

{
    "id": "66451204-4404-894c-4dc6-486c540ece40"
}
Delete Service Request Attachment
DELETE /service_requests/{id}/attachments/{file_id}

Delete a specific service request attachment

Path variables

id
string GUID required

The service request (identifier) that file will be deleted

Example:
66451204-4404-894c-4dc6-486c540ece40
file_id
string GUID required

The attachment file (identifier) that will be deleted

Example:
04c0bebd-8bb0-0b3e-e1a6-716a0fd200b1

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/service_requests/66451204-4404-894c-4dc6-486c540ece40/files/04c0bebd-8bb0-0b3e-e1a6-716a0fd200b1 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Service Request Attachments
GET /service_requests/{id}/files

Retrieve all attachments for a specific service request

Path variables

id
string GUID required

The service request (identifier) that files will be retrieved

Example:
66451204-4404-894c-4dc6-486c540ece40

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

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The attachement identifier

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

The attachement description

Example:
Screenshot sent by customer
file
Object

The attached file

id
string GUID

The attached file identifier

Example:
0317868f-28f8-9f56-d248-5a78718b38cc
url
string

The attached file URL endpoint

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
name
string

The attached file name

Example:
img.png
mime
string

The mime type of the uploaded file

Enumeration:
csv
doc
docx
xls
xlsx
pdf
log
txt
png
jpg
jpeg
svg
link
string

The attached URL endpoint

Example:
https://crmcom.sharepoint.com/:x:/s/servicerequests/EZx2qopbvfN3uj1o3dOqbPm52Ct6bg?rtime=w0ic-hfG2Ug
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/service_requests/66451204-4404-894c-4dc6-486c540ece40/files HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "3ae9d64a-8a3b-f1e1-eed6-05b307f926fb",
            "mime": "png",
            "description": "this is a brief description of this image",
            "file": {
                "id": "0317868f-28f8-9f56-d248-5a78718b38cc",
                "name": "img.png"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Charges

Charge the contact for a service request by adding products of type ‘non-traceable physical goods’, ‘expenses’, ‘one-time services’.

POST /service_requests/{id}/charges
PUT /service_requests/{id}/charges
GET /service_requests/{id}/charges
Create Service Request Charges
POST /service_requests/{id}/charges

Create one or more charges for a service request with prices and taxes

Path variables

id
string GUID required

The service request (identifier) to create charges for

Example:
4be229d5-c70d-4cef-794e-fff316553cb3

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

Id of the account to be charged. If not specified, then the primary is used.

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
lines
Array required

Line item information

Object
product_id
string required

The unique identifier of the product to be charged for, must be a product of type ‘physical goods’, ‘expenses’, ‘one-time service’

Example:
3203babc-8588-477c-9fe4-d5c6da754fb8
quantity
integer required

Quantity of product

Example:
1
price
number

The unit price of the product. If specified, then the pricing strategy is not applied.

Example:
9.99
discount
Object

Discount information

amount
number

Product discount amount

Example:
2.05
percentage
number

Product discount percentage

Example:
10.5
discount_incl_tax
number

Product discount including tax

Example:
3.48
sub_total
number

Sub total

Example:
10.36
notes
string

A note regarding the item

ad_hoc_discount
Object

Total discount information

amount
number

Total discount amount

Example:
1.49
type
string

Discount type

Enumeration:
AMOUNT
PERCENTAGE
Example:
PERCENTAGE

Responses

201 Created

The request has succeeded

Body
Object
id
string

The unique identifier of the Service Request

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/service_requests/{id}/charges HTTP/1.1 

Content-Type: application/json

{
    "account_id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
    "lines": [
        {
            "product_id": "3203babc-8588-477c-9fe4-d5c6da754fb8",
            "quantity": 1,
            "price": 9.99,
            "discount": {
                "amount": 2.05,
                "percentage": 10.5,
                "discount_incl_tax": 3.48
            },
            "sub_total": 10.36,
            "notes": ""
        }
    ],
    "ad_hoc_discount": {
        "amount": 1.49,
        "type": "PERCENTAGE"
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Service Request Charges
PUT /service_requests/{id}/charges

Updates charges for a service request

Path variables

id
string GUID required

The service request (identifier) to update charges for

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

Request body

Object
account_id
string GUID

The account (identifier) of service request charges

Example:
8f42c964-7049-0553-06da-04b06e99b3d5
discount
Object

The discount of service request charges

amount
number

The discount amount

Example:
1.22
type
string

The discount type

Example:
AMOUNT
lines
Array

The line items of service request charges

Object
product_id
string GUID

The product (identifier) item

Example:
qf42c964-7049-0553-06da-04b06e99b31a
quantity
integer

The quantity of the item

Example:
1
price
number

The price of the item

Example:
9.99
notes
string

The notes of the item

sub_total
integer

The sub-total of the item

Example:
1
discount
Object

The discount information

amount
number

The discount amount

Example:
1
percentage
number

The discount percentage

Example:
1
discount_incl_tax
number

The discount amount, including tax

Example:
1

Responses

200 OK
Body
Object
id
string GUID

The service request identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/service_requests/4dc0809f-ed91-4b68-b912-5bd6064d901e/charges HTTP/1.1 

Content-Type: application/json

{
    "account_id": "",
    "discount": {
        "amount": 1,
        "type": "AMOUNT"
    },
    "lines": [
        {
            "product_id": "",
            "quantity": 1,
            "price": 9.99,
            "notes": "",
            "sub_total": 1,
            "discount": {
                "amount": 1,
                "percentage": 1,
                "discount_incl_tax": 1
            }
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Get Service Request Charges
GET /service_requests/{id}/charges

Retrieve the charges associated to a service request

Path variables

id
string GUID required

The service request (identifier) to retrieve charges for

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 OK
Body
Object
account
Object

The account that the charges are associated with

id
string GUID

The account identifier

Example:
8f42c964-7049-0553-06da-04b06e99b3d5
name
string

The account name

Example:
John Doe Account
number
string

The account number

Example:
AR234234
currency_code
string

The currency (code) applied on the charge

Example:
EUR
ad_hoc_discount
Object

The ad hoc discount applied on the charge

amount
number

The ad hoc discount amount

Example:
1
type
string

The ad hoc discount type

Example:
PERCENTAGE
lines
Array

The line items of service request charge

Object
product
Object

The charged product

id
string GUID

The product identifier

Example:
df42c964-7049-0553-06da-04b06e99b3a1
sku
string

The product SKU

Example:
ILC0234
name
string

The product name

Example:
Support Service
quantity
integer

The quantity of the charged product item

Example:
1
price
number

The price of the charged product item

Example:
9.99
tax_model
string

The tax model applied on the product item

Example:
TAX_INCLUSIVE
notes
string

The notes of the charged product item

tax
number

The tax applied on the product item

Example:
1
discount
Object

The discount applied on the product item

discount_amount
number

The discount amount

Example:
1
discount_percentage
number

The discount percentage

Example:
1
discount_incl_tax
integer

The discount including tax

Example:
1
sub_total
integer

The sub total of the charged line

Example:
1
total
number

The charge total amount

Example:
2
net
number

The charge net amount

Example:
1
tax
number

The charge tax amount

Example:
1
discount
Object

The discount applied on the charge

amount
number

The discunt amount

Example:
1
amount_incl_tax
number

The discunt including tax

Example:
1
sub_total
number

The charge sub-total amount

Example:
1
amount_due
number

The charge due amount

Example:
1
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/service_requests/4dc0809f-ed91-4b68-b912-5bd6064d901e/charges HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "account": {
        "id": "8f42c964-7049-0553-06da-04b06e99b3d5",
        "name": "John Doe Account",
        "number": "AR234234"
    },
    "currency_code": "EUR",
    "ad_hoc_discount": {
        "amount": 1,
        "type": "PERCENTAGE"
    },
    "lines": [
        {
            "product": {
                "id": "df42c964-7049-0553-06da-04b06e99b3a1",
                "sku": "ILC0234",
                "name": "Support Service"
            },
            "quantity": 1,
            "price": 9.99,
            "tax_model": "TAX_INCLUSIVE",
            "notes": "",
            "tax": 1,
            "discount": {
                "discount_amount": 1,
                "discount_percentage": 1,
                "discount_incl_tax": 1
            },
            "sub_total": 1
        }
    ],
    "total": 2,
    "net": 1,
    "tax": 1,
    "discount": {
        "amount": 1,
        "amount_incl_tax": 1
    },
    "sub_total": 1,
    "amount_due": 1
}
Subscriptions
POST /subscriptions
PUT /subscriptions/{id}
GET /contacts/{id}/subscriptions
GET /subscriptions
GET /subscriptions/{id}
GET /contacts/{id}/services
POST /subscriptions/{id}/billing
GET /services/{id}/allowance
POST /subscriptions/{id}/services
POST /contacts/{id}/services
PUT /services/{id}
GET /services/{id}/devices
POST /services/{id}/devices
POST /subscriptions/{id}/devices
PUT /subscriptions/{id}/devices/{device_id}
GET /subscriptions/{id}/devices
GET /subscriptions/{id}/allowed_devices
POST /organisations/{id}/services
GET /organisations/{id}/services
Create Subscription.
POST /subscriptions

Creates a new subscription for a Contact or an Organisation. A single subscription can be created per Web API call. The Web API can be used to set up the basic information of the subscription. Services can be added in a different Web API call.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
contact_id
string GUID nullable

Contacts unique identifier. Either a contact or an orgnaisation should be specified

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
organisation_id
string nullable

The organisaton’s unique identifier. This is the organisation that owns the subscription. Either a contact or an orgnaisation should be specified

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
account_id
string GUID required

The unique identifier of the contact’s or the organisation’s account. If not specified, then the primary account is used

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

The type of the event

Enumeration:
ACCOUNT

If one of the contact’s payment methods is specified as the subscription’s payment method as well, then the Account is considered as the funding source. The account is also the default funding source if no payment method is specified.

WALLET

The Wallet is the subscription’s funding source if subscriber specifically states that he/she wants to pay for the services using available wallet funds.

Default:
ACCOUNT
Example:
ACCOUNT
payment_method_id
string

One of the contact’s/organisation’s payment methods that will be used for automatically paying off the subscription. If not specified, then the primary payment method will be used (if any).

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

The subscription’s address which must be one of the contact’s addresses. One of the two parameters must be specified

address_id
string nullable

The unique identifer of the contact’s address

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
use_primary
boolean nullable

If set to true, then the primary address will be selected as the new subscription’s address

Example:
true
billing_day
Object required

The subscription’s billing day which can either be a day of a month (for subscriptions with billing cycles longer than a month) or a week day (for subscriptions with cycles of duration less than a month)/

day_of_month
integer

Day of month

Example:
1
day_of_week
string
Enumeration:
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY
SUNDAY
billing_period
Object required

The billing cycle’s duration

duration
integer

Billing cycle duration

Example:
1
uot
string nullable

Billing cycle unit of time

Enumeration:
DAYS
WEEKS
MONTHS
YEARS
Example:
MONTHS
Examples

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The GUID for the new subscription

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/subscriptions HTTP/1.1 

Content-Type: application/json

{
    "contact_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "organisation_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "account_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "funding_source": "ACCOUNT",
    "payment_method_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "address": {
        "address_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "use_primary": "true"
    },
    "billing_day": {
        "day_of_month": 1,
        "day_of_week": "THURSDAY"
    },
    "billing_period": {
        "duration": 1,
        "uot": "MONTHS"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Subscription
PUT /subscriptions/{id}

Update the Subscription’s billing terms or perform changes for group of services. Services of the same billing period are grouped under the same subscription, so by updating the subscription, these changes are applied to all of its services.

Path variables

id
string GUID required

The subscription (identifier) that will be updated

Example:
ac5401c3-b2e6-2d99-171f-276084d97536

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 change to be performed on the Subscription.

Enumeration:
CHANGE_BILLING_DAY

Change the billing day

CHANGE_PAYMENT_METHOD

Set, remove or change the subscription’s payment method

ACTIVATE

Activate all of the services of the subscription

DEACTIVATE

Deactivate all of the subscription services

CANCEL

Cancel all of the subscription services

REGRET

Regret all of the subscription services

PAUSE

Pause all of the subscription services

RESUME

Resume all of the subscription services. Applicable only when services are Paused.

GRACE_PERIOD

Apply a grace period that prevents deactivations due to debt.

UPDATE

Perform any other updates on generin subscription information.

Example:
CANCEL
category_id
string GUID nullable

The action’s category unique identifier

Example:
ac5401c3-b2e6-2d99-171f-276084d97536
scheduled_date
integer epoch

Schedule the update’s execution on a future date.

Example:
1667981700
use_proposed_date
boolean

In case where business rules dectate an allowed date of execution for the update, set this fields to True so as the update will be automatically performed on the system’s proposed scheduled date (instead of setting the scheduled_date manually).

Default:
false
Example:
true
payment_method_id
string GUID nullable

One of the contact’s/organisation’s payment methods. Required when changing the payment preference of the subscription’s terms

Example:
ac5401c3-b2e6-2d99-171f-276084d97536
billing_day
Object

Required when changing the billing day of the subscription’s terms

day_of_week
string nullable

Applies for weekly subscriptions

Example:
MONDAY
day_of_month
integer nullable

Applies for subscriptions with billing cycles over a month

Example:
15
number_of_days
integer

Required when pausing all of the services of a subscription or when applying a grace period to the subscription

Example:
5
address_id
string

The updated subscription’s address which must be one of the contact’s addresses. Applicable only when using the UPDATE action

Example:
ac5401c3-b2e6-2d99-171f-276084d97536
funding_source
string

The type of the event

Enumeration:
ACCOUNT

If one of the contact’s payment methods is specified as the subscription’s payment method as well, then the Account is considered as the funding source. The account is also the default funding source if no payment method is specified.

WALLET

The Wallet is the subscription’s funding source if subscriber specifically states that he/she wants to pay for the services using available wallet funds.

Default:
ACCOUNT
Example:
ACCOUNT

Responses

200 OK
Body
Object
id
string GUID

The new subscripton action’s unique identifier

Example:
ac5401c3-b2e6-2d99-171f-276084d97536
scheduled_date
integer epoch

A proposed date on which the requested changes can be scheduled (indicates that the update cannot be immediatelly performed). This date is returned when business rules dectate the scheduled date of the update. Use this date on a subsequest call to schedule the required update or in a subsequent call set “use_proposed_date” as True.

Example:
1667981700
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/subscriptions/ac5401c3-b2e6-2d99-171f-276084d97536 HTTP/1.1 

Content-Type: application/json

{
    "action": "CANCEL",
    "category_id": "ac5401c3-b2e6-2d99-171f-276084d97536",
    "scheduled_date": 1667981700,
    "use_proposed_date": true,
    "payment_method_id": "ac5401c3-b2e6-2d99-171f-276084d97536",
    "billing_day": {
        "day_of_week": "MONDAY",
        "day_of_month": 15
    },
    "number_of_days": 5, 
    "address_id": "ac5401c3-b2e6-2d99-171f-276084d97536",
    "funding_source": "ACCOUNT"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "ac5401c3-b2e6-2d99-171f-276084d97536",
    "scheduled_date": 1667981700
}
List Contact Subscriptions
GET /contacts/{id}/subscriptions

Returns a list of subscriptions owned by the contact.

Path variables

id
string required

The contact’s unique identifier

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
include_only_terminated
boolean optional

By default, Churned (cancelled) subscriptions are excluded. Use this parameter to get a list of Churned Subscriptions only.

include_billing_info
boolean optional

By default, billing information is not returned

Default:
false
include_terms
string optional

By default billing terms are not returned

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

Filter based on the subscription’s state

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

The unique identifier of the subscription

Example:
0df9936c-7d5f-a878-4c05-9b942aa14295
code
string

The subscription’s code.

Example:
4347869878000989
state
string

The type of the event

Enumeration:
ACTIVE

The Subscription has at least one service in Effective state

INACTIVE

The Subscription has one or more non-churned services but none of them are active (might be in Not Effective, Paused or Draft state)

CHURNED

All of the Subscription’s services are churned (either Cancelled or Regretted)

Example:
ACTIVE
active_services
integer

Number of Effective services. Recurring expenses are excluded. Service in Trial are excluded.

Example:
3
inactive_services
integer

Number of Inactive services. Includes Not Effective and Paused services. Recurring expenses excluded

Example:
2
draft_services
string

Number of Draft services (services ordered but never activated)

Example:
0
trial_services
integer

Number of services which might be active on the subscription, but they are still in trial period. These services are not included in the number of active (paid) services of the subscription

Example:
1
number_of_devices
integer

Number of devices

Example:
1
first_activation_date
integer

The date on which the subscription was activated for the first time

Example:
1620981309
usage_blocked
boolean

Determines whether usage is allowed to be consumed as part of at least one of the active services of the subscription. Usage might be allowed by one of the services, but at the time the Web API is triggered, the customer is blocked for consuming usage

Default:
false
Example:
true
billing_info
Object

Detailed billing information of the subscription’s services.

billed_up_date
integer

The date until which the subscription’s services are billed

Example:
1620981311
next_billing_date
integer

The next date on which the subscription will be billed

Example:
1620981311
next_payment_date
integer

The date on which the next payment is expected. Usually it’s the next billing date unless the subscriber’s payment terms allow them a period to pay off the subscription’s bill

Example:
1620981311
terms
Object

The subscription’s billing terms

billing_period
Object

The subscription’s billing cycle duration

duration
integer

The billing cycle’s duration

Example:
1
uot
string

The billing cycle’s unit of time

Example:
MONTHS
billing_day
Object

The day of month/week until which the subscripton’s services will be billed. Either a day of month or day of week is returned, depnding on the subscription’s billing cycle (if it is less than a month, then a day of week is returned)

day_of_month
integer

Day of month

Example:
1
day_of_week
string

Day of week

Enumeration:
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY
SUNDAY
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/{id}/subscriptions HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "0df9936c-7d5f-a878-4c05-9b942aa14295",
            "code": "4347869878000989",
            "state": "ACTIVE",
            "active_services": 3,
            "inactive_services": 2,
            "draft_services": "0",
            "trial_services": 1,
            "number_of_devices": 1,
            "first_activation_date": 1620981309,
            "usage_blocked": "true",
            "billing_info": {
                "billed_up_date": 1620981311,
                "next_billing_date": 1620981311,
                "next_payment_date": 1620981311
            },
            "terms": {
                "billing_period": {
                    "duration": 1,
                    "uot": "MONTHS"
                },
                "billing_day": {
                    "day_of_month": 1,
                    "day_of_week": "SATURDAY"
                }
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
List Subscriptions
GET /subscriptions

Returns a list of subscriptions

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
include_only_terminated
boolean optional

By default, Churned subscriptions are excluded. Use this parameter to get a list of Churned Subscriptions only.

first_activation_date
string optional

The date on which the subscriptions was activated for the first time. Each option includes the field name, the operator and the date field in epoch format. Use up to two of the following options based on the required search:

Enumeration:
first_activation_date.[gte]
first_activation_date.[gt]
first_activation_date.[lte]
first_activation_date.[lt]
expires_on
integer optional

The date on which one of the subscription’s services gets expired

next_renewal
integer optional

The date on which one of the subscription’s services will be renewed

contract_ends
integer optional

The date on which the contract of one of the subscription’s services ends

contact_id
string optional

The contact who owns the subscription

organisation_id
string optional

The organisation that owns the subscription

account_id
string optional

The account of the contact who ows the subscription

device_id
string optional

The device thatis provisioned by the subscriptions to be retrieved

include_billing_info
boolean optional

By default, the subscription’s billing details are not returned. Set the value to True to get the basic billing information

Default:
false
include_terms
boolean optional

By default, the subscription’s billing terms are not returned. Set the value to True to get the subscription’s billing day and period

Default:
false
search_value
string optional

Search for a subscription based on its code

funding_source
string optional

the subscription’s funding source.

Enumeration:
ACCOUNT
WALLET
state
array of Subscription State (Enum) optional

The state of the subscription

Collection format: csv
service_id
string optional

Termed service’s product identifier. Subscription must have such a non-churned termed service

include_mrr
boolean optional

Defines whether MRR metrics should be returned or not

Example:
true

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

Subscription identifier

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

Subscription’s code. If not specified on creating the subscirpiton, then a unique and random 16-digit code is assigned as the subscription’s code.

Example:
5545458883212050
state
string

The type of the event

Enumeration:
ACTIVE

The Subscription has at least one service in Effective state

INACTIVE

The Subscription has one or more non-churned services but none of them are active (might be in Not Effective, Paused or Draft state)

CHURNED

All of the Subscription’s services are churned (either Cancelled or Regretted)

Example:
ACTIVE
first_activation_date
integer

Date on which the subscirption was activated for the first time (when the first service was activated)

Example:
1620984119
active_services
integer

Number of non-churned services (in any state other than Cancelled, regretted or Swapped). Recurring expenses are excluded. Services in Trial are excluded

Example:
3
inactive_services
string

Number of inactive services

Example:
1
draft_services
string

Number of Draft services

Example:
1
trial_services
integer

Number of services still in trial period. Trial services might be in Effective state but they are not considered in the number of active services

Example:
1
number_of_devices
integer

Number of devices on which all of the subscription’s non-churned services are enabled on.

Example:
3
organisation
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
contact
Object

The contact who owns the subscription

id
string

Contact identifier

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

Contact name

Example:
John Smith
code
string

Contact code

Example:
1234534333
billing_info
Object

Detailed billing information for the Subscription

billed_up_date
integer

The date until which the subscription’s services are billed

Example:
1620981311
next_billing_date
integer

The next date on which the subscription will be billed

Example:
1620981311
next_payment_date
integer

The date on which the next payment is expected. Usually it’s the next billing date unless the subscriber’s payment terms allow them a period to pay off the subscription’s bill

Example:
1620981311
terms
Object

The subscription’s billing terms

billing_period
Object

The subscription’s billing cycle duration

duration
integer

Duration

Example:
1
uot
string

Duraiotion unit of time

Example:
MONTHS
billing_day
Object

The day of month/week until which the subscripton’s services will be billed. Either a day of month or day of week is returned, depnding on the subscription’s billing cycle (if it is less than a month, then a day of week is returned)

day_of_month
integer

Day of Month

Example:
1
day_of_week
string

Day of week

Example:
MONDAY
usage_blocked
boolean

Determines whether usage is allowed to be consumed as part of at least one of the active services of the subscription. Usage might be allowed by one of the services, but at the time the Web API is triggered, the customer is blocked for consuming usage

Default:
false
Example:
false
mrr
Array

The subscription MRR metrics

Object
total
number

The subscription’s total MRR

Example:
12.57
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/subscriptions HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "code": "5545458883212050",
            "state": "ACTIVE",
            "first_activation_date": 1620984119,
            "active_services": 3,
            "inactive_services": "1",
            "draft_services": "1",
            "trial_services": 1,
            "number_of_devices": 3,
            "organisation": {
                "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                "name": "Bravo Coffee"
            },
            "contact": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "John Smith",
                "code": "1234534333"
            },
            "billing_info": {
                "billed_up_date": 1620981311,
                "next_billing_date": 1620981311,
                "next_payment_date": 1620981311
            },
            "terms": {
                "billing_period": {
                    "duration": 1,
                    "uot": "MONTHS"
                },
                "billing_day": {
                    "day_of_month": 1,
                    "day_of_week": "MONDAY"
                }
            },
            "usage_blocked": "false"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Subscription
GET /subscriptions/{id}

Returns detailed inormation for a single subscription.

Path variables

id
string required

The unique identifier of the subscription

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

Subscription identifier

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

Subscription’s code. If not specified on creating the subscirpiton, then a unique and random 16-digit code is assigned as the subscription’s code.

Example:
9955454333211380
state
string

The type of the event

Enumeration:
ACTIVE

The Subscription has at least one service in Effective state

INACTIVE

The Subscription has one or more non-churned services but none of them are active (might be in Not Effective, Paused or Draft state)

CHURNED

All of the Subscription’s services are churned (either Cancelled or Regretted)

Example:
ACTIVE
first_activation_date
integer

Date on which the subscirpiton was activated for the first time (when the first service was activated)

Example:
12345567
cancellation_date
integer

Date on which the last non-churned service of the subscription was removed (either cancelled or regretted). That removal also cause the Subscription to move into Churned state.

Example:
12345678
active_services
integer

Number of Effective services. Recurring expenses And Trial services are excluded

Example:
3
recurring_charges
integer

Number of recurring charged. These charges are considered as services, but because of their Expense classification, they are not includd in the list of services that the contact subscribed for.

Example:
0
trial_services
integer

Number of services still in trial period. Trial services might be in Effective state but they are not considered in the number of active services

Example:
1
number_of_devices
integer

Number of devices on which all of the subscription’s non-churned services are enabled on.

Example:
1
in_grace_period
boolean

Determines whether the subscirption is in Grace Period at the time the subscription is accessed

Example:
true
usage_blocked
boolean

Determines whether usage is allowed to be consumed as part of at least one of the active services of the subscription. Usage might be allowed by one of the services, but at the time the Web API is triggered, the customer is blocked for consuming usage

Default:
false
Example:
true
billing_info
Object

Detailed billing information of the subscription

billed_up_date
integer

Date up until which the subscirption is billed

Example:
1620981311
next_billing_date
integer

The next date on which the subscription will be billed

Example:
1620981311
next_payment_date
integer

the date on which the subscriber is expected to pay

Example:
1620981311
organisation
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
contact
Object

contact who owns the subscription

id
string

Contact idnetifier

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

Contact name

Example:
John Smith
code
string

Contact code

Example:
12345
account
Object

The account of the Subscription. Account might bbe owned by a Contact or an Organisation

id
string

Account identifier

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

Account number

Example:
AR000001
name
string

Account Name

Example:
AR000001 John Smith
terms
Object

Subscription’s billing terms

billing_period
Object

How often the subscirption is billed

duration
integer

Billing cycle duration

Example:
1
uot
string

Duration unit of time

Example:
MONTHS
billing_day
Object

On which day of month (for subscriptions with cycles longer than a month) or day of the week (for subscriptions shorter than a month)

day_of_month
integer

Day of month

Example:
1
day_of_week
string

Day of week

Example:
MONDAY
payment_method
Object

The payment method used to automatically pay off the subscription’s billing. This is one of the contact’s/organisation’s online payment methods.

id
string

Contact/Organisation Payment Method identifier

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

Payment method type

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
Example:
CARD
idnetifier
string

Basin information fo the payment method to clearly identify the payment method

Example:
Visa ***** 1234
funding_source
string

The type of the event

Enumeration:
ACCOUNT

If one of the contact’s payment methods is specified as the subscription’s payment method as well, then the Account is considered as the funding source. The account is also the default funding source if no payment method is specified.

WALLET

The Wallet is the subscription’s funding source if subscriber specifically states that he/she wants to pay for the services using available wallet funds.

Default:
ACCOUNT
Example:
ACCOUNT
address
Object
id
string GUID

The address identifier

Example:
0df9936c-7d5f-a878-4c05-9b942aa14295
type
string

The address type. Many of the same type.

Enumeration:
HOME
BUSINESS
ALTERNATIVE
name
string

A short address name so that it’s easily recognised in a list

Example:
Mum's house
is_primary
boolean

Defines whether the address is the primary one

Example:
true
address_line_1
string

The address line 1

Example:
21 Elia Papakyriakou
address_line_2
string

The address line 2

Example:
7 Stars Tower
state_province_county
string

The address state/province/county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country 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
grace_periods
Array

List of grace periods applied for this subscription

Object
start_date
integer

Date on which Grace period was applied

end_date
integer

Date until which he subscirption was in Grace period

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/subscriptions/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "code": "9955454333211380",
    "state": "ACTIVE",
    "first_activation_date": 12345567,
    "cancellation_date": 12345678,
    "active_services": 3,
    "recurring_charges": 1,
    "trial_services": 1,
    "number_of_devices": 1,
    "in_grace_period": "true",
    "usage_blocked": "true",
    "billing_info": {
        "billed_up_date": 1620981311,
        "next_billing_date": 1620981311,
        "next_payment_date": 1620981311
    },
    "organisation": {
        "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
        "name": "Bravo Coffee"
    },
    "contact": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "name": "John Smith",
        "code": "12345"
    },
    "account": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "number": "AR000001",
        "name": "AR000001 John Smith"
    },
    "terms": {
        "billing_period": {
            "duration": 1,
            "uot": "MONTHS"
        },
        "billing_day": {
            "day_of_month": 1,
            "day_of_week": "MONDAY"
        },
        "payment_method": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "type": "CARD",
            "idnetifier": "Visa ***** 1234"
        },
        "funding_source": "ACCOUNT"
    },
    "address": {
        "id": "0df9936c-7d5f-a878-4c05-9b942aa14295",
        "type": "HOME",
        "name": "Mum's house",
        "is_primary": true,
        "address_line_1": "21 Elia Papakyriakou",
        "address_line_2": "7 Stars Tower",
        "state_province_county": "Egkomi",
        "town_city": "Nicosia",
        "postal_code": "2415",
        "country_code": "CYP",
        "lat": 35.157115,
        "lon": 33.313719,
        "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
    },
    "grace_periods": [
        {
            "start_date": 1,
            "end_date": 1
        }
    ]
}
List Contact Services
GET /contacts/{id}/services

Returns a list of services to which a contact is subscribed to. The list includes service across all subscriptions, of different billing cycles.

Path variables

id
string required

The contact’s unique identifier

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

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
include_only_terminated
boolean optional

By default, churned (terminated) are excluded. Use this parameter to get a list of churned services only.

classification
string optional

Product classification of the subscription services to be retrieved. If not specified, all services are returned

Enumeration:
ONE_TIME
TERMED
EXPENSE
include_subscription
boolean optional

Determine whether subscription and its billing terms will additionally be inclded in the response. Defaults to false

Default:
false
Example:
true
subscription_id
string optional

Unique identifier of the subscription that groups services by their billing cycle

in_trial
boolean optional

Returns services in trial

in_contract
boolean optional

Returns services currenlty in contract period

scheduled_actions
boolean optional

Returns services that have a scheduled action pending

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

Subscription servcie identifier

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

The type of the event

Enumeration:
DRAFT
EFFECTIVE
NOT_EFFECTIVE
PAUSED
CANCELLED
REGRETTED
Example:
EFFECTIVE
added_on
integer

Date added to the subscription

Example:
1625555027
first_activated_on
integer

First activation date

Example:
1625555027
removed_on
integer

Date removed from the subscription (applies for churned services)

Example:
1625555027
is_recurring_charge
boolean

Applicable for expense services to indicate whether they are charged on a recurring basis

Example:
true
has_allowance
boolean

Shows whether the service allows subscribers to consume usage

Example:
true
scheduled_actions
boolean

Shows whether there are pending scheduled actions for the service

Example:
true
product
Object

Service product information

id
string

Product identifier

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

Product SKU

Example:
TV001
name
string

Product name

Example:
Films
classification
string

The service product’s classification

Enumeration:
TERMED
ONE_TIME
EXPENSE
type_composition
string
Enumeration:
FLAT
FIXED_BUNDLE
FLEXIBLE_BUNDLE
COMPOSITE
Example:
FLAT
price
Object

Service pricing information

id
string

Price identifier

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

Price

Example:
9.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
tax_model
string

Taxation model

Example:
TAX_INCLUSIVE
billing_period
Object

How often the service is billed

duration
integer

Billing cycle duration

Example:
1
uot
string

Duration unit of time

Example:
MONTHS
billing
Object

Latest billing information of the service

billed_from
integer

Latest billed from date

Example:
1625555027
billed_to
integer

Billed up to date

Example:
1625555027
terms
Object

Services’s price terms

billing_model
string

Billing model

Enumeration:
PRE_BILL
POST_BILL
auto_renew
boolean

Auto-renewed or not

Example:
true
in_contract
boolean

Service in contract or not

Example:
true
quantity
integer

Service quantity

Example:
1
contract_period
Object

Contract period details

duration
integer

How long the service will be/was in contract

Example:
18
uot
string

Contract period unit of time

Example:
MONTHS
start_date
integer

Contract period start date

Example:
1625555027
end_date
integer

Contract period end date

Example:
1625555027
termed_period
Object

Service’s termed period

billing_cycles
integer

How many billing cycles each termed period covers

Example:
1
start_date
integer

Latest termed period start date

Example:
1625555027
end_date
integer

Termed period end date

Example:
1625555027
trial_period
Object

Service’s trial period details

trial_state
string

Service currently in trial or not

Example:
IN_TRIAL
start_date
integer

Trial period start date

Example:
1625555027
end_date
integer

Tiral period end date

Example:
1625555027
duration
integer

Trial period duration

Example:
7
uot
string

Trial period unit of time

Example:
DAYS
paused_period
Object

Applicable while the service is paused

start_date
integer

Paused period start date

Example:
1625555027
end_date
integer

Paused perido end date

Example:
1625555027
bundled_service
Object

Applicable when the service was added as part of a bundled service.

id
string

The bundle service’s identifier

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

Bundle service product

id
string

Product identifier

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

Product SKU

Example:
GOLD
name
string

Product name

Example:
Gold Package
components
Array

Applicable for bundle services and returns a list of component services.

Object
id
string

Component service identifier

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

Component service added date

Example:
1625555027
first_activated_on
integer

Componenent service first activation date

Example:
1625555027
in_contract
boolean

Component service in contract or not

Example:
true
state
string

The type of the event

Enumeration:
DRAFT
EFFECTIVE
NOT_EFFECTIVE
PAUSED
CANCELLED
REGRETTED
Example:
EFFECTIVE
product
Object

Component service product

id
string

Product identifier

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

Product SKU

Example:
FILMS
name
string

Product name

Example:
Films
price
Object

The component service’s price

price
number

Component service price

Example:
9.99
currency_code
string
Example:
EUR
subscription
Object

The subscription of the service

id
string

Subscriptionidentifier

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

Subscription code

Example:
60012321123
terms
Object

Subscription pricing terms

funding_source
string

Subscription’s funding source

Enumeration:
ACCOUNT
WALLET
Example:
ACCOUNT
billing_period
Object

How often services are billed

duration
integer

Billing cycle duration

Example:
1
uot
string

Billing cycle unit of time

Example:
MONTHS
billing_day
Object

Billing day

day_of_month
integer

Day of month specified for subscriptions with cycles longer than a month

Example:
1
day_of_week
string

Day of week specified for subscriptions with cycles shorter than a month

Example:
WEDNESDAY
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
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/4dc0809f-ed91-4b68-b912-5bd6064d901e/services HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "state": "EFFECTIVE",
            "added_on": 1625555027,
            "first_activated_on": 1625555027,
            "removed_on": 1625555027,
            "is_recurring_charge": true,
            "has_allowance": "true",
            "scheduled_actions": "true",
            "product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "TV001",
                "name": "Films",
                "classification": "TERMED",
                "type_composition": "FLAT"
            },
            "price": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "price": 9.99,
                "currency_code": "EUR",
                "tax_model": "TAX_INCLUSIVE",
                "billing_period": {
                    "duration": 1,
                    "uot": "MONTHS"
                }
            },
            "billing": {
                "billed_from": 1625555027,
                "billed_to": 1625555027
            },
            "terms": {
                "billing_model": "POST_BILL",
                "auto_renew": true,
                "in_contract": true,
                "quantity": 1,
                "contract_period": {
                    "duration": 18,
                    "uot": "MONTHS",
                    "start_date": 1625555027,
                    "end_date": 1625555027
                },
                "termed_period": {
                    "billing_cycles": 1,
                    "start_date": 1625555027,
                    "end_date": 1625555027
                }
            },
            "trial_period": {
                "trial_state": "IN_TRIAL",
                "start_date": 1625555027,
                "end_date": 1625555027,
                "duration": 7,
                "uot": "DAYS"
            },
            "paused_period": {
                "start_date": 1625555027,
                "end_date": 1625555027
            },
            "bundled_service": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "product": {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "sku": "GOLD",
                    "name": "Gold Package"
                }
            },
            "components": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "added_on": 1625555027,
                    "first_activated_on": 1625555027,
                    "in_contract": true,
                    "state": "EFFECTIVE",
                    "product": {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "sku": "FILMS",
                        "name": "Films"
                    },
                    "price": {
                        "price": 9.99,
                        "currency_code": "EUR"
                    }
                }
            ],
            "subscription": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "code": "60012321123",
                "terms": {
                    "funding_source": "ACCOUNT",
                    "billing_period": {
                        "duration": 1,
                        "uot": "MONTHS"
                    },
                    "billing_day": {
                        "day_of_month": 1,
                        "day_of_week": "WEDNESDAY"
                    },
                    "payment_method": {
                        "type": "ELECTRONIC_TRANSFER",
                        "identity": {
                            "id": "",
                            "identifier": "Visa *****1234 03/25"
                        }
                    }
                }
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Bill Upcoming Billing Cycles
POST /subscriptions/{id}/billing

Bills in advance a subscription for a number of upcoming billig cycles. Any scheduled changes planned within this period will be taken into account. In cases of exceeded credit limit, billing is successful only if it can also be paid using an online paymnt method or the CRM Wallet accordinly. Subscription services billed on a post-bill basis and usage service can never be billed in advance.

Path variables

id
string required

The subscription’s unique identifier

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

Request body

Object
upcoming_billing_cycles
integer required nullable

Number of billing cycles to bill in advance

Min: 1
Max: 24
Default:
1
Example:
3
bill_up_to_date
integer required nullable

The date up until which the subscirption will be billed. This date must be one of the future billing cycles’ start date i.e. it must be have the subscription’s billing date. This date however must be set within the next 24 months.

Example:
1689948097

Responses

201 Created
Body
Object
invoice_id
string

Invoice unique identifier

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

Credit Note unique identifier

Example:
5009809f-ed91-acb8-b912-5bd6064ed087bf
201 Created
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
POST https://sandbox.crm.com/backoffice/v2/subscriptions/4dc0809f-ed91-4b68-b912-5bd6064d901e/billing HTTP/1.1 

Content-Type: application/json

{
    "upcoming_billing_cycles": 3,
    "bill_up_to_date": 1689948097
}
Get Service Allowance
GET /services/{id}/allowance

Returns the usage allowance provided through a termed/one-time service as well as the service’s remaining usage.

Path variables

id
string required

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

The service’s accumulated cash allowance, i.e. how much can be consumed among all products which are consumed through the service. This allowance is defined only in amount of money and it’s evaluated based on the usage’s rating (how much it costs).

allowed
Object

How much can be consumed

per_transaction
number

Maximum allowed cash amount every time the service is consumed.

Example:
9.99
per_day
number

Maximum allowed cash amount among all transactions performed within the calendar day.

Example:
19.99
per_billing_cycle
number

Maximum allowed cash amount among all transactions performed within the service’s billing cycle.

Example:
59.99
remaining
Object

Remaining allowance in amount of money

per_transaction
number

How much money can be spent per transaction

Example:
1.99
per_day
number

How much usage, in terms of money, can be spent within the day

Example:
9.99
per_billing_cycle
number

How much usage, in terms of money, can be spent for the current billing cycle of the subscription service

Example:
19.99
products_allowance
Array

List of items which can be consumed through the subscription service. This set of items includes usage and non-traceable physical goods. If nothing is specified, then usage is allowed among all usage services/non-traceable physical goods that the business is selling.

Object
item_type
string

Product setting. Allowa usage to either a specific product or to products of a specific type.

Enumeration:
PRODUCT
TYPE
Example:
PRODUCT
item_id
string

The idnetifier of the item (the product or the product type’s)

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

The product name or product type name depending on item_type

measurement_unit
Object

Measurement unit. Applicable only when a specific usage product is included in the allowance.

id
string

Measurement unit identifier

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

Measurement unit name

Example:
Gigabytes
display_name
string

Measurement unit display name

Example:
GB
cash_amounts
Object

How much rated usage can be consumed

allowed
Object

The allowance’s allowed cash amount

per_transaction
number

Maximum cash amount to be used per transaction

Example:
9.99
per_day
number

Maximumu cash amount to be used among all transactions of a calendar day

Example:
19.99
per_billing_cycle
number

Maximum cash amount to be used among all transactions performed within the service’s billing cycle.

Example:
59.99
remaining
Object

Remaining rated usage allowance

per_transaction
number

Remaining usage in the next transaction

Example:
5.99
per_day
number

Remaining rated usage can be consumed within the day

Example:
19.99
per_billing_cycle
number

Remaining rated usage can be consumed within the service’s billing cycle

Example:
59.99
usage_amounts
Object

Actual allowed and remaining usage (based on measurement units)

allowed
Object

Maximum allowed usage that can be consumed

per_transaction
number

Maximum usage to be consumed per transaction

Example:
9.99
per_day
number

Maximum usage to be consumed per calendar day

Example:
19.99
per_billing_cycle
number

Maximum usage to be consumed during the service’s billing cycle

Example:
59.99
remaining
Object

Remaining usage

per_transaction
number

Remaining usage to be consumed in the next transaction

Example:
9.99
per_day
number

Remaining usage that can be consumed within the rest of the day

Example:
19.99
per_billing_cycle
number

Remaining usage that can be consumed within the rest of the service’s billing cycle.

Example:
59.99
Example 1
GET https://sandbox.crm.com/backoffice/v2/services/{id}/allowance HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "cash_amounts": {
        "allowed": {
            "per_transaction": 9.99,
            "per_day": 19.99,
            "per_billing_cycle": 59.99
        },
        "remaining": {
            "per_transaction": 1.99,
            "per_day": 9.99,
            "per_billing_cycle": 19.99
        }
    },
    "products_allowance": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "",
            "measurement_unit": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Gigabytes",
                "display_name": "GB"
            },
            "cash_amounts": {
                "allowed": {
                    "per_transaction": 9.99,
                    "per_day": 19.99,
                    "per_billing_cycle": 59.99
                },
                "remaining": {
                    "per_transaction": 5.99,
                    "per_day": 19.99,
                    "per_billing_cycle": 59.99
                }
            },
            "usage_amounts": {
                "allowed": {
                    "per_transaction": 9.99,
                    "per_day": 19.99,
                    "per_billing_cycle": 59.99
                },
                "remaining": {
                    "per_transaction": 9.99,
                    "per_day": 19.99,
                    "per_billing_cycle": 59.99
                }
            }
        }
    ]
}
Add Subscription Service
POST /subscriptions/{id}/services

Adds a new service on a subscription. A single service can be added within a single Web API call. Subscription must exist in advance in order to successfully amend it by adding a new service. Adding a service to a subscription will trigger billing as well which results in billing the new service based on the subscription’s current billing cycle.

Path variables

id
string required

The subscription’s unique identifier

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

Request body

Object
product_id
string required

The service product identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
price_terms_id
string required

The service’s price. The selected price terms must have the same billing cycle as the rest of the services of the subscription, otherwise the additiong of the new service fails.

Example:
edc0809f-ed91-4b68-b912-5bd6064d901e
quantity
integer

The new service’s quantity. If not specified, then it defaults to 1.

Default:
1
Example:
5
scheduled_date
integer

Schedules the addition of the service. The scheduled dat emust be after the current date.

Example:
1621236949
components
Array

Applicable and required when adding a service of flexible bundle composition. In that case, at least one component service must be specified, and that product must follow the flexible bundle’s allowed composition.

Unique items: YES
Object
product_id
string required

The component product’s identifier. Only termed service products are allowed to be added as components and these product must be includd on the flexible bundle’s composition.

Example:
2dc0809f-ed91-4b68-b912-5bd6064d901e
price_terms_id
string required

The service’s price terms. The service price terms must follow the bundle services (and subsequently the subscription’s) billing cycle.

Example:
32c0809f-ed91-4b68-b912-5bd6064d901e
devices
Array

List of devices to which the service should be enabled on. Applicable only when the service is provisionable. List of allowed devices includes all devices of the contact (they might already exist on the subscription or not) that are provisioned by the same provider as the service. If nothing is specified, then the service is not enabled on any device

Object
id
string

Device unique identifier

Example:
edc0809f-ed91-4b68-b912-5bd6064d901e
pass
Object

A pass that unlocks a promotion for the new service

code
string required

Pass’s unique code

Example:
HPX68933209
otp
string required

Pass’s OTP

Example:
456079

Responses

200 OK
Body
Object
id
string

The subscription action’s identifier

Example:
edc0809f-ed91-4b68-b912-5bd6064d901e
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/subscriptions/4dc0809f-ed91-4b68-b912-5bd6064d901e/services HTTP/1.1 

Content-Type: application/json

{
    "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "price_terms_id": "edc0809f-ed91-4b68-b912-5bd6064d901e",
    "quantity": 5,
    "scheduled_date": 1621236949,
    "components": [
        {
            "product_id": "2dc0809f-ed91-4b68-b912-5bd6064d901e",
            "price_terms_id": "32c0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "devices": [
        {
            "id": "edc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "pass": {
        "code": "HPX68933209",
        "otp": "456079"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "edc0809f-ed91-4b68-b912-5bd6064d901e"
}
Add Service to Contact
POST /contacts/{id}/services

Adds a new service for a contact. A single service can be added per Web API call. In cases where the contact does not own a subscription in the same billing cycle as the new service’s cycle, then a new subscirption is also created with this Web API call. Otherwise, the existing subscription is amended with the new service and this new service’s billing cycle is adjusted to the subscription’s.

Path variables

id
string required

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

Service product identifier. Only Termed and One-time services can be added.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
price_terms_id
string required

The new service’s price which also defines its billing cycle

Example:
edc0809f-ed91-4b68-b912-5bd6064d901e
quantity
integer

The service quantity, default to 1 if not specified

Example:
5
scheduled_date
integer

Schedule the addition of the service. Scheduled date must be set in the future.

Example:
1621236954
components
Array

Applicable when adding a termed service with a flex bundle composition. In that case, at least one item must be specified.

Unique items: YES
Object
product_id
string

The component service product identifier. Only termed services can be added and as long as they meet the bundle service’s allowed composition

Example:
2dc0809f-ed91-4b68-b912-5bd6064d901e
price_terms_id
string

The component’s price terms. The price’s billing cycle must be the same as the bundle service’s cycle.

Example:
32c0809f-ed91-4b68-b912-5bd6064d901e
devices
Array

List of device to which the new service can be enabled on.

Object
id
string

Device identifier.

Example:
edc0809f-ed91-4b68-b912-5bd6064d901e
pass
Object

A pass that unlocks a promotion for the new service

code
string required

Pass code

Example:
HPX68933209
otp
string

Pass OTP to verify the pass

Example:
456079

Responses

200 OK
Body
Array
Object
id
string

The unique identifier of the new subscription action

Example:
3ac0809f-ed91-4b68-b912-5bd6064d901f
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/{id}/services HTTP/1.1 

Content-Type: application/json

{
    "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "price_terms_id": "edc0809f-ed91-4b68-b912-5bd6064d901e",
    "quantity": 5,
    "scheduled_date": 1621236954,
    "components": [
        {
            "product_id": "2dc0809f-ed91-4b68-b912-5bd6064d901e",
            "price_terms_id": "32c0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "devices": [
        {
            "id": "edc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "pass": {
        "code": "HPX68933209",
        "otp": "456079"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "id": "3ac0809f-ed91-4b68-b912-5bd6064d901f"
    }
]
Update Service
PUT /services/{id}

Updates a single suscsription service. A service might change due to various reasons and multiple changes can be logged per Web API log:

  • Change the service’s state
  • Change the service with another service
  • Change the service’s terms
  • Change the service’s quantity
  • Change a flex service’s components

Path variables

id
string required

The subscription service identifier

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

Request body

Object
action
string required

The type of the event

Enumeration:
ACTIVATE

Activate the service

DEACTIVATE

Deactivate the service

CANCEL

Cancel the service

REGRET

Regret the service

PAUSE

Pause the service

RESUME

Resume a paused service

CHANGE

Change the service

Example:
ACTIVATE
category_id
string

The action’s category unique identifier

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

The date on which the action is scheduled to be executed. If not specified, the action is immediatelly executed.

Example:
1656962736
use_proposed_date
boolean

Applicable when business rules enforce an action to be performed on a future scheduled date. Set this parameter to True to indirectly use the business rules’ prposed scheduled date without explicitly defining it

Example:
true
number_of_days
integer

Applicable and required when pausing a service. Defines the paused period’s duration in days.

Example:
5
quantity
integer

Applicable when changing the terms of a service OR changing/swapping services

Example:
5
renewal_opt_in
boolean

If set to True, then contact opts-in to auto-renewals, otherwsie, when set to False, the contact opts out and the service will get expired at the end of the termed period.

Example:
true
price_terms_id
string

Applicable when changing a service’s price.

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

Extends the service’s contract period

period
integer required

The period’s duration

Example:
1
period_uot
string required

The period’s unit of time

Enumeration:
DAYS
WEEKS
MONTHS
Example:
MONTHS
change_to_service
Object

Applicable and required when upgrading or downgrading a service

product_id
string required

The new service product to which the service will be changed with

price_terms_id
string

Required when the new service has multiple price terms. If the new service product has a single price, then it will be used by default

components
Object

Applicable when amending a service bundle. At least one components to be added or to be removed must be specified

added
Array nullable

Component services to be added

Unique items: YES
Object
product_id
string

Component service product identifier. This product must be a termed service and must also meet the flex bundle’s composition settings.

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

The price terms of the product to be added as a component. Required only when the component has multiple price terms and if its price is not included in the bundles price. If a single price exist, then it is used by default. If a service has no prices at all, then the service is added on a subscription with no billing information/terms

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
removed
Array nullable

Component services to be removed

Min items: 0
Unique items: YES
Object
id
string

Service identifier of the component to be removed

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
locations
Array nullable

A list of contact addresses that represents the actual locations at which the service is being delivered/used. Locations are represented by the contact’s addresses

Min items: 0
Unique items: YES
Object
id
string

The contact address identifier

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

Responses

200 OK
Body
Object
id
string

The new subscripton action’s unique identifier. Returned only when the action is successfully logged to be executed immediatelly or as a scheduled one.

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

A proposed date on which the requested changes can be scheduled to be executed. If a date is returned, then no action is logged yet and it has to be scheduled. A proposed scheduled date is returned when business rules do not allow the action’s immediate execution.

Example:
1656962736
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/services/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "action": "ACTIVATE",
    "category_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "scheduled_date": 1656962736,
    "use_proposed_date": true,
    "number_of_days": 5,
    "quantity": 5,
    "renewal_opt_in": "true",
    "price_terms_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "extend_contract": {
        "period": 1,
        "period_uot": "MONTHS"
    },
    "change_to_service": {
        "product_id": "",
        "price_terms_id": ""
    },
    "components": {
        "added": [
            {
                "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "price_terms_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
            }
        ],
        "removed": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
            }
        ]
    },
    "locations": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "proposed_date": 1656962736
}
List Service Devices
GET /services/{id}/devices

A service can be enabled on multiple devices. This Web API returns a list of devices on which the specified service is already enabled on and any other devices owned/rented by the contact on which the service could be enabled on.

Path variables

id
string required

The service’s unique identifier

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

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
state
integer

Defines whether the service is already enabled on the device or not. If disabled, then the service can be enabled on the related device

Enumeration:
ENABLED

Service connected to the device

DISABLED

Service not connected to the device.

Example:
ENABLED
code
string

Code that uniquely identifies the distribution of the service to a device. This is a random and unique 16-digit code

Example:
4345665678888897
device
Object

The device on which the service is already or could be enabled on. This device is owned or it was rented by the contact.

id
string

The unique identifier of the device

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

The device’s serial number

Example:
STB0001023222
eletronic_id
string

The device’s electronic ID

product
Object

The product of the device

id
string

The unique dentifier of the product

Example:
2dc0809f-ed91-4b68-b912-5bd6064d901e
sku
string

The product’s SKU

Example:
STB001
name
string

The product’s name

Example:
Set-Top-Box
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/services/4dc0809f-ed91-4b68-b912-5bd6064d901e/devices HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "state": "ENABLED",
            "code": "4345665678888897",
            "device": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "serial_number": "STB0001023222",
                "eletronic_id": "",
                "product": {
                    "id": "2dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "sku": "STB001",
                    "name": "Set-Top-Box"
                }
            }
        }
    ]
}
Set Up Service Devices
POST /services/{id}/devices

Manage the device(s) of a service. A service can be enabled to one or more devices, so this Web API can be used to enable the service on new devices and/or disable it. Use “List Service Devices” Web API to see a list of devices to which the service can be enabled on.

Path variables

id
string required

The subscription’s unique identifier

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

Request body

Array
Object
action
string required

Define whether the service will be enabled or disabled on the specified device

Enumeration:
ENABLE
DISABLE
Example:
ENABLE
device_id
string required

The unique identifier of the device

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

Responses

200 OK
Body
Object
id
string

The unique identiier of the subscription action

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/services/4dc0809f-ed91-4b68-b912-5bd6064d901e/devices HTTP/1.1 

Content-Type: application/json

[
    {
        "action": "ENABLE",
        "device_id": "3dc0809f-ed91-4b68-b912-5bd6064d901e"
    }
]

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Add Subscription Device
POST /subscriptions/{id}/devices

Adds a new device on a subscription. A single device can be added within a single Web API call.Devices that can be added on a subscription are:

  • Devices already purchased or rented by the contact (and not already added to this subscription).
  • Devices located at the business’s warehouse and can be rented to contacts. Once these devices are added to the subscription, then they will be classified as Rentals.

Path variables

id
string required

The subscription’s identifier

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

Request body

Object
device_id
string required

The device identifier

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

Applicable and required when the Device is added to the subscription as a result of the ordering flow. In this flow, the contact selects to get a device based on its rental price. Therefore, the device is added as a rental to the subscription and a rental recurring charge is added as well.

Example:
3ec0809f-ed91-4b68-b912-5bd6064d9436

Responses

200 OK
Body
Object
id
string

The unique identifer of the subscription action that adds the device on a subscription

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/subscriptions/4dc0809f-ed91-4b68-b912-5bd6064d901e/devices HTTP/1.1 

Content-Type: application/json

{
    "device_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "price_terms_id": "3ec0809f-ed91-4b68-b912-5bd6064d9436"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Subscription Device
PUT /subscriptions/{id}/devices/{device_id}

Updates a single susbcription device. The update witl either:

  • remove the device from the subscription. If the device is owned by the contact, then contact keeps this ownership. If the device is a Rental the removing it from the last subscirption of the contact results in returning it back to the business warehouse.
  • replaces it with another one. The new device might be owned by the contact or provided by the business as a rental,i.e. sam eas when adding a new device to the subscription. However in this case, the new device apart from replacing the existing device, it will also be enabled on the same service(s) as the device being removed.

Path variables

id
string required

The unique identifier of the subscription

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
device_id
string required

The unique identifier of the Device

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

Request body

Object
action
string required

Required device action

Enumeration:
REMOVE

Removes the device from the subscription

REPLACE

Replaces the device with another device

Example:
REPLACE
replaced_by_device_id
string

Applicable and required when replacing a device.

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

Responses

200 OK
Body
Object
id
string

The new subscripton action’s unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/subscriptions/4dc0809f-ed91-4b68-b912-5bd6064d901e/devices/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "action": "REPLACE",
    "replaced_by_device_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Subscription Devices
GET /subscriptions/{id}/devices

Returns a list of subscription devices. These devices are not necesserally enabled on subscription services, but they are still related to the subscription and can be enabled to any of its devices at any point.

Path variables

id
string required

The subscription’s unique identifier

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

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

The Subscription Device identifier

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

Date on which the device was added to the subscription

Example:
1668235865
enabled_services
integer

Number of services currently enabled on the device

Example:
2
device
Object

Dietailed Device information

id
string

The device identifier

Example:
1668235865
serial_number
string

Device serial number

Example:
STB3332222111
electronic_id
string

The device’s electronic ID

Example:
STB3332222111
state
string

Device state

Enumeration:
RENTAL

Contact rented the device

PURCHASED

Contact owns the device

Example:
RENTAL
provisioning
Object

The provisioning integration(s), if applicable. Information depends on the device’s product and its type. A device

id
string

The provisioning integration’s identifier

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

The provisioning integration’s name

Example:
IRDETO
product
Object

Device product whicf is of traceable physical good classification

id
string

Product identifier

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

Product SKU

Example:
HDSTB
name
string

Product name

Example:
HD Set Top Box
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/subscriptions/4dc0809f-ed91-4b68-b912-5bd6064d901e/devices HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "added_on": 1668235865,
            "enabled_services": 2,
            "device": {
                "id": "1668235865",
                "serial_number": "STB3332222111",
                "electronic_id": "STB3332222111",
                "state": "RENTAL",
                "provisioning": {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "IRDETO"
                },
                "product": {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "sku": "HDSTB",
                    "name": "HD Set Top Box"
                },
                "custom_fields": [
                    {
                        "key": "back_office",
                        "value": "Back Office"
                    }
                ]
            }
        }
    ]
}
List devices to be added on a subscription
GET /subscriptions/{id}/allowed_devices

Returns a list of devices that can be added on a subscription. The list includes devices already owned by the contact and devices owned by the business and will be added on the subscription as Rentals.

Path variables

id
string required

The subscription’s unique identifier

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
ownership
string optional

Device’s ownership

Enumeration:
OWNED_BY_CONTACT
OWNED_BY_BUSINESS
search_value
string optional

Search for a device using its serial number

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
ownership
string

The ownership of the device

Enumeration:
OWNED_BY_CONTACT
OWNED_BY_BUSINESS
Example:
OWNED_BY_BUSINESS
device
Object

The available device

id
string

Device identifier

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

Device serial number

Example:
100002392112
product
Object

Device product

id
string

Product identifier

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

Product SKU

Example:
HDSTB
name
string

Product name

Example:
HD Set Top Box
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/subscriptions/{id}/allowed_devices HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        { 
            "ownership": "OWNED_BY_BUSINESS",
            "device": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "serial_number": "100002392112",
                "product": {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "sku": "HDSTB",
                    "name": "HD Set Top Box"
                }
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Add Service to Organisation
POST /organisations/{id}/services

Adds a new service for an Organisation. A single service can be added per Web API call. In cases where the Organisation does not own a subscription in the same billing cycle as the new service’s cycle, then a new subscirption is also created with this Web API call. Otherwise, the existing subscription is amended with the new service and this new service’s billing cycle is adjusted to the subscription’s. It is important to note that services can only be added to Merchants/Service Provider organisations.

Path variables

id
string required

The Organisation’s idnetifier

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

Service product identifier. Only Termed and One-time services can be added.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
price_terms_id
string required

The new service’s price which also defines its billing cycle

Example:
edc0809f-ed91-4b68-b912-5bd6064d901e
quantity
integer

The service quantity, default to 1 if not specified

Example:
5
scheduled_date
integer

Schedule the addition of the service. Scheduled date must be set in the future.

Example:
1621236954
components
Array

Applicable when adding a termed service with a flex bundle composition. In that case, at least one item must be specified.

Unique items: YES
Object
product_id
string

The component service product identifier. Only termed services can be added and as long as they meet the bundle service’s allowed composition

Example:
2dc0809f-ed91-4b68-b912-5bd6064d901e
price_terms_id
string

The component’s price terms. The price’s billing cycle must be the same as the bundle service’s cycle.

Example:
32c0809f-ed91-4b68-b912-5bd6064d901e
devices
Array

List of device to which the new service can be enabled on.

Object
id
string

Device identifier.

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

Responses

200 OK
Body
Array
Object
id
string

The unique identifier of the new subscription action

Example:
3ac0809f-ed91-4b68-b912-5bd6064d901f
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/{id}/services HTTP/1.1 

Content-Type: application/json

{
    "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "price_terms_id": "edc0809f-ed91-4b68-b912-5bd6064d901e",
    "quantity": 5,
    "scheduled_date": 1621236954,
    "components": [
        {
            "product_id": "2dc0809f-ed91-4b68-b912-5bd6064d901e",
            "price_terms_id": "32c0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "devices": [
        {
            "id": "edc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "id": "3ac0809f-ed91-4b68-b912-5bd6064d901f"
    }
]
List Organisation Services
GET /organisations/{id}/services

Returns a list of services to which an Organisation is subscribed to. The list includes service across all subscriptions, of different billing cycles. Only MErvhant/Service Provider organisations can subscribe to services.

Path variables

id
string required

The Organisation’s unique identifier

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

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
include_only_terminated
boolean optional

By default, churned (terminated) are excluded. Use this parameter to get a list of churned services only.

classification
string optional

Product classification of the subscription services to be retrieved. If not specified, all services are returned

Enumeration:
ONE_TIME
TERMED
EXPENSE
include_subscription
boolean optional

Determine whether subscription and its billing terms will additionally be inclded in the response. Defaults to false

Default:
false
Example:
true
subscription_id
string optional

Unique identifier of the subscription that groups services by their billing cycle

in_trial
boolean optional

Returns services in trial

in_contract
boolean optional

Returns services currenlty in contract period

scheduled_actions
boolean optional

Returns services that have a scheduled action pending

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

Subscription servcie identifier

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

The type of the event

Enumeration:
DRAFT
EFFECTIVE
NOT_EFFECTIVE
PAUSED
CANCELLED
REGRETTED
Example:
EFFECTIVE
added_on
integer

Date added to the subscription

Example:
1625555027
first_activated_on
integer

First activation date

Example:
1625555027
removed_on
integer

Date removed from the subscription (applies for churned services)

Example:
1625555027
is_recurring_charge
boolean

Applicable for expense services to indicate whether they are charged on a recurring basis

Example:
true
has_allowance
boolean

Shows whether the service allows subscribers to consume usage

Example:
true
scheduled_actions
boolean

Shows whether there are pending scheduled actions for the service

Example:
true
product
Object

Service product information

id
string

Product identifier

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

Product SKU

Example:
TV001
name
string

Product name

Example:
Films
classification
string

The service product’s classification

Enumeration:
TERMED
ONE_TIME
EXPENSE
type_composition
string
Enumeration:
FLAT
FIXED_BUNDLE
FLEXIBLE_BUNDLE
COMPOSITE
Example:
FLAT
price
Object

Service pricing information

id
string

Price identifier

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

Price

Example:
9.99
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
tax_model
string

Taxation model

Example:
TAX_INCLUSIVE
billing_period
Object

How often the service is billed

duration
string

Billing cycle duration

uot
string

Duration unit of time

billing
Object

Latest billing information of the service

billed_from
integer

Latest billed from date

Example:
1625555027
billed_to
integer

Billed up to date

Example:
1625555027
terms
Object

Services’s price terms

billing_model
string

Billing model

Enumeration:
PRE_BILL
POST_BILL
auto_renew
boolean

Auto-renewed or not

Example:
true
in_contract
boolean

Service in contract or not

Example:
true
quantity
integer

Service quantity

Example:
1
contract_period
Object

Contract period details

duration
integer

How long the service will be/was in contract

Example:
18
uot
string

Contract period unit of time

Example:
MONTHS
start_date
integer

Contract period start date

Example:
1625555027
end_date
integer

Contract period end date

Example:
1625555027
termed_period
Object

Service’s termed period

billing_cycles
integer

How many billing cycles each termed period covers

Example:
1
start_date
integer

Latest termed period start date

Example:
1625555027
end_date
integer

Termed period end date

Example:
1625555027
trial_period
Object

Service’s trial period details

trial_state
string

Service currently in trial or not

Example:
IN_TRIAL
start_date
integer

Trial period start date

Example:
1625555027
end_date
integer

Tiral period end date

Example:
1625555027
duration
integer

Trial period duration

Example:
7
uot
string

Trial period unit of time

Example:
DAYS
paused_period
Object

Applicable while the service is paused

start_date
integer

Paused period start date

Example:
1625555027
end_date
integer

Paused perido end date

Example:
1625555027
bundled_service
Object

Applicable when the service was added as part of a bundled service.

id
string

The bundle service’s identifier

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

Bundle service product

id
string

Product identifier

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

Product SKU

Example:
GOLD
name
string

Product name

Example:
Gold Package
components
Array

Applicable for bundle services and returns a list of component services.

Object
id
string

Component service identifier

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

Component service added date

Example:
1625555027
first_activated_on
integer

Componenent service first activation date

Example:
1625555027
in_contract
boolean

Component service in contract or not

Example:
true
state
string

The type of the event

Enumeration:
DRAFT
EFFECTIVE
NOT_EFFECTIVE
PAUSED
CANCELLED
REGRETTED
Example:
EFFECTIVE
product
Object

Component service product

id
string

Product identifier

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

Product SKU

Example:
FILMS
name
string

Product name

Example:
Films
price
Object

The component service’s price

price
number

Component service price

Example:
9.99
currency_code
string
Example:
EUR
subscription
Object

The subscription of the service

id
string

Subscriptionidentifier

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

Subscription code

Example:
60012321123
terms
Object

Subscription pricing terms

funding_source
string

Subscription’s funding source

Enumeration:
ACCOUNT
WALLET
Example:
ACCOUNT
billing_period
Object

How often services are billed

duration
integer

Billing cycle duration

Example:
1
uot
string

Billing cycle unit of time

Example:
MONTHS
billing_day
Object

Billing day

day_of_month
integer

Day of month specified for subscriptions with cycles longer than a month

Example:
1
day_of_week
string

Day of week specified for subscriptions with cycles shorter than a month

Example:
WEDNESDAY
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
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/4dc0809f-ed91-4b68-b912-5bd6064d901e/services HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "state": "EFFECTIVE",
            "added_on": 1625555027,
            "first_activated_on": 1625555027,
            "removed_on": 1625555027,
            "is_recurring_charge": true,
            "has_allowance": "true",
            "scheduled_actions": "true",
            "product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "TV001",
                "name": "Films",
                "classification": "ONE_TIME",
                "type_composition": "FLAT"
            },
            "price": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "price": 9.99,
                "currency_code": "EUR",
                "tax_model": "TAX_INCLUSIVE",
                "billing_period": {
                    "duration": "",
                    "uot": ""
                }
            },
            "billing": {
                "billed_from": 1625555027,
                "billed_to": 1625555027
            },
            "terms": {
                "billing_model": "PRE_BILL",
                "auto_renew": true,
                "in_contract": true,
                "quantity": 1,
                "contract_period": {
                    "duration": 18,
                    "uot": "MONTHS",
                    "start_date": 1625555027,
                    "end_date": 1625555027
                },
                "termed_period": {
                    "billing_cycles": 1,
                    "start_date": 1625555027,
                    "end_date": 1625555027
                }
            },
            "trial_period": {
                "trial_state": "IN_TRIAL",
                "start_date": 1625555027,
                "end_date": 1625555027,
                "duration": 7,
                "uot": "DAYS"
            },
            "paused_period": {
                "start_date": 1625555027,
                "end_date": 1625555027
            },
            "bundled_service": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "product": {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "sku": "GOLD",
                    "name": "Gold Package"
                }
            },
            "components": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "added_on": 1625555027,
                    "first_activated_on": 1625555027,
                    "in_contract": true,
                    "state": "EFFECTIVE",
                    "product": {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "sku": "FILMS",
                        "name": "Films"
                    },
                    "price": {
                        "price": 9.99,
                        "currency_code": "EUR"
                    }
                }
            ],
            "subscription": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "code": "60012321123",
                "terms": {
                    "funding_source": "ACCOUNT",
                    "billing_period": {
                        "duration": 1,
                        "uot": "MONTHS"
                    },
                    "billing_day": {
                        "day_of_month": 1,
                        "day_of_week": "WEDNESDAY"
                    },
                    "payment_method": {
                        "type": "ACCOUNT_DEBIT",
                        "identity": {
                            "id": "",
                            "identifier": "Visa *****1234 03/25"
                        }
                    }
                }
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Actions
GET /subscriptions/{id}/actions
GET /subscriptions/actions/{id}
PUT /subscription_actions/{id}
GET /subscriptions/{id}/allowed_actions
GET /services/{id}/allowed_actions
List Subscription Actions
GET /subscriptions/{id}/actions

Retrieves a list of actions for a subscription. This set includes all actions already performed on the subscripiton and actions which are still pending.

Path variables

id
string required

Subscription unique identifier

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

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

The action’s state

Enumeration:
EXECUTED

Action successfully executed

SCHEDULED

Action pending to be performed

REJECTED

Action rejected on its execution

CANCELLED

Action cancelled prior its scheduled date

Example:
SCHEDULED

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

Subscription action identifier

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

A unique 16-digit code for the subscription action

Example:
5443456789999098
state
string

The type of the event

Enumeration:
EXECUTED

Action successfully executed

SCHEDULED

Action pending to be performed

REJECTED

Action rejected on its execution

CANCELLED

Action cancelled prior its scheduled date

Example:
SCHEDULED
behaviour_code
string
Enumeration:
REMOVE_SERVICE
business_classification_code
string
executed_on
integer

Date of execution. Available only for Executed actions

Example:
1658412097
scheduled_on
integer

The scheduled date of a pending action. Available for Scheduled actions as well as Canelled/Rejected ones to indicate there intended scheduled date

Example:
1658412097
cancelled_on
integer

The date on which a Scheduled action was cancelled

Example:
1658412097
rejected_on
integer

The date on which the action was rejected.

Example:
1658412097
category
Object

The action’s category.

id
string

Action category identifier

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

Action category name

Example:
Regret service
submitted_by
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
cancelled_by
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
subscription
Object

The action’s related Subscription

id
string

Subscription identifier

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

Subscripton code

Example:
6544445670091232
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/subscriptions/4dc0809f-ed91-4b68-b912-5bd6064d901e/actions HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "code": "5443456789999098",
            "state": "SCHEDULED",
            "behaviour_code": "REMOVE_SERVICE",
            "business_classification_code": "",
            "executed_on": 1658412097,
            "scheduled_on": 1658412097,
            "cancelled_on": 1658412097,
            "rejected_on": 1658412097,
            "category": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Regret service"
            },
            "submitted_by": {
                "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
                "name": "John Smith",
                "username": "johnsmith@crm.com"
            },
            "cancelled_by": {
                "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
                "name": "John Smith",
                "username": "johnsmith@crm.com"
            },
            "subscription": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "code": "6544445670091232"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Subscription Action
GET /subscriptions/actions/{id}

Retrieves detailed information of an existing subscription action

Path variables

id
string required

Subscription Action’s identifier

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 OK
Body
Object
code
string

Action’s 16-digit code

Example:
5444567099900907
state
string

The type of the event

Enumeration:
EXECUTED

Action successfully executed

SCHEDULED

Action pending to be performed

REJECTED

Action rejected on its execution

CANCELLED

Action cancelled prior its scheduled date

Example:
SCHEDULED
behaviour_code
string
business_classification_code
string
executed_on
integer

The date on which the action was performed

Example:
1658412644
scheduled_on
integer

Scheduled date of execution

Example:
1658412644
cancelled_on
integer

Applicable when cancelling scheduled actions

Example:
1658412643
rejected_on
integer

Date on which the action’s execution was rejected.

Example:
1658412643
rejection_reason
string

Reason of rejecting the action. The reason is usually the system error’s description.

Example:
Service already exists on the subscription
subscription
Object

The subscirption for which the action was performed

id
string

Subscription identifier

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

Subscription code

Example:
9900004343331234
submitted_by
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
cancelled_by
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
category
Object

Action’s category providing reasoning on why the action was performed

id
string

Action Category identifier

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

Action category name

Example:
High cost
services
Array

A list of sevices affected by the subscription action. With a single action one or more services are affected. An action might affect a subscription’s services in 3 different ways

Object
change_type
string

Service change type

Enumeration:
ADDED

Service added to the subscrption

REMOVED

Service removed from subscription (product change, cancellation or regret)

UPDATED

The service’s statwas changed

quantity
number

The new quantity of the service

Example:
2
price
Object

The new price of the service. Applicable when changing a service’s price

price_terms_id
string

The price’s unique identifier

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

The new price

Example:
9.99
billing_period
Object

The service’s new billing period according to the new price trms

duration
integer

Billing period duration

uot
string

Billing period unit of time

Example:
MONTHS
product
Object

The affected service’s product

id
string

Product identifier

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

Product SKU

Example:
SVOD
name
string

Product name

Example:
Auxsat TV
devices
Array

The action’s affected Devices. With a single actions one or more devices might be affected

Object
change_type
string

How the action affetced the subscription’s devices

Enumeration:
ADDED

A device addded to the subscription (new one added or an existing device was replaced)

REMOVED

Device removed (removed individually or replaced by another device)

UPDATED

Device updated due to service distribution changes

Example:
ADDED
device
Object

Device details

id
string

Device identifier

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

Serial number of device

Example:
001112912232
electronic_id
string

Device’s electronic ID

Example:
001112912232
product
Object

Device product details

id
string

Product identifier

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

Product SKU

Example:
HDSTB
name
string

Product name

Example:
HD Set Top Box
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/subscriptions/actions/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "code": "5444567099900907", 
    "state": "SCHEDULED",
    "behaviour_code": "",
    "business_classification_code": "",
    "executed_on": 1658412644,
    "scheduled_on": 1658412644,
    "cancelled_on": 1658412643,
    "rejected_on": 1658412643,
    "rejection_reason": "Service already exists on the subscription",
    "subscription": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "code": "9900004343331234"
    },
    "submitted_by": {
        "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
        "name": "John Smith",
        "username": "johnsmith@crm.com"
    },
    "cancelled_by": {
        "id": "a12b282f-e6ce-e618-0a72-becb3ad78033",
        "name": "John Smith",
        "username": "johnsmith@crm.com"
    },
    "category": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "name": "High cost"
    },
    "services": [
        {
            "change_type": "REMOVED",
            "quantity": 2,
            "price": {
                "price_terms_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "price": 9.99,
                "billing_period": {
                    "duration": 1,
                    "uot": "MONTHS"
                }
            },
            "product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "SVOD",
                "name": "Auxsat TV"
            }
        }
    ],
    "devices": [
        {
            "change_type": "ADDED",
            "device": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "serial_number": "001112912232",
                "electronic_id": "001112912232",
                "product": {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "sku": "HDSTB",
                    "name": "HD Set Top Box"
                }
            }
        }
    ]
}
Update Subscription Action
PUT /subscription_actions/{id}

Updates an existing subscription action.

Path variables

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

Request body

Object
action
string required

How the action is updated.

Enumeration:
CANCEL

Cancel the scheduled action

RESUBMIT

Resubmit a Rejected action. A new duplicate action is created.

UPDATE

Update informaiton of the scheduled action

category_id
string

The action’s category

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

Set a new scheduled date for the action, The new scheduled date must comply with business rules

Example:
1668242869
use_proposed_date
boolean

Reschedule the action by applying business rules such as when a service can be cancelled

Example:
true
period_settings
Object

Applicable only for Scheduled actions that include period settings such as Paused period.

duration_in_days
integer nullable

The new period’s duration in days

Example:
5
ends_on
integer nullable

The new period’s end date

Example:
1234567

Responses

200 OK
Body
Object
id
string

The updated action’s identifier

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

The action’s proposed scheduled date as this is defines by business rules. Use this date in a subsequent call to schedule the action based on these rules.

Example:
1668242869
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/subscription_actions/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "action": "RESUBMIT",
    "category_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "scheduled_date": 1668242869,
    "use_proposed_date": "true",
    "period_settings": {
        "duration_in_days": 5,
        "ends_on": 1234567
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "proposed_date": 1668242869
}
List Allowed Subscription Actions
GET /subscriptions/{id}/allowed_actions

Retrieves a list of subscription actions tha can be perofrmed on a specific subscription at a specific period of time

Path variables

id
string required

Request parameters

execution_date
integer optional

The date on which the subscription action will be executed. If not specified, the current date is considered

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
behaviour_code
string
business_classification_code
string
services
Array

A list of services that will be affected by the action

Object
id
string
product
Object
id
string
sku
string
name
string
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/subscriptions/{id}/allowed_actions HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "behaviour_code": "",
    "business_classification_code": "",
    "services": [
        {
            "id": "",
            "product": {
                "id": "",
                "sku": "",
                "name": ""
            }
        }
    ]
}
List Allowed Subscription Service Actions
GET /services/{id}/allowed_actions

Retrieves a list of subscription actions that can be perofrmed on a specific services at a specific period of time

Path variables

id
string required

Request parameters

execution_date
integer optional

The date on which the subscription action will be executed. If not specified, the current date is considered

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
behaviour_code
string
business_classification_code
string
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/services/{id}/allowed_actions HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "behaviour_code": "",
    "business_classification_code": ""
}
Service Locations
PUT /services/{id}/locations
GET /services/{id}/locations
Update Service Locations
PUT /services/{id}/locations

Updates the locations at which the service is used/consumed. A service is consumed/used at one of the contact’s/organisation’s addresses.

Path variables

id
string required

Subscription service identifier

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

Request body

Object
locations
Array

A list of contact addresses that represent the various locations at which a service is being used/consumed. At least one address must be specified and must be one of the subscription owner’s addresses.

Object
id
string

A contact address unique identifier.

Example:
1ac0809f-ed91-4b32-b912-5b45064d90af

Responses

200 OK
Body
Object
id
string

The subscription service’s unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/services/4dc0809f-ed91-4b68-b912-5bd6064d901e/locations HTTP/1.1 

Content-Type: application/json

{
    "locations": [
        {
            "id": "1ac0809f-ed91-4b32-b912-5b45064d90af"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Get Service Locations
GET /services/{id}/locations

Returns a list of locations at which a service is being used/consumed. This is a set of addresses of the contact or organisation who owns the subscription service

Path variables

id
string required

The service’s unique identifier

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

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

The address identifier

Example:
0df9936c-7d5f-a878-4c05-9b942aa14295
type
string

The address type. Many of the same type.

Enumeration:
HOME
BUSINESS
ALTERNATIVE
name
string

A short address name so that it’s easily recognised in a list

Example:
Mum's house
is_primary
boolean

Defines whether the address is the primary one

Example:
true
address_line_1
string

The address line 1

Example:
21 Elia Papakyriakou
address_line_2
string

The address line 2

Example:
7 Stars Tower
state_province_county
string

The address state/province/county

Example:
Egkomi
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country 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
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/services/4dc0809f-ed91-4b68-b912-5bd6064d901e/locations HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "0df9936c-7d5f-a878-4c05-9b942aa14295",
            "type": "BUSINESS",
            "name": "Mum's house",
            "is_primary": true,
            "address_line_1": "21 Elia Papakyriakou",
            "address_line_2": "7 Stars Tower",
            "state_province_county": "Egkomi",
            "town_city": "Nicosia",
            "postal_code": "2415",
            "country_code": "CYP",
            "lat": 35.157115,
            "lon": 33.313719,
            "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
System Monitor

The following group will detail the API’s required in order to monitor the events and logs taking place in the system.

GET /event_logs
GET /event_logs/{id}
GET /api_logs
GET /api_logs/{id}
List Events
GET /event_logs

Retrieve a list of events logged in Mongo based on search criteria (e.g. all purchase events)

Request parameters

search_value
string optional

Filter based on search value (case insensitive) across name or description

Example:
Register
contact_id
string epoch optional

Filter based on contact (identifier) associated to such event

Example:
c35cbdda-1bc2-ff81-50bb-098058c714ee
entity
string optional

Filter based on entity associated to such event

Enumeration:
ACTIVITY
AWARD_REWARD_TRANSACTION
CONTACT
CREDIT_NOTE
INVOICE
ORDER
PASS
PAYMENT
PAYOUT
PURCHASE
REFERRAL
REWARD_OFFER
SERVICE_REQUEST
SPEND_REWARD_TRANSACTION
SUBSCRIPTION
USER
api_log_id
string GUID optional

Filter based on API Log (identifier)

Example:
529983f1-1d5d-4e88-83b5-ba30715a809c
submitted_date
string optional

Filter based on the submitted 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. submitted_date[gte]=1618395497&submitted_date[lt]=1618395497).

Enumeration:
submitted_date[gt]

Returns results where the submitted date is greater than this value

submitted_date[gte]

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

submitted_date[lt]

Returns results where the submitted date is less than this value

submitted_date[lte]

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

submitted_by_user_id
string GUID optional

Filter based on user (identifier) that submitted such event

Example:
f9d3a05b-0d95-44fa-bc64-3b0aa434470b
submitted_by_username
string optional

The user’s email that submitted such request

Example:
johnsmith@crm.com
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
entity_id
string GUID optional

Filter based on entity (identifier) associated to such event

Example:
c35cbdda-1bc2-ff81-50bb-098058c714ee

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 event identifier

Example:
03fd3775-0c07-dfda-e46e-b294d52c1e1c
submitted_date
integer epoch

The date and time that the event was created

Example:
1625472619
description
string

The event description (pre-defined text)

Example:
New order O10102 for Echo Mars
entity
Object

The event associated with the event

id
string GUID

The entity identifier

Example:
f30e0969-a4be-aaf5-8db7-da66077c51bf
type
string

The event method

Enumeration:
ACTIVITY
AWARD_REWARD_TRANSACTION
CONTACT
CREDIT_NOTE
INVOICE
ORDER
PASS
PAYMENT
PAYOUT
PURCHASE
REFERRAL
REWARD_OFFER
SERVICE_REQUEST
SPEND_REWARD_TRANSACTION
SUBSCRIPTION
USER
api_log
Object

Details about API log associated with the event

id
string GUID

The API log identifier

Example:
fc6cca11-8d9d-8ef2-f37e-09f144ae0933
name
string

The API log name

Example:
createOrder
user
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@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/events HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "03fd3775-0c07-dfda-e46e-b294d52c1e1c",
            "submitted_date": 1625472619,
            "description": "New order O10102 for Echo Mars",
            "entity": {
                "id": "f30e0969-a4be-aaf5-8db7-da66077c51bf",
                "type": "SERVICE_REQUEST"
            },
            "api_log": {
                "id": "fc6cca11-8d9d-8ef2-f37e-09f144ae0933",
                "name": "createOrder"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Event
GET /event_logs/{id}

Retrieve detailed information for an Event as logged in Mongo DW

Path variables

id
string GUID required

The event (identifier) to retrieve additional information

Example:
407eebd4-dd56-f522-60f5-929dfe3f58df

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 event identifier

Example:
407eebd4-dd56-f522-60f5-929dfe3f58df
description
string

The event description (pre-defined text)

Example:
New order O10102 for Echo Mars
api_log
Object

Details about API log associated with the event

id
string GUID

The API log identifier

Example:
fc6cca11-8d9d-8ef2-f37e-09f144ae0933
name
string

The API log name

Example:
createOrder
entity
Object

The entity associated with the event

id
string GUID

The entity identifier

Example:
d6e20ee9-3fd2-d9dc-5726-7a7c4d48679f
type
string

The event method

Enumeration:
ACTIVITY
AWARD_REWARD_TRANSACTION
CONTACT
CREDIT_NOTE
INVOICE
ORDER
PASS
PAYMENT
PAYOUT
PURCHASE
REFERRAL
REWARD_OFFER
SERVICE_REQUEST
SPEND_REWARD_TRANSACTION
SUBSCRIPTION
USER
data
Object

The entity data based on Mongo DW event objects (more details can be found under the Internal speca page for Mongo DW Events)

submitted_by_user
Object

Details about user that submitted such request

id
string GUID

The user identifier

Example:
6feb5a88-7a6c-658b-83bd-a3a23ca0bcdf
name
string

The user full name

Example:
John Doe
submitted_date
integer epoch

The date that such event was submitted

Example:
1651237192
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/event_logs/407eebd4-dd56-f522-60f5-929dfe3f58df HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "407eebd4-dd56-f522-60f5-929dfe3f58df",
    "description": "New order O10102 for Echo Mars",
    "api_log": {
        "id": "fc6cca11-8d9d-8ef2-f37e-09f144ae0933",
        "name": "createOrder"
    },
    "entity": {
        "id": "d6e20ee9-3fd2-d9dc-5726-7a7c4d48679f",
        "type": "PAYMENT",
        "data": {}
    },
    "submitted_by_user": {
        "id": "6feb5a88-7a6c-658b-83bd-a3a23ca0bcdf",
        "name": "John Doe"
    },
    "submitted_date": 1651237192
}
List API Logs
GET /api_logs

Retrieve a list of API logs based on search criteria (e.g. all post api requests)

Request parameters

search_value
string optional

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

Example:
organisation
source
string optional

Filter based on source

Example:
/organisations/ba7944ab-53ef-4425-ac7c-faaf2e33a4a1/switch"
entity_id
string GUID optional

Filter based on entity (identifier)

Example:
b2ce56e8-9fd1-06cb-e8c0-6e7e73fea317
method
string optional

Filter based on API method

Enumeration:
POST
PUT
DELETE
statuses
array of Event / API Status (enum) optional

Filter based on API response status

Collection format: csv
submitted_date
string optional

Filter based on the submitted 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. submitted_date[gte]=1618395497&submitted_date[lt]=1618395497).

Enumeration:
submitted_date[gt]

Returns results where the submitted date is greater than this value

submitted_date[gte]

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

submitted_date[lt]

Returns results where the submitted date is less than this value

submitted_date[lte]

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

submitted_by_user_id
string GUID optional

Filter based on user (identifier) that submitted such API request

Example:
f9d3a05b-0d95-44fa-bc64-3b0aa434470b
submitted_by_username
string optional

The user’s email that submitted such request

Example:
johnsmith@crm.com
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 API log identifier

Example:
b6c1c158-7ef8-4f1a-82d1-060dcc9e3da2
method
string

The event method

Enumeration:
POST
PUT
DELETE
source
string

The API source

Example:
/organisations/ba7944ab-53ef-4425-ac7c-faaf2e33a4a1/switch"
submitted_date
integer epoch

The date that such API request was submitted

Example:
1651236236
status
Object

Details about API response status

code
string

The event status (based on HTTP response codes)

Enumeration:
200

OK

201

Created

204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

325

Too Early

500

Internal Server Error

502

Bad Gateway

503

Service Unavailable

504

Gateway Timeout

name
string

The API response status name (based on HTTP response names)

Example:
OK
user
Object
id
string

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@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/api_logs HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "b6c1c158-7ef8-4f1a-82d1-060dcc9e3da2",
            "method": "POST",
            "source": "/organisations/ba7944ab-53ef-4425-ac7c-faaf2e33a4a1/switch\"",
            "submitted_date": 1651236236,
            "status": {
                "code": "201",
                "name": "OK"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get API Log
GET /api_logs/{id}

Retrieve detailed information for an API log

Path variables

id
string GUID required

The log (identifier) to be retrieved

Example:
6ccff6a9-b0fe-a6f5-878b-b982d293d3ca

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 API log identifier

Example:
e7e5ef61-8d70-efea-972a-650ce6fe8e02
name
string

The API name

Example:
updateProductTypes
method
string

The event method

Enumeration:
POST
PUT
DELETE
api_version
string

The API version

Example:
V2
ip_address
string

The IP Address from which the API request was submitted

Example:
172.30.202.22
source
string

The API request URL endpoint

Example:
/product_types/1b964e48-8867-55c4-a86a-c5bc024f0f9c
request
string

The API request

Example:
"composition_method\":\"FLAT\",\"name\":\"Consumables\",\"description\":null,\"negative_balance_allowed\":false,\"display_name\":\"\",\"is_modifier\":false,\"is_stockable\":false,\"variant_attributes\":[]}
status
Object

Details about API response status

code
string

The event status (based on HTTP response codes)

Enumeration:
200

OK

201

Created

204

No Content

401

Unauthorized

403

Forbidden

404

Not Found

325

Too Early

500

Internal Server Error

502

Bad Gateway

503

Service Unavailable

504

Gateway Timeout

name
string

The API response status name (based on HTTP response names)

Example:
OK
response
string

The API response

Example:
{\"id\":\"9EAA2884B6D04DD89F324A26D63944C9\"}", "id":"849a07f0-f180-47ef-9c4a-89a67306ebfe", "ip_address":"172.30.182.233", "api_version":"V1", "reason_phrase":"OK", "submitted_date":1630312452 ":[]}
submitted_date
integer epoch

The date that such API request was submitted

Example:
11651235756
submitted_by_user
Object

Details about user that submitted such request

id
string GUID

The user identifier

Example:
6feb5a88-7a6c-658b-83bd-a3a23ca0bcdf
name
string

The user full name

Example:
John Doe
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/api_logs/6ccff6a9-b0fe-a6f5-878b-b982d293d3ca HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "e7e5ef61-8d70-efea-972a-650ce6fe8e02",
    "name": "updateProductTypes",
    "method": "PUT",
    "api_version": "V2",
    "ip_address": "172.30.202.22",
    "source": "/product_types/1b964e48-8867-55c4-a86a-c5bc024f0f9c",
    "request": "\"composition_method\\\":\\\"FLAT\\\",\\\"name\\\":\\\"Consumables\\\",\\\"description\\\":null,\\\"negative_balance_allowed\\\":false,\\\"display_name\\\":\\\"\\\",\\\"is_modifier\\\":false,\\\"is_stockable\\\":false,\\\"variant_attributes\\\":[]}",
    "status": {
        "code": "404",
        "name": "OK"
    },
    "response": "{\\\"id\\\":\\\"9EAA2884B6D04DD89F324A26D63944C9\\\"}\",    \"id\":\"849a07f0-f180-47ef-9c4a-89a67306ebfe\",    \"ip_address\":\"172.30.182.233\",    \"api_version\":\"V1\",    \"reason_phrase\":\"OK\",    \"submitted_date\":1630312452 \":[]}",
    "submitted_date": 11651235756,
    "submitted_by_user": {
        "id": "6feb5a88-7a6c-658b-83bd-a3a23ca0bcdf",
        "name": "John Doe"
    }
}
Topups

Top-ups is an easy way to add money to an Account or a Wallet. Contacts top up their accounts or wallet with funds to be used in upcoming payments.Top-ups might retrieve money from one of the contact’s payment methods.

POST /topups
GET /topups/{id}
Create Top-up
POST /topups

Create a new top-up transaction for a specific account or wallet.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
account_id
string GUID required nullable

The account unique identification for which the topup will be performed. Either account or wallet is applicable and mandatory

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
wallet_id
string GUID required nullable

The wallet unique identification for which the topup will be performed. Either account or wallet is applicable and mandatory

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
amount
number required

The amount of the topup. This amount is in the account’s/wallet’s currency

Example:
9.99
payment_method
Object required
type
string required

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
id
string nullable

The unique identifier of the contac’ts payment method. Applicable and required when the select payment method type is either a Card, an Account Debit or a Wallet.

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

A unique and random 16-digit code will be auto-generated if not provided

Example:
1234567891234567
topup_date
integer epoch

Date of Topup Request

Example:
1618298816
commerce_pool_id
string

Group of conditions that define how the top up’s amount can be spent. Specifying spend conditions will move the money to the wallet’s Commerce balance otherwise, money goes to Open balance.

Example:
f283a863-18e1-7cae-48c4-7433bf28cf97
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 201

Created

Body
Object
id
string GUID

The top-up unique identifier

Example:
2b98beb3-df11-f14d-561b-a93fcd4a246a
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

Wallet Top-Up
POST https://sandbox.crm.com/backoffice/v2/topups HTTP/1.1 

Content-Type: application/json

{
    "account_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "wallet_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "amount": 9.99,
    "payment_method": {
        "type": "WALLET",
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "code": "1234567891234567",
    "topup_date": 1618298816,
    "commerce_pool_id": "f283a863-18e1-7cae-48c4-7433bf28cf97",
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "2b98beb3-df11-f14d-561b-a93fcd4a246a"
}
Get Topup
GET /topups/{id}

Retrieve details of an existing topup transaction

Path variables

id
string GUID required

The unique identifier of the topup to be retrieved

Example:
4AD9C84FA60F9FE407140E20F707726A

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
code
string

The code of the topup transaction

Example:
1234567891234567
state
string

The state of the topup transaction

Enumeration:
POSTED
topup_date
integer epoch

The creation date of the topup. Defaults to the current date

Example:
1583846865
amount
number

The amount of the topup

Example:
9.99
currency_code
string

The topup’s currency code

Example:
EUR
payment_method
Object
Example:
{
    "type": "CASH",
    "identity": {
        "id": "",
        "identifier": "Visa *****1234 03/25"
    }
}
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
identity
Object

The type of the event

id
string

The unique identifier of the contact’s payment method

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

A short description of the payment method. Depending on the payment method’s type different information is returned:

  • Card: the brand, followed by the last 4 digits of the card plus expiration month/year
  • Account debit: Name: Bank code followed by the first 5 and the last 9 digits of the account number/IBAN
  • Wallet: Name: Email and/or phone used on registration
Example:
Visa *****1234 03/25
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
account
Object

The account for which the topup was performed. Either account or wallet is applicable.

id
string GUID

The unique ID

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

The unique number

Example:
AC123456
wallet
Object

The wallet for which the topup was performed. Either account or wallet is applicable.

id
string GUID

The unique ID

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

The unique code

Example:
123456AAVV123685
commerce_pool
Object

Details about spend condition

id
string GUID

The commerce pool identifier

Example:
dc01f65b-a482-48f1-9fda-c163df72f28f
name
string

The commerce pool name

Example:
Redeem Anywhere
description
string

The commerce pool description

Example:
Ability to redeem on any organisation/day/product
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
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/topups/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "code": "1234567891234567",
    "state": "POSTED",
    "topup_date": 1583846865,
    "amount": 9.99,
    "currency_code": "EUR",
    "payment_method": {
        "type": "CHEQUE",
        "identity": {
            "id": "",
            "identifier": "Visa *****1234 03/25"
        }
    },
    "contact": {
        "id": "1c060611-0667-313e-b3bf-4cb70ee81cdf",
        "name": "John Doe",
        "code": "C123"
    },
    "account": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "number": "AC123456"
    },
    "wallet": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "code": "123456AAVV123685"
    },
    "commerce_pool": {
        "id": "dc01f65b-a482-48f1-9fda-c163df72f28f",
        "name": "Redeem Anywhere",
        "description": "Ability to redeem on any organisation/day/product"
    },
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ]
}
Transfers

Transfers can be used to move money between accounts or even betwen an accout ad a wallet (and vise-versa).

POST /transfers
GET /transfers/{id}
Create Transfer
POST /transfers

Create a new Transfer between accounts, wallets or account and wallet

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
amount
number required

Transfer amount. The amount is in the origin entity’s currency.

Example:
9.99
origin
Object required

The origin of the transfer. Can be either an account or a wallet

account_id
string GUID nullable

Source account unique id.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
wallet_id
string GUID nullable

Source wallet unique id

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
destination
Object required

The destination of the transfer. Can be either an account or a wallet

account_id
string GUID nullable

Destination account unique id

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
wallet_id
string GUID nullable

Destination wallet unique id

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
transfer_date
number epoch

Date of transfer

Example:
1620999582
code
string

A unique and random 16-digit code will be auto-generated if not provided

Example:
1234567891234567
commerce_pool_id
string

Applicable only when transfering funds to a wallet. If specified, then the amount will be transfered to the wallet’s Commerce Balance and reserved to be spent based on the conditions. Otheewise, money is transferred to the wallet’s Open balance

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

Responses

201 201

Created

Body
Object
id
string

The unique identifier of the transfer

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/transfers HTTP/1.1 

Content-Type: application/json

{
    "amount": 9.99,
    "origin": {
        "account_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "wallet_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "destination": {
        "account_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "wallet_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "transfer_date": 1620999582,
    "code": "1234567891234567",
    "commerce_pool_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Get Transfer
GET /transfers/{id}

Get details of an existing transfer transaction

Path variables

id
string GUID required

The unique identifier of the transfer to be retrieved

Example:
4AD9C84FA60F9FE407140E20F707726A

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
code
string

The transfer code.

Example:
1234567891234567
state
string

The state of the transfer

Enumeration:
POSTED
transfer_date
integer

Date of transfer

amount
number

Transfer amount

Example:
9.99
origin
Object

The origin entity of the transfer. Can be either an account or a wallet. Information about the Contact is retrieved in either case

account
Object nullable

Origin account details

id
string GUID

The unique ID of the source account

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

The unique number of the source account

Example:
AC123456
wallet
Object nullable

Origin wallet details

id
string GUID

The unique ID of the source wallet

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

The unique code of the source wallet

Example:
W123456AA
contact
Object

Details of the contact that owns the origin entity

id
string GUID

Contact’s unique ID

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

The full name of the contact that originated the transfer

Example:
John Smith
code
string

The unique code of the contact that originated the transfer

Example:
C1230955623
organisation
Object

The organisation that owns the account

id
string

Organisation identifier

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

Organisation name

Example:
Good Burgers
destination
Object

The destination of the transfer. Can be either an account or a wallet. Information about the Contact is retrieved in either case

account
Object nullable

Destination account details

id
string GUID

Destination account unique ID

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

Destination account unique number

Example:
AC123456
wallet
Object nullable

Destination wallet details

id
string GUID

Destiantion wallet unique ID

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

Destiantion wallet unique code

Example:
W321456AA
contact
Object

Destination contact’s details

id
string GUID

Uiue identifier of the contact that owns the destination entity

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

The full name of the contact that the transfer was sent to

Example:
Janet Smith
code
string

The unique code of the contact that the transfer was sent to

Example:
C1249044512
organisation
Object

The organisation that owns the destination account

id
string

Organisation identifier

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

Organisation name

Example:
AC Coffees
currency_code
string

The transfer currency, defaults to the origin account currency

Example:
EUR
commerce_pool
Object

The group of conditions that define how the transfered amount can be spend. Applicable only when trasnfering money to a wallet.

id
string

The unique identifier fo the spend condition

Example:
E68DFDCAD1E37A65ACCE45B21269B76D
name
string

The name of the spend condition

Example:
TV services
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/transfers/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "code": "1234567891234567",
    "state": "POSTED",
    "transfer_date": 1,
    "amount": 9.99,
    "origin": {
        "account": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "number": "AC123456"
        },
        "wallet": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "code": "W123456AA"
        },
        "contact": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "John Smith",
            "code": "C1230955623"
        },
        "organisation": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Good Burgers"
        }
    },
    "destination": {
        "account": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "number": "AC123456"
        },
        "wallet": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "code": "W321456AA"
        },
        "contact": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Janet Smith",
            "code": "C1249044512"
        },
        "organisation": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "AC Coffees"
        }
    },
    "currency_code": "EUR",
    "commerce_pool": {
        "id": "E68DFDCAD1E37A65ACCE45B21269B76D",
        "name": "TV services"
    }
}
Usage
POST /usage_records
PUT /usage_records/{id}
DELETE /usage_records/{id}
GET /usage_records
GET /usage_records/{id}
Add Usage Record
POST /usage_records

Creates a usage detail record. A single usage record can be created per Web AP call

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

The usage service being consumed

Example:
897f0809f-ed91-4b68-b912-5bd6064ade12
usage_amount
number required

The usage’s amount

Example:
1.99
usage_timestamp
integer required

The date and time at which usage was consumed

Example:
1637318444
contact_code
string nullable

The contact’s code, used to identiy the contact who is cnsuming usage.

Example:
C00012345
mac_address
string nullable

Used to identify the contact who is consuming usage

Example:
00-D0-56-F2-B5-12
contact_id
string GUID nullable

The contact consuming usage

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
subscription_id
string GUID nullable

The subscription through which service is consumed by one of its services

Example:
65fa809f-ed91-4b68-b912-5b23464d9acb
termed_service_id
string GUID nullable

The termed subscription service through which service is consumed

Example:
00af0809f-ed91-4b68-b912-5bd60643253d
one_time_service_id
string GUID nullable

The one time service that a contact purchases and through which usage is consumed

Example:
c2eb205b-98e1-052e-e63c-eff3ac96c585
processing
string

Specify whether usage record will be processed in Sync or Async mode… In the latter case, a webhook will send back to the caller the processing’s result, i.e. if usage is accepted or rejected

Enumeration:
SYNC
ASYNC
charged_amount
number

The consume usage’s cost. Specified only if the system that records the usage also defines its cost. In this case, CRM will not apply pricing durng billing. Promotions however will be applied, if any, on the charged amount.

Example:
1.99
currency
string

The charged amount’s currency

Example:
EUR
organisation_id
string GUID

The organisation (merchant or venue) at which usage was consumed.

Example:
601a809f-ed91-4b68-b912-5b23464deac7
is_authorised
boolean

Indicates that usage consumption is authorised or not. If authorised, then remaining usage allowance is not validated on submitting usage.

Default:
false
Example:
true

Responses

201 Created
Body
Object
id
string GUID

The usage record identifier

Example:
65fa809f-ed91-4b68-b912-5b23464d9acb
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/usage_records HTTP/1.1 

Content-Type: application/json

{
    "usage_service_id": "897f0809f-ed91-4b68-b912-5bd6064ade12",
    "usage_amount": 1.99,
    "usage_timestamp": 1637318444,
    "contact_code": "C00012345",
    "mac_address": "00-D0-56-F2-B5-12",
    "contact_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "subscription_id": "65fa809f-ed91-4b68-b912-5b23464d9acb",
    "termed_service_id": "00af0809f-ed91-4b68-b912-5bd60643253d",
    "one_time_service_id": "c2eb205b-98e1-052e-e63c-eff3ac96c585",
    "processing": "ASYNC",
    "charged_amount": 1.99,
    "currency": "EUR",
    "organisation_id": "601a809f-ed91-4b68-b912-5b23464deac7"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "65fa809f-ed91-4b68-b912-5b23464d9acb"
}
Update Usage Record
PUT /usage_records/{id}

Update a single usage record.

Path variables

id
string required

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
Enumeration:
POSTED
REJECTED
CANCELLED
billing_state
string
Enumeration:
PENDING
COMPLETED
billing_directive
string
Enumeration:
TO_BE_BILLED
TO_BE_CREDITED
NOT_TO_BE_BILLED

Responses

200 OK
Body
Object
id
string
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/usage_records/{id} HTTP/1.1 

Content-Type: application/json

{
    "state": "REJECTED",
    "billing_state": "",
    "billing_directive": "",
    "invoice_id": "",
    "credit_note_id": ""
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Delete Usage Record
DELETE /usage_records/{id}

Deletes a single usage record

Path variables

id
string GUID required

The usage record (identifier) that will be deleted

Example:
cab35653-05ac-de36-5c64-1fbffbe3abfd

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
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/usage_records/{id} HTTP/1.1 

HTTP/1.1 200 OK 
List Usage Records
GET /usage_records

Retuns a list of usage records

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
contact_id
string optional
subscription_id
string optional
service_id
string optional

The unique identifier of the termed subscrpiton service or contact one-time service

usage_service_id
string optional

The unique identifier of the usage product

usage_timestamp
string optional

Filter based on the usage 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. usage_timestamp[gte]=1618395497&usage_timestamp[lt]=1618395497).

Enumeration:
usage_timestamp[gte]
usage_timestamp[gt]
usage_timestamp[lte]
usage_timestamp[lt]
organisation_id
string optional
state
string optional
Enumeration:
POSTED
CANCELLED
REJECTED
billing_state
string optional
Enumeration:
PENDING
COMPLETED
billing_directive
string optional
Enumeration:
TO_BE_BILLED
NOT_TO_BE_BILLED
TO_BE_CREDITED
invoice_id
string optional

The invoice in which the usage records were included

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
code
string
usage_amount
number
Example:
1.99
usage_timestamp
integer
Example:
12345678
charged_amount
number
Example:
1.99
currency
string
Example:
EUR
state
string
Enumeration:
POSTED
REJECTED
CANCELLED
billing_state
string
Enumeration:
PENDING
COMPLETED
billing_directive
string
Enumeration:
TO_BE_BILLED
NOT_TO_BE_BILLED
TO_BE_CREDITED
contact
Object
id
string
code
string
name
string
usage_service
Object
id
string
sku
string
name
string
service
Object
id
string
sku
string
name
string
classification
string
Enumeration:
TERMED_SERVICE
ONE_TIME_SERVICE
measurement_unit
Object
id
string
name
string
display_name
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/usage_records HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "",
            "code": "",
            "usage_amount": 1.99,
            "usage_timestamp": 12345678,
            "charged_amount": 1.99,
            "currency": "EUR",
            "state": "REJECTED",
            "billing_state": "PENDING",
            "billing_directive": "TO_BE_BILLED",
            "contact": {
                "id": "",
                "code": "",
                "name": ""
            },
            "usage_service": {
                "id": "",
                "sku": "",
                "name": ""
            },
            "service": {
                "id": "",
                "sku": "",
                "name": "",
                "classification": "ONE_TIME_SERVICE"
            },
            "measurement_unit": {
                "id": "",
                "name": "",
                "display_name": ""
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Usage Record
GET /usage_records/{id}

Returns detailed information of a usage record. A single usage record is returned per Web API call

Path variables

id
string required

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
code
string
state
string
Enumeration:
POSTED
REJECTED
CANCELLED
billing_state
string
Enumeration:
PENDING
COMPLETED
billing_directive
string
Enumeration:
TO_BE_BILLED
NOT_TO_BE_BILLED
TO_BE_CREDITED
usage_timestamp
integer
Example:
1637320345
charged_amount
number
Example:
9.99
currency
string
Example:
EUR
usage_amount
number
Example:
1.99
usage_service
Object
id
string
sku
string
name
string
measurement_unit
Object
id
string
name
string
display_name
string
service
Object
id
string
sku
string
name
string
classification
string
Enumeration:
TERMED_SERVICE
ONE_TIME_SERVICE
contact
Object
id
string
code
string
name
string
Example:
John Smith
subscription
Object
id
string
code
string
organisation
Object
id
string
type
string
Example:
MERCHANT
name
string
Example:
merchant name
cancellation
Object

Applicable and mandatory only if a usage record is cancelled. Provides information on the user and the date on whiche the usage record was cancelled.

date
integer
user
Object
id
string
username
string
financials
Object
invoice
Object
id
string
number
string
credit_note
Object
id
string
number
string
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/usage_records/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "",
    "code": "",
    "state": "REJECTED",
    "billing_state": "COMPLETED",
    "billing_directive": "NOT_TO_BE_BILLED",
    "usage_timestamp": 1637320345,
    "charged_amount": 9.99,
    "currency": "EUR",
    "usage_amount": 1.99,
    "usage_service": {
        "id": "",
        "sku": "",
        "name": ""
    },
    "measurement_unit": {
        "id": "",
        "name": "",
        "display_name": ""
    },
    "service": {
        "id": "",
        "sku": "",
        "name": "",
        "classification": "ONE_TIME_SERVICE"
    },
    "contact": {
        "id": "",
        "code": "",
        "name": "John Smith"
    },
    "subscription": {
        "id": "",
        "code": ""
    },
    "organisation": {
        "id": "",
        "type": "MERCHANT",
        "name": "merchant name"
    },
    "cancellation": {
        "date": 1,
        "user": {
            "id": "",
            "username": ""
        }
    },
    "financials": {
        "invoice": {
            "id": "",
            "number": ""
        },
        "credit_note": {
            "id": "",
            "number": ""
        }
    }
}
Users

Users represent an organisation’s employees that are responsible for the configuration and business flows of such organisation

PUT /users/{id}
PUT /users/{id}/my_profile
DELETE /users/{id}
GET /users
GET /users/{id}
GET /users/{id}/my_profile
GET /users/organisations
PUT /users/{id}/actions
Authentication
POST /users/authenticate
GET /users/oidc
POST /users/refresh
POST /users/forgot_password
POST /users/change_password
POST /users/{id}/mode
POST /users/otp
POST /users/validate_otp
POST /users/{id}/sign_out
Authenticate User
POST /users/authenticate

Authenticate a user and provide a token that needs to be used for subsequent API requests

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

Object
provider
string required

The user’s identity provider

Enumeration:
EMAIL
TWO_FACTOR
OIDC_OAUTH
username
string nullable

The user’s username (required for EMAIL provider)

Example:
johndoe@crm.com
password
string nullable

The user’s password (required for EMAIL provider)

Example:
password1234
two_factor_method
Object nullable

The user’s (configured) two-factor methods

method
string required

Defines the type of the user 2FA method

Enumeration:
TOTP
BACKUP_CODE
value
string required

The two-factor method value (applicable only for email, phone and back-up code based two-factor methods)

Example:
jo****@crm.com
sso_provider
Object nullable

The user’s token as provided by the SSO (OIDC/oAuth) provider (required for OIDC_OAUTH provider)

token
string nullable

The token taken from the OIDC/oAuth service provider

Example:
688a21ad-f082-e936
state
string nullable

The state taken from the OIDC/oAuth service provider

Example:
e9c435c6-60f4-fa08-2396-6b3e7188a30e

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

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
POST https://sandbox.crm.com/backoffice/v2/users/authenticate HTTP/1.1 

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

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

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": "TEST",
    "organisations": [
        {
            "id": "b907f6f0-5f3c-9b67-bcf1-9ee13d747294",
            "type": "SERVICE_OWNER",
            "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_enabled": true
}
POST https://sandbox.crm.com/backoffice/v2/users/authenticate HTTP/1.1 

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

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

HTTP/1.1 401 Unauthorized 

Content-Type: application/json

{
    "user": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@crm.com"
    },
    "two_factor_methods": {
        "send_method": {
            "method": "EMAIL",
            "value": "jo****@crm.com"
        },
        "options": [
            {
                "method": "EMAIL",
                "value": "jo****@crm.com"
            },
            {
                "method": "GOOGLE"
            }
        ]
    }
}
OIDC User Authentication
GET /users/oidc

Authenticate a user over to an OIDC provider

Request parameters

username
string required

The user’s username that will be used for OIDC purposes

Example:
johndoe@crm.com

Request headers

api_key
string required

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

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

Responses

200 OK

The request has succeeded

Body
Object
authorization_url
string

The URL that users should be redirected for OIDC authentication purposes

Example:
azure.crm.com
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/users/oidc?username=johndoe@crm.com HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "authorization_url": "azure.crm.com"
}
Refresh User Token
POST /users/refresh

Refresh the user session based on a refresh token and provide a token that needs to be used for subsequent API requests

Request headers

authorization
string optional

The refresh token

Example:
Bearer eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

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

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
POST https://devapi.crm.com/backoffice/v1/users/refresh HTTP/1.1 

refresh_token: eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg

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,
    "first_name": "John",
    "last_name": "Doe",
    "email": "johndoe@crm.com",
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "BUSINESS",
            "name": "CRMdotCOM"
        }
    ],
    "progress": {
        "invite_user": "true",
        "create_contact": "false",
        "create_reward_offer": "false",
        "create_merchant": "false",
        "create_venue": "false"
    }
}
Forgot Password
POST /users/forgot_password

Request a new password for an existing user (providing the user’s login email address, where such password reset email will be sent)

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

Object
email
string required

The email that will be used to request a new password

Example:
jd@crm.com

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
POST https://sandbox.crm.com/backoffice/v2/users/forgot_password HTTP/1.1 

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

{
    "email": "jd@crm.com"
}

HTTP/1.1 204 No Content 
Change Password
POST /users/change_password

Changes the password for a user (when a user requested a new one via Forgot Password)

Request body

Object
token
string required

The token that will verify that the client is trusted

Example:
ABCTKN123456798VGP2020
password
string required

The user’s new password

Example:
password1234

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
POST https://sandbox.crm.com/backoffice/v2/users/change_password HTTP/1.1 

Content-Type: application/json

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

HTTP/1.1 204 No Content 
Switch Users Mode
POST /users/{id}/mode

Switch the user mode between test and live

Path variables

id
string GUID required

The user (identifer) that its mode will be changed

Example:
3c9fc0df-3948-a933-b594-ab1bf7f1ce5c

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

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

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
POST https://sandbox.crm.com/backoffice/v2/users/3c9fc0df-3948-a933-b594-ab1bf7f1ce5c/mode HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

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_enabled": true
}
Request One Time Password
POST /users/otp

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

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

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

Request body

Object
credentials
Array required

Information on how the user will be identified

Object
name
string required

The predetermined information that will be used to identify the user

Enumeration:
TFA_EMAIL

Two-factor Authentication based on Email

TFA_PHONE

Two-factor Authentication based on Phone (SMS)

value
string required

The value of the credential to check

Example:
j_ioannou@crm.com

Responses

200 OK

The request has succeeded

Body
Object
auth_otp
string

The one time password authentication identifier that is generated as per otp request and will be used for validating such otp

Example:
0e5efc4e-5dc7-ea54-cf9d-498914806e0f
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
POST https://sandbox.crm.com/backoffice/v1/users/otp HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "credentials": [
        {
            "name": "TFA_EMAIL",
            "value": "j_ioannou@crm.com"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "auth_otp": "0e5efc4e-5dc7-ea54-cf9d-498914806e0f"
}
Validate One Time Password
POST /users/validate_otp

Verify an one-time password that was requested and provide authentication information that can be used for subsequent API calls

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

Object
auth_otp
string required

The one time password authentication identifier that is generated as per otp request and will be used for validating such otp

Example:
47c7-318202dbe45d
code
integer required

The one time password that was sent to the contact and should be used for verification purposes

Example:
123456

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

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
POST https://sandbox.crm.com/backoffice/v2/users/validate_otp HTTP/1.1 

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

{
    "auth_otp": "47c7-318202dbe45d",
    "code": 123456
}

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_enabled": true
}
Sign Out User
POST /users/{id}/sign_out

Signs out a user by terminating his/her session, such user will not be able to access the client (SPA) and should sign in again in order to do so

Path variables

id
string GUID required

The user (identifer) that will be signed out

Example:
3fd82b4e-94c3-e11e-a090-0b48261f788a

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

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
POST https://sandbox.crm.com/backoffice/v2/users/3fd82b4e-94c3-e11e-a090-0b48261f788a/sign_out HTTP/1.1 

HTTP/1.1 204 No Content 
Update User
PUT /users/{id}

Update an existing user

Path variables

id
string GUID required

The user (identifier) that will be updated

Example:
010cd9e5-d10d-1b4c-2cf2-daa0c06c835e

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

The user’s first name

Example:
Jane
last_name
string nullable

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
role_id
string GUID nullable

The user role

Example:
03486d93-c68a-721c-e8a4-e30f3a0f8252
preferred_language
string nullable

The language preferred by the user for communication

Example:
EN
software_language
string nullable

The language preferred by the user for software translation

Example:
EN
teams
Array nullable

The teams that the user will be part of

Unique items: YES
string GUID
Example:
5da28aca-b0f1-636f-0f03-2a732eb0fb65
is_active
boolean nullable

The user state

Example:
true

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The user identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
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/users/010cd9e5-d10d-1b4c-2cf2-daa0c06c835e HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
Content-Type: application/json

{
    "first_name": "Jane",
    "last_name": "Doe",
    "email_address": "john@crm.com",
    "phone": {
        "country_code": "CYP",
        "number": "99123456"
    },
    "role_id": "03486d93-c68a-721c-e8a4-e30f3a0f8252",
    "preferred_language": "EN",
    "software_language": "EN",
    "teams": [
        "5da28aca-b0f1-636f-0f03-2a732eb0fb65"
    ],
    "is_active": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Update User - My Profile
PUT /users/{id}/my_profile

Update the signed-in user details

Path variables

id
string GUID required

The (signed-in) user (identifer) that will be updated

Example:
42204ef7-0613-4379-2525-4afc284e694a

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Request body

Object
first_name
string nullable

The user’s first name

Example:
Jane
last_name
string nullable

The user’s last name

Example:
Doe
preferred_language
string nullable

The language preferred by the user for communications

Example:
EN
software_language
string nullable

The language preferred by the user for software translation

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

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The user identifier

Example:
42204ef7-0613-4379-2525-4afc284e694a
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/users/42204ef7-0613-4379-2525-4afc284e694a/my_profile HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "first_name": "Jane",
    "last_name": "Doe",
    "preferred_language": "EN",
    "software_language": "EN",
    "email_address": "john@crm.com",
    "phone": {
        "country_code": "CYP",
        "number": "99123456"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "42204ef7-0613-4379-2525-4afc284e694a"
}
Delete User
DELETE /users/{id}

Delete a user from a specific organisation

Path variables

id
string GUID required

The user (identifer) that will be deleted

Example:
aeb209b7-bea9-9508-f053-cf82bb8ccc28

Notes

MULTI-ORGANISATION USERS

Users can belong to multiple organisations under a cloud operator. Deleting a user from a specific organisation will be removed only from that organisation, but such user can still sign in to all other organisations that might belong 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

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/users/aeb209b7-bea9-9508-f053-cf82bb8ccc28 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Users
GET /users

Retrieve a list of users based on search criteria (e.g. all active users)

Request parameters

search_value
string optional

Filter based on search value (case insensitive) across full name, email address and phone number

Example:
John Doe
first_name
string optional

Filter based on user first name

Example:
John
last_name
string optional

Filter based on user last name

Example:
Doe
email_address
string optional

Filter based on user email address

Example:
johndoe@crm.com
pending_invitation
boolean optional

Filter based on whether users have accepted their invitation (false), have pending invitation (true) or both (null)

Allow empty value: true
Example:
false
user_roles
array of string optional

Filter based on user roles that are assigned to

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

Filter based on teams that belong to

Collection format: csv
Unique items: YES
is_locked
boolean optional

Filter based on whether users are locked due to incorrect password (true if locked, false if not locked)

Example:
true
is_active
boolean optional

Filter based on whether users are active or not

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 succeeded

Body
Object
content
Array
Object
id
string GUID

The user identifier

Example:
a15947aa-3596-29d2-9a99-c9c3e5114904
first_name
string

The user’s first name

Example:
John
last_name
string

The user’s last name

Example:
Doe
email_address
string

The user’s email address

Example:
john@crm.com
phone
Object
country_code
string

The phone country code (based on ISO 3 char code)

Example:
CYP
number
string

The phone number

Example:
99123456
preferred_language
string

The language preferred by the user for communication

Example:
GR
software_language
string

The language preferred by the user for software translation

Example:
EN
is_active
boolean

The user state

Example:
true
invitation_date
integer epoch

The date when the user was invited

Example:
1581009106
two_factor_enabled
boolean

Defines whether two-factor authentication is set or not

Example:
true
lock_expiration
integer epoch

Defines when the user lockout period will end (applicable if the user is locked out due to reaching the maximum invalid password attempts)

Example:
1617094607
role
Object

Information about the user roles

id
string GUID

The user role identifier

Example:
1a917631-b103-c47d-283f-53cc50ba1e2b
name
string

The user role name

Example:
Owner
last_login
integer

The timestamp of the user’s last login

Example:
1617094607
last_deactivation
integer

The timestamp of the user’s last deactivation

Example:
1617094607
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/users HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "a15947aa-3596-29d2-9a99-c9c3e5114904",
            "first_name": "John",
            "last_name": "Doe",
            "email_address": "john@crm.com",
            "phone": {
                "country_code": "CYP",
                "number": "99123456"
            },
            "preferred_language": "GR",
            "software_language": "EN",
            "is_active": "true",
            "invitation_date": 1581009106,
            "two_factor_enabled": "true",
            "lock_expiration": 1617094607,
            "role": {
                "id": "1a917631-b103-c47d-283f-53cc50ba1e2b",
                "name": "Owner"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get User
GET /users/{id}

Retrieve detailed information for a user

Path variables

id
string GUID required

The user (identifer) that will be retrieved

Example:
42204ef7-0613-4379-2525-4afc284e694a

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 user identifier

Example:
42204ef7-0613-4379-2525-4afc284e694a
first_name
string

The user’s first name

Example:
John
last_name
string

The user’s last name

Example:
Doe
email_address
string

The user’s email address

Example:
john@crm.com
phone
Object
country_code
string

The phone country code (based on ISO 3 char code)

Example:
CYP
number
string

The phone number

Example:
99123456
preferred_language
string

The language preferred by the user for communication

Example:
EN
software_language
string

The language preferred by the user for software translation

Example:
GR
role
Object

Information about the user roles

id
string GUID

The user role identifier

Example:
1a917631-b103-c47d-283f-53cc50ba1e2b
name
string

The user role name

Example:
Owner
identities
Array

The user identities

Object

The user’s identity

id
string GUID

The user identity

Example:
e51778aa-3493-6a19-d015-5ed883f0eb39
type
string

The provider of the identity

Enumeration:
EMAIL
PHONE
challenge
string

The identity’s challenge

Example:
johndoe@crm.com
teams
Array

The teams that the user is part of

Object

Details about team

id
string GUID

The team identifier

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

The team name

Example:
Support
last_login
integer

The timestamp of the user’s last login

Example:
1617094607
last_deactivation
integer

The timestamp of the user’s last deactivation

Example:
1617094607
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/users/42204ef7-0613-4379-2525-4afc284e694a HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "42204ef7-0613-4379-2525-4afc284e694a",
    "first_name": "John",
    "last_name": "Doe",
    "email_address": "john@crm.com",
    "phone": {
        "country_code": "CYP",
        "number": "99123456"
    },
    "preferred_language": "EN",
    "software_language": "GR",
    "role": {
        "id": "1a917631-b103-c47d-283f-53cc50ba1e2b",
        "name": "Owner"
    },
    "identities": [
        {
            "id": "e51778aa-3493-6a19-d015-5ed883f0eb39",
            "provider": "EMAIL",
            "identity_challenge": "johndoe@crm.com"
        }
    ],
    "teams": [
        {
            "id": "bf1370a1-73ad-0bbf-6fef-f2ce1938d4fe",
            "name": "Support"
        }
    ]
}
Get User - My Profile
GET /users/{id}/my_profile

Retrieve detailed information for the signed-in user

Path variables

id
string GUID required

The (signed-in) user (identifer) that will be retrieved

Example:
42204ef7-0613-4379-2525-4afc284e694a

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The user identifier

Example:
42204ef7-0613-4379-2525-4afc284e694a
first_name
string

The user’s first name

Example:
John
last_name
string

The user’s last name

Example:
Doe
email_address
string

The user’s email address

Example:
john@crm.com
phone
Object
country_code
string

The phone country code (based on ISO 3 char code)

Example:
CYP
number
string

The phone number

Example:
99123456
preferred_language
string

The language preferred by the user for communication

Example:
EN
software_language
string

The language preferred by the user for software translation

Example:
GR
role
Object

Information about the user roles

id
string GUID

The user role identifier

Example:
1a917631-b103-c47d-283f-53cc50ba1e2b
name
string

The user role name

Example:
Owner
identities
Array

The user identities

Object

The user’s identity

id
string GUID

The user identity

Example:
e51778aa-3493-6a19-d015-5ed883f0eb39
type
string

The provider of the identity

Enumeration:
EMAIL
PHONE
challenge
string

The identity’s challenge

Example:
johndoe@crm.com
teams
Array

The teams that the user is part of

Object

Details about team

id
string GUID

The team identifier

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

The team name

Example:
Support
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/users/42204ef7-0613-4379-2525-4afc284e694a/my_profile HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "42204ef7-0613-4379-2525-4afc284e694a",
    "first_name": "John",
    "last_name": "Doe",
    "email_address": "john@crm.com",
    "phone": {
        "country_code": "CYP",
        "number": "99123456"
    },
    "preferred_language": "EN",
    "software_language": "GR",
    "role": {
        "id": "1a917631-b103-c47d-283f-53cc50ba1e2b",
        "name": "Owner"
    },
    "identities": [
        {
            "id": "e51778aa-3493-6a19-d015-5ed883f0eb39",
            "provider": "EMAIL",
            "identity_challenge": "johndoe@crm.com"
        }
    ],
    "teams": [
        {
            "id": "bf1370a1-73ad-0bbf-6fef-f2ce1938d4fe",
            "name": "Support"
        }
    ]
}
Get User Organisations
GET /users/organisations

Retrieve a list of organisations that a user is a member to

Request parameters

username
string required

The user’s username that will be used for retrieving the organisations that such user is a member to

Example:
johndoe@crm.com

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The organisation identifier

Example:
a15947aa-3596-29d2-9a99-c9c3e5114904
name
string

The organisation name

Example:
CRM.COM
login_method
string

The user’s last name

Enumeration:
USERNAME_PASSWORD
OIDC
Example:
USERNAME_PASSWORD
public_api_key
string

The public API Key for the organisation

Example:
bb511dbf-cdb0-b446-c329-01bb12de4126
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/users/organisations?username=johndoe@crm.com HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "a15947aa-3596-29d2-9a99-c9c3e5114904",
            "name": "CRM.COM",
            "login_method": "USERNAME_PASSWORD",
            "public_api_key": "bb511dbf-cdb0-b446-c329-01bb12de4126"
        }
    ]
}
User Actions
PUT /users/{id}/actions

Perform actions on existing user (e.g. cancel user lockout)

Path variables

id
string GUID required

The user (identifer) that an action will be applied

Example:
42204ef7-0613-4379-2525-4afc284e694a

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 action that will be applied on the user

Enumeration:
CANCEL_LOCK

Cancel the lockout that is applied on user due to invalid authentication (reaching the max auth attemps with no success)

INVITE_RESEND

Resend an invitation to a user, given that such invitation was not accepted yet

INVITE_REVOKE

Revoke an invitation from a user, given that such invitation was not accepted yet

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The user identifier

Example:
0bb44610-f77c-85e0-f8a1-d35da22f5c78
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
Example 2
PUT https://sandbox.crm.com/backoffice/v2/users/42204ef7-0613-4379-2525-4afc284e694a/actions HTTP/1.1 

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

{
    "actions": "CANCEL_LOCK"
}

HTTP/1.1 204 No Content 
PUT https://sandbox.crm.com/backoffice/v2/users/42204ef7-0613-4379-2525-4afc284e694a/actions HTTP/1.1 

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

{
    "actions": "INVITE_RESEND"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "0bb44610-f77c-85e0-f8a1-d35da22f5c78"
}
Invitation
POST /users/invite
POST /users/accept_invite
POST /users/request_verification
Invite User
POST /users/invite

Invite a new user to an organisation with a specific role (invitation will be sent via the specified identity)

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

The user’s first name

Example:
Jane
last_name
string required

The user’s last name

Example:
Doe
organisation_id
string GUID required

The organisation identifier that the user is invited to

Example:
1fd4d25a-48c0-801c-1880-8ed9a6795f29
role_id
string GUID required

The role that will be assigned on the invited user

Example:
c7acbdb4-8d27-d8ef-e73c-b5467cdfdea8
identity
Object required

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
teams
Array nullable

Defines the teams that the user will be part of

Unique items: YES
string GUID
Example:
1bd7328c-edf4-2cb3-c640-f6c27bbdbd43

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The user identifier

Example:
2ff8f7c0-e232-ea2b-2e28-c75db5d5ab12
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/users/invite HTTP/1.1 

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

{
    "first_name": "Jane",
    "last_name": "Doe",
    "organisation_id": "1fd4d25a-48c0-801c-1880-8ed9a6795f29",
    "role_id": "c7acbdb4-8d27-d8ef-e73c-b5467cdfdea8",
    "identity": {
        "type": "EMAIL",
        "challenge": "jd@crm.com"
    },
    "teams": [
        "1bd7328c-edf4-2cb3-c640-f6c27bbdbd43"
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "2ff8f7c0-e232-ea2b-2e28-c75db5d5ab12"
}
Accept Invitation
POST /users/accept_invite

Accept a user’s invitation for joining an organisation

Request body

Object
token
string required

The token that will verify that the client is trusted

Example:
ABCTKN123456798VGP2020
password
string required

The user’s password

Example:
password1234

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/users/accept_invite HTTP/1.1 

Content-Type: application/json

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

HTTP/1.1 204 No Content
Resend User Verification
POST /users/request_verification

Request another email or phone verification for a user after an email or phone verification has been sent, but not verified

Request headers

api_key
string optional

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

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

Request body

Object
email_address
string required nullable

The email that was used during registration (email or phone should be provided)

Example:
john@crm.com
phone
Object required nullable
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
number
string

The phone number

Example:
99123456
type
string
Enumeration:
LANDLINE
MOBILE
FAX

Responses

200 OK

The request has succeeded

Body
Object
auth_otp
string

The one time password authentication identifier that is generated as per otp request and will be used for validating such otp

Example:
85df-1a3efa6686c2
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
POST https://sandbox.crm.com/backoffice/v2/users/resend_verification HTTP/1.1 

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

{
    "email_address": "john@crm.com"
}

HTTP/1.1 204 No Content 
User Identities
POST /users/{id}/identities
PUT /users/{id}/identities/{identity_id}
DELETE /users/{id}/identities/{identity_id}
Create User Identity
POST /users/{id}/identities

Create an identity for a specific user

Path variables

id
string GUID required

The user (identifer) that an identity will be created

Example:
42204ef7-0613-4379-2525-4afc284e694a

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

The provider of the identity

Enumeration:
EMAIL
PHONE
challenge
string required

The identity challenge

Example:
johndoe@crm.com
value
string nullable

The identity value (e.g. password) - applicable only for EMAIL based identities

Example:
1234

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The user identity identifier

Example:
a84a13f9-36d5-7dca-50e6-a2936a6f4b00
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/users/42204ef7-0613-4379-2525-4afc284e694a/identities HTTP/1.1 

Content-Type: application/json

{
    "type": "EMAIL",
    "challenge": "johndoe@crm.com",
    "value": "1234"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "a84a13f9-36d5-7dca-50e6-a2936a6f4b00"
}
Update User Identity
PUT /users/{id}/identities/{identity_id}

Update an existing identity for a specific user

Path variables

id
string GUID required

The user (identifer) that an identity will be created

Example:
42204ef7-0613-4379-2525-4afc284e694a
identity_id
string GUID required

The identity (identifer) that will be updated

Example:
285318e8-e309-2e4d-fc5e-f75030dd460e

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

The identity challenge

Example:
johndoe@crm.com
value
string required

The identity value (e.g. password) - applicable only for EMAIL based identities

Example:
1234
current_value
string required

The current identity value (e.g. password) - applicable only for EMAIL based identities

Example:
4321

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The user identity identifier

Example:
285318e8-e309-2e4d-fc5e-f75030dd460e
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/users/42204ef7-0613-4379-2525-4afc284e694a/identities/285318e8-e309-2e4d-fc5e-f75030dd460e HTTP/1.1 

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

{
    "challenge": "johndoe@crm.com",
    "value": "1234"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "285318e8-e309-2e4d-fc5e-f75030dd460e"
}
Delete User Identity
DELETE /users/{id}/identities/{identity_id}

Delete an identity for a specific user

Path variables

id
string GUID required

The user (identifer) whose identity will be deleted

Example:
42204ef7-0613-4379-2525-4afc284e694a
identity_id
string GUID required

The identity (identifer) that will be deleted

Example:
ade2c35a-abb6-9dcd-c703-1b36605bf344

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/users/42204ef7-0613-4379-2525-4afc284e694a/identities/ade2c35a-abb6-9dcd-c703-1b36605bf344 HTTP/1.1 

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

HTTP/1.1 204 No Content 
Two Factor Authentication
POST /users/{id}/two_factor_methods
DELETE /users/{id}/two_factor_methods/{method_id}
GET /users/{id}/two_factor_methods
PUT /users/{id}/two_factor_methods/{method_id}/actions
POST /users/{id}/two_factor_methods/backup
Create User Two-Factor Authentication Method
POST /users/{id}/two_factor_methods

Create a 2FA method for a specific user

Path variables

id
string GUID required

The user (identifier) for which a 2FA method will be created

Example:
993d849e-b5b0-be3e-1486-9334200757cd

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Request body

Object
method
string required

Defines the type of the user 2FA method

Enumeration:
TOTP
value
string required

The two-factor authentication value

Example:
johndoe@crm.com

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The two-factor authentication method identifier

Example:
d464860c-4ca3-0e84-a48c-6819a3406791
totp
Object

The two-factor authentication time-based one-time password (TOTP) details

url
string

The TOTP URL that will be used for the QR code

Example:
https://crm.com
key
string

The TOTP key that can be used for manual registration on an authenticator app

Example:
123456qwerty
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/users/993d849e-b5b0-be3e-1486-9334200757cd/two_factor_methods HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "method": "EMAIL",
    "value": "johndoe@crm.com"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "d464860c-4ca3-0e84-a48c-6819a3406791"
}
Delete User Two-Factor Authentication Method
DELETE /users/{id}/two_factor_methods/{method_id}

Delete a user’s existing two-factor authentication method

Path variables

id
string GUID required

The user (identifier) whose two-factor authentication method will be deleted

Example:
993d849e-b5b0-be3e-1486-9334200757cd
method_id
string GUID required

The two-factor authentication method (identifier) that will be deleted

Example:
30213192-3bd2-868e-128e-b93495526e8f

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

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/users/993d849e-b5b0-be3e-1486-9334200757cd/two_factor_methods/30213192-3bd2-868e-128e-b93495526e8f HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 204 No Content 
List User Two-Factor Authentication Methods
GET /users/{id}/two_factor_methods

Retrieve a list of a user’s two-factor authentication methods based on search criteria (e.g. all methods)

Path variables

id
string GUID required

The user (identifier) whose two-factor authentication methods will be retrieved

Example:
2c317000-5d39-bec9-a1d3-037b9a17057e

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 two-factor authentication method identifier

Example:
e44d7b18-c4b1-c7d7-30ef-7e5a01c77cf0
method
string

Defines the type of the user 2FA method

Enumeration:
TOTP
value
string

The two-factor authentication obfuscated value (applicable only for email and phone based methods)

Example:
j_*****@crm.com
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/users/2c317000-5d39-bec9-a1d3-037b9a17057e/two_factor_methods HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "zerd7b18-c4b1-c7d7-30ef-7e5a01c77cd0",
            "method": "GOOGLE"
        },
        {
            "id": "e44d7b18-c4b1-c7d7-30ef-7e5a01c77cf0",
            "method": "EMAIL",
            "value": "j_*****@crm.com"
        }
    ]
}
User Two-Factor Authentication Method Actions
PUT /users/{id}/two_factor_methods/{method_id}/actions

Perform actions on a user’s newly added two-factor authentication method

Path variables

id
string GUID required

The user (identifier) whose two-factor authentication method will be updated

Example:
993d849e-b5b0-be3e-1486-9334200757cd
method_id
string GUID required

The two-factor authentication method that actions will be applied on

Example:
0bb44610-f77c-85e0-f8a1-d35da22f5c78

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Request body

Object
action
string required

The action that will be applied on the two-factor authentication method

Enumeration:
VERIFY
code
string required

The 6-digit verification code (required for VERIFY action)

Example:
123456

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The two-factor authentication method identifier

Example:
0bb44610-f77c-85e0-f8a1-d35da22f5c78
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/users/993d849e-b5b0-be3e-1486-9334200757cd/two_factor_methods/0bb44610-f77c-85e0-f8a1-d35da22f5c78/actions HTTP/1.1 

Content-Type: application/json

{
    "action": "VERIFY",
    "code": "123456"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "0bb44610-f77c-85e0-f8a1-d35da22f5c78"
}
Generate User Two-Factor Authentication Backup Code
POST /users/{id}/two_factor_methods/backup

Generate a new back-up code (unique 24-alphanumeric character code) as part of a user’s two-factor authentication method

Path variables

id
string GUID required

The user (identifier) for which a two-factor authentication backup code will be generated

Example:
993d849e-b5b0-be3e-1486-9334200757cd

Notes

BACK-UP CODE

Back-up code can be used for authentication purposes (sign-in) when user forgets all two-factor authentication methods does not have access to them

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

Responses

200 OK

The request has succeeded

Body
Object
backup_code
string

The two-factor authentication back-up code

Example:
ybkc-efxv-rggd-qtdv-xckg
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/users/993d849e-b5b0-be3e-1486-9334200757cd/two_factor_methods HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "backup_code": "1234567891234567891234"
}
Wallets
POST /contacts/{id}/wallets
GET /wallets/{id}
GET /wallets/{id}/topup_settings
PUT /wallets/{id}/limits
GET /wallets/{id}/limits
PUT /wallets/{id}
PUT /wallets/{id}/currencies
GET /wallets
GET /wallets/{id}/commerce_balances
GET /wallets/{id}/statement
GET /wallets/{id}/statement_details
Request Wallet One Time Password
POST /wallets/otp

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
identity
Object
type
string
Example:
PHONE
value
string
Example:
some_email@email.com
country_code
string

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
GET https://sandbox.crm.com/backoffice/v1/wallets/otp HTTP/1.1 

Content-Type: application/json

{
    "identity": {
        "type": "PHONE",
        "value": "some_email@email.com"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "otp": ""
}
Set Up Wallet
POST /contacts/{id}/wallets

Path variables

id
string required

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
code
string

The Wallet’s code. If not specified, then a unique and random 16-digit code is assigned to the Wallet.

Example:
994434532330012
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
otp
string
identity
Object

The Wallet’s identity which can either b the contact’s email or phone

type
string
Enumeration:
EMAIL
PHONE
Example:
EMAIL
value
string

Email address or phone number depending on the identity type

Example:
john.smith@email.com
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP

Responses

201 Created
Body
Object
id
string

The wallet’s identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/{id}/wallets HTTP/1.1 

Content-Type: application/json

{
    "code": "994434532330012",
    "currency_code": "EUR",
    "otp": "",
    "identity": {
        "type": "EMAIL",
        "value": "john.smith@email.com",
        "country_code": "CYP"
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Get Wallet
GET /wallets/{id}

Retrieves detailed information of a single Wallet.

Path variables

id
string required

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
code
string
balances
Array
Object
type
string
Enumeration:
BUSINESS
currency_code
string
total
number
open
number
commerce
number
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/wallets/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "",
    "code": "",
    "balances": [
        {
            "type": "BUSINESS",
            "currency_code": "",
            "total": 1,
            "open": 1,
            "commerce": 1
        }
    ]
}
Get Wallet Topup Settings
GET /wallets/{id}/topup_settings

Retireves the wallet’s Auto and Termed Top up settings, if any specified by the customer.

Path variables

id
string required

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
auto_topup
Object
threshold
number
Example:
0.01
amount
number
Example:
10.5
currency_code
string
Example:
EUR
payment _method
Object
type
string
Example:
CARD
id
string
Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
identifier
string
Example:
****1234
termed_topup
Object
amount
number
Example:
10.5
currency_code
string
frequency
Object
period
string
Example:
MONTHS
value
integer
Example:
1
topup_day
Object
day_of_month
integer
Example:
1
day_of_week
string
Example:
THURSDAY
payment_method
Object
type
string
Example:
CARD
id
string
Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
identifier
string
Example:
****1234
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/wallets/{id}/topup_settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "auto_topup": {
        "threshold": 0.01,
        "amount": 10.5,
        "currency_code": "EUR",
        "payment _method": {
            "type": "CARD",
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "identifier": "****1234"
        }
    },
    "termed_topup": {
        "amount": 10.5,
        "currency_code": "",
        "frequency": {
            "period": "MONTHS",
            "value": 1
        },
        "topup_day": {
            "day_of_month": 1,
            "day_of_week": "THURSDAY"
        },
        "payment_method": {
            "type": "CARD",
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "identifier": "****1234"
        }
    }
}
Update Wallet Limits
PUT /wallets/{id}/limits

Path variables

id
string required

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
limit_rules
Array
Object
name
string
Example:
Monthly topups
maximum_number
integer
Example:
1
maximum_amount
integer
Example:
200
currency_code
string
period
string
Example:
DAY
applies_for
Array
Example:
["DEBIT"]
string
Example:
DEBIT

Responses

200 OK
Body
Object
id
string
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/wallets/{id}/limits HTTP/1.1 

Content-Type: application/json

{
    "limit_rules": [
        {
            "name": "Monthly topups",
            "maximum_number": 1,
            "maximum_amount": 200,
            "currency_code": "",
            "period": "DAY",
            "applies_for": [
                "DEBIT"
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Get Wallet Limits
GET /wallets/{id}/limits

Retrieves the wallet’s limits

Path variables

id
string required

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
limit_rules
Array
Object
id
string
name
string
Example:
Monthly topups
maximum_number
integer
Example:
1
maximum_amount
integer
Example:
1
currency_code
string
period
string
Example:
DAY
applies_for
Array
Example:
["DEBIT"]
string
Example:
DEBIT
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/wallets/{id}/limits HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "limit_rules": [
        {
            "id": "",
            "name": "Monthly topups",
            "maximum_number": 1,
            "maximum_amount": 1,
            "currency_code": "",
            "period": "DAY",
            "applies_for": [
                "DEBIT"
            ]
        }
    ]
}
Update Wallet
PUT /wallets/{id}

Updates a single Wallet.

Path variables

id
string required

The unique identifier of the Wallet to be updated

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
auto_topup
Object
threshold
number
Example:
0.01
amount
number
Example:
10.5
payment_method
Object
type
string
id
string
termed_topup
Object
amount
number
Example:
10.5
frequency
Object
period
string
Example:
MONTHS
value
integer
Example:
1
topup_day
Object
day_of_month
integer
Example:
1
day_of_week
string
Example:
MONDAY
payment_method
Object
type
string
id
string
currencies
Array
Object
currency_code
string
Example:
EUR
is_primary
boolean
limit_rules
Array
Object
name
string
Example:
VIP
maximum_amount
number
Example:
9.99
maximum_number
integer
Example:
10
period
string
Example:
ANNUAL
transaction_type
Array
Example:
["TOPUP"]
string
Example:
TOPUP

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated Wallet

Example:
3ac0809f-ed91-4b68-b912-5bd6064d901e
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/wallets/{id} HTTP/1.1 

Content-Type: application/json

{
    "auto_topup": {
        "threshold": 0.01,
        "amount": 10.5,
        "payment_method": "CARD",
        "payment_method_id": ""
    },
    "termed_topup": {
        "amount": 10.5,
        "frequency": {
            "period": "MONTHS",
            "value": 1
        },
        "topup_day": {
            "day_of_month": 1,
            "day_of_week": "MONDAY"
        },
        "payment_method": "CARD",
        "payment_method_id": ""
    },
    "currencies": [
        {
            "currency_code": "EUR",
            "is_primary": true
        }
    ],
    "limit_rules": [
        {
            "name": "VIP",
            "maximum_amount": 9.99,
            "maximum_number": 10,
            "period": "ANNUAL",
            "transaction_type": [
                "TOPUP"
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "3ac0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Wallet Currencies
PUT /wallets/{id}/currencies

Path variables

id
string required

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
currencies
Array
Object
currency_code
string
Example:
EUR

Responses

200 OK
Body
Object
id
string
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/wallets/{id}/currencies HTTP/1.1 

Content-Type: application/json

{
    "currencies": [
        {
            "currency_code": "EUR"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
List Wallets
GET /wallets

Returns a list of Wallets. Only Wallets related to the logged in user’s Business are returned per Web API call.

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
organisation_id
string optional

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

Wallet unique identifier

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

Wallet code. If not specified on creating the Wallet, the CRM.COM assigned a unique and random 16-digit code.

Example:
7767654434909989
contact
Object

The owner of the Wallet

id
string

Contact identifier

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

Contact code

Example:
0012023444
name
string

Contact full name

Example:
John Smith
balances
Array

The wallet’s balances in the primary currency. When Web API is called by a user of a Business, then only that business balances are returned. Triggering the Web API by a Cloud user additionally returns the CRM balance.

Object
type
string

Wallet balance type

Enumeration:
BUSINESS
CRM
Example:
BUSINESS
total
number

Total wallet balance

Example:
9.99
open
number

Open Balance

Example:
1.55
commerce
number

Commece Balance. Not available for CRM Balance

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

The Business at which the contact has a business walet balance. Appicable only for Cloud users.

id
string

Organisation identifier

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

Organisation name

Example:
Good Burgers
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/wallets HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "code": "7767654434909989",
            "contact": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "code": "0012023444",
                "name": "John Smith"
            },
            "balances": [
                {
                    "type": "BUSINESS",
                    "total": 9.99,
                    "open": 1.55,
                    "commerce": 8.45,
                    "currency_code": "EUR",
                    "organisation": {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "name": "Good Burgers"
                    }
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
List Wallet Commerce Balances
GET /wallets/{id}/commerce_balances

Retrieves a wallet’s business balance breakdown. The balance is returned per spend condition which credited the wallet’s business balance, along with the spend condition’s details

Path variables

id
string GUID required

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

Example:
234fbc54-bc32-1990-ce59-76c45e6377a8

Request parameters

commerce_pool_id
string GUID optional

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

Example:
234fbc54-bc32-1990-ce59-76c45e6377a8
include_expiration
boolean optional

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

Example:
true
currency_code
string optional

If not specified, then the balance breakdown of the wallet’s primary currency will be returned by default.

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

OK

Body
Array
Object
id
string GUID

The commerce pool condition identifier

Example:
234fbc54-bc32-1990-ce59-76c45e6377a8
name
string

The name of the spend condition group

Example:
Happy Hour
amount
number

The amount that is allocated to the specified spend condition

Example:
100.5
curency_code
string
organisations
Array

The organisations where the amount can be spent at

Object
id
string GUID

The organisation identifier

Example:
234fbc54-bc32-1990-ce59-76c45e6377a8
name
string

The name of the organisation

Example:
Cafe
locations
Array

The location of the organisation

Object

Information about the organisation’s location

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
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
products
Array

The products that the amount can be spent for

Object
item_type
string

The type of the ID to be provided

Enumeration:
PRODUCT
FAMILY
TYPE
BRAND
CATEGORY
Example:
PRODUCT
item_id
string GUID

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

Example:
234fbc54-bc32-1990-ce59-76c45e6377a8
name
string

The name of the product

Example:
Coffee
description
string

The descrtipion of the product

Example:
Brazilian Coffee
timings
Array

The time when the amount can be spent

Object
month
integer

The month as a condition (1-12)

Example:
1
day
integer

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

Example:
1
start_time
string

The start time of the day in 24 Hour format

Example:
19:00
end_time
string

The end time of the day in 24 Hour format

Example:
21:00
expiration
Object

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

zero_to_thirty
number

The amount that will expire in up to 30 days

Example:
50.5
thirty_to_sixty
number

The amount that will expire from 30 to 60 days

Example:
50.5
sixty_to_ninety
number

The amount that will expire from 60 to 90 days

Example:
50.5
ninety_plus
number

The amount that will expire in more than 90 days

Example:
50.5
400 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/wallets/234fbc54-bc32-1990-ce59-76c45e6377a8/commerce_balances HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "id": "234fbc54-bc32-1990-ce59-76c45e6377a8",
        "name": "Happy Hour",
        "amount": 100.5,
        "curency_code": "",
        "organisations": [
            {
                "id": "234fbc54-bc32-1990-ce59-76c45e6377a8",
                "name": "Cafe",
                "locations": [
                    {
                        "name": "Head Office",
                        "address_line_1": "Elia Papakyriakou 21",
                        "address_line_2": "7 Tower Stars",
                        "state_province_county": "Egkomi",
                        "town_city": "Nicosia",
                        "postal_code": "2415",
                        "country_code": "CY",
                        "lat": 35.157115,
                        "lon": 33.313719,
                        "google_place_id": "ChIJrTLr-GyuEmsRBfy61i59si0"
                    }
                ]
            }
        ],
        "products": [
            {
                "item_type": "PRODUCT",
                "item_id": "234fbc54-bc32-1990-ce59-76c45e6377a8",
                "name": "Coffee",
                "description": "Brazilian Coffee"
            }
        ],
        "timings": [
            {
                "month": 1,
                "day": 1,
                "start_time": "19:00",
                "end_time": "21:00"
            }
        ],
        "expiration": {
            "zero_to_thirty": 50.5,
            "thirty_to_sixty": 50.5,
            "sixty_to_ninety": 50.5,
            "ninety_plus": 50.5
        }
    }
]
Create Wallet Journal - DEL
POST /journals

Creates a Wallet Journal Entry that either debits or credits the wallet. A single journal entry is created per Web API call.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
wallet_id
string GUID required

The unique identifier for which the journal entry will be created

Example:
234fbc54-bc32-1990-ce59-76c45e6377a8
amount
number required

The amount of the journal

Example:
10
currency_code
string

If not specified, then the wallet’s primary currency is used to log the journal entry

Example:
EUR
description
string

The description of the journal

Example:
Credit adjustment by 10 EUR
type
string required

The type of the journal

Enumeration:
CREDIT
DEBIT
Example:
CREDIT
spend_condition_id
string GUID

The unique identifier of the related spend condition. If specified, then the journal entry’s amount is move to the wallet’s business balance

Example:
234fbc54-bc32-1990-ce59-76c45e6377a8
valid_from
integer epoch

The valid from date

Example:
1587988965
valid_to
integer epoch

The valid to date

Example:
1587988965
created_on
integer epoch

The date and time when the journal actually created

Example:
1588081851
allow_below_zero
boolean

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

Example:
true

Responses

200 200

OK

Body
Object
id
string GUID

The wallet journal identifier

Example:
234fbc54-bc32-1990-ce59-76c45e6377a8
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://devapi.crm.com/backoffice/v1/journals HTTP/1.1 

Content-Type: application/json

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Get Wallet Statement
GET /wallets/{id}/statement

Returns the wallet’s statement for a period of time.

Path variables

id
string required

Request parameters

as_of_date
string optional

The date as of which the statement wll be produced

Example:
1635324343
currency_code
string optional

If not specified, then the wallet’s statement is produced for all of its supported currencies

Example:
EUR

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
from_date
integer
Example:
1635324134
to_date
integer
Example:
1635324134
currency_code
string
Example:
EUR
opening_balances
Array
Object
type
string
Enumeration:
BUSINESS
Example:
BUSINESS
total
number
Example:
0.03
open
number
Example:
0.01
commerce
number
Example:
0.02
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/wallets/{id}/statement?currency_code=EUR HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "",
    "from_date": 1635324134,
    "to_date": 1635324134,
    "currency_code": "EUR",
    "opening_balances": [
        {
            "type": "BUSINESS",
            "total": 0.03,
            "open": 0.01,
            "commerce": 0.02
        }
    ]
}
Get Wallet Statement Details
GET /wallets/{id}/statement_details

Returns the wallet’s statement that ncludes a list of wallet jounals performed within a period of time

Path variables

id
string required

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
currency_code
string optional

If not specified, then the statement is produced based on the wallet’s primary currency

Example:
EUR
as_of_date
string optional

The date as of which the statement will be produced

Example:
1635324343

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
date
integer
Example:
312321312312
amount
number
Example:
0.01
currency_code
string
Example:
EUR
type
string
Enumeration:
DEBIT
CREDIT
activity
Object
type
string
Example:
PURCHASE
id
string
reference
string
Example:
P0123922
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/wallets/{id}/statement_details HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "",
            "date": 312321312312, 
            "amount": 0.01,
            "currency_code": "EUR",
            "type": "DEBIT",
            "activity": {
                "type": "PURCHASE",
                "id": "",
                "reference": "P0123922"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Payment Methods
PUT /wallets/{id}/payment_methods/{payment_method_id}
GET /wallets/{id}/payment_methods
DELETE /contacts/{id}/payment_methods/{payment_method_id}
Update Payment Method
PUT /wallets/{id}/payment_methods/{payment_method_id}

Update a payment method for the wallet

Path variables

id
string required

The payment method id that will be updated

payment_method_id
string required

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
notes
string

Notes related to te payment method

account_debit
Object

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

The unique identifier of the updated payment method

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/wallets/payment_methods/{id} HTTP/1.1 

Content-Type: application/json

{
    "name": "",
    "notes": "",
    "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": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Payment Methods
GET /wallets/{id}/payment_methods

List of Payment methods allocated to the wallet

Path variables

id
string GUID required

The wallet identifier for which the payment methods will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

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

Filters the contact’s payment methods based on type

Enumeration:
CARD

Credit/Debit/Prepaid cards

WALLET

Wallet related to either a card, bank account or has a monetary value

ACCOUNT_DEBIT

Collect money directly from an account

Example:
CARD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The payment method identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string
payment_method_type
string

The type of the event

Enumeration:
CARD

Credit/Debit/Prepaid cards

WALLET

Wallet related to either a card, bank account or has a monetary value

ACCOUNT_DEBIT

Collect money directly from an account

Example:
CARD
card
Object

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
funding_type
string

The type of the event

Enumeration:
CREDIT
DEBIT
PREPAID
Example:
CREDIT
first6
string

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

last4
string

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

expiration_month
integer

The card expiration month

Example:
1
expiration_year
integer

The card expiration year

Example:
2020
country_of_issue
string

The card issue country (3 char country code)

Example:
CYP
cvc
string
card_holder_details
Object

Information about the card holder

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
Object
token
string
gateway
string nullable
Enumeration:
JCC
JCC_MERCHANT
SETTLE
integration
Object nullable
id
string
name
string
account_debit
Object

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

account_name
string
account_number
string

The bank account number.

Example:
001002001
iban
string

The IBAN code.

Example:
0143240434320434
bank
string

The name of the customer’s bank

Example:
Barclays
bank_code
string

Institution number of the customer’s bank.

Example:
0032933-1123
branch
string

The identifier of the bank branch

Example:
Ascot
swift
string

The bank account swift number

Example:
12345678
sort_code
string

The sort code

Example:
20-02-53
country
string

The country the bank account is located in.

Example:
CY
currency
string
Example:
EUR
account_type
string

The type of the event

Enumeration:
SAVINGS
CHECKING
BUSINESS_CHECKING
Example:
SAVINGS
mandate
Object
reference
string
sign_date
integer
termination_date
integer
type
string

The mandate (sequence) type

Enumeration:
FIRST
FINAL
RECURRING
ONEOFF
account_holder_details
Object
account_holder_name
string
address_line_1
string
address_line_2
string
address_city
string
address_state
string
address_zip
string
address_country
string
gateway_token
Array
Object
token
string
gateway
string nullable
Enumeration:
JCC
JCC_MERCHANT
SETTLE
integration
Object nullable
id
string
name
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
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/wallets/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "name": "",
            "payment_method_type": "CARD",
            "card": {
                "name": "Default Card",
                "brand": "VISA",
                "funding_type": "CREDIT",
                "first6": "",
                "last4": "",
                "expiration_month": 1,
                "expiration_year": 2020,
                "country_of_issue": "CYP",
                "cvc": "",
                "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": [
                    {
                        "token": "",
                        "gateway": "JCC_MERCHANT",
                        "integration": {
                            "id": "",
                            "name": ""
                        }
                    }
                ]
            },
            "account_debit": {
                "account_name": "",
                "account_number": "001002001",
                "iban": "0143240434320434",
                "bank": "Barclays",
                "bank_code": "0032933-1123",
                "branch": "Ascot",
                "swift": "12345678",
                "sort_code": "20-02-53",
                "account_type": "SAVINGS",
                "mandate": {
                    "reference": "",
                    "sign_date": 1
                },
                "gateway_token": [
                    {
                        "token": "",
                        "gateway": "JCC",
                        "integration": {
                            "id": "",
                            "name": ""
                        }
                    }
                ]
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Delete Payment Method
DELETE /contacts/{id}/payment_methods/{payment_method_id}

Deletes a payment method for the wallet

Path variables

id
string required

The id of the contact

Example:
JGKDJHAK76786JUGJHDG
payment_method_id
string required

The id of the payment method.

Example:
SHDGJKSHDJKHS86876HGFHDGSFHSF

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/v1/contacts/JGKDJHAK76786JUGJHDG/payment_methods/SHDGJKSHDJKHS86876HGFHDGSFHSF HTTP/1.1 

HTTP/1.1 204 No Content 
Settings - Configuration
Accounts
GET /accounts/settings
PUT /accounts/settings
GET /accounting_periods
Get Account Settings
GET /accounts/settings

Retrieve Account Settings

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
name_settings
string

Shows how the account name will be automatically set

Enumeration:
NUMBER

Account name is the same as the account number

NUMBER_NAME

Account name is set as the account’s numer and the contact’s name

Default:
NUMBER
Example:
NUMBER
allocation_settings
string

The allocation principle applied on crediting an account

Enumeration:
FIFO

First-In-First-Out. Credit transactions allocated to the oldest unallocated debit

FIFO_AGAINST_ITEM

Credit transaction allocated against specified debit transaction and if there’s remaining amount, then this is allocated based on FIFO

Default:
FIFO
Example:
FIFO
accounting_period_settings
Object

Settings related to how accounting periods are managed

close_months_before
integer

Accounting period closes automatically X months after its end date

Default:
1
Example:
1
credit_terms_settings
Object

Account Credit Terms that include default Credit Limit and Payment Terms

credit_limit
number

The default Credit Limit that a contact will be assigned when creating a new Account. Defined in the business’s base currency

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

Payment Terms define when debit trasnactions will be due.

id
string

Payment terms unique identifier

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

Label of Payment Terms

Example:
Net 7
net_term_days
integer

Number of days within which an Invoice is due to be paid

Example:
7
conditional_terms
Array

Conditional Credit Terms. If specified, then an account’s credit limit and/or Payment Terms will be differentiated compared to the default rules. Conditional rules are applied based on the account owner’s classification.

Object
id
string

Conditional term rule identifier

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

Conditional term rule name

Example:
VIP account owners credit terms
credit_limit
number

Credit limit to be applied on account owners with the related classiciation

Example:
8.99
payment_terms
Object

Payment Terms to be applied on account owners with the related classification

id
string

Payment terms identifier

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

Payment terms label

Example:
Net 7
net_term_days
integer

Number of days within which an Invoice is due to be paid

Example:
7
account_classifications
Array

The account classificationa that meet the conditions in orer to apply the conditional credit terms. Each classification is specified once per conditioal credit terms rules

Min items: 1
Unique items: YES
Object
id
string

Account Classification identifier

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

Account Classification name

Example:
VIP
numbering_schemes
Array

Numbering schemes used for Accounts, Invoices and Credit Notes

Object

The type of the event

entity
string required

The entity for which the numbering scheme is configured

Enumeration:
INVOICES
CREDIT_NOTES
PAYMENTS
REFUNDS
ORDERS
SERVICE_REQUESTS
Example:
SERVICE_REQUESTS
prefix
string

The prefix of the numbering scheme. Defaults to the first letter(s) of the entity’s name

Example:
SR
starting_number
string

The starting number of the nuberig scheme (excluding prefix). Defaults to 10001

Default:
10001
Example:
0000001
number_of_digits
string

Number of digits (excluding prefix). Defaults to 5

Default:
5
Example:
7
last_number
string

The last number generated for this numbering scheme

Example:
SR000001
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/settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name_settings": "NUMBER",
    "allocation_settings": "FIFO",
    "accounting_period_settings": {
        "close_months_before": 1
    },
    "credit_terms_settings": {
        "credit_limit": 9.99,
        "currency_code": "EUR",
        "payment_terms": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "label": "Net 7",
            "net_term_days": 7
        },
        "conditional_terms": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "VIP account owners credit terms",
                "credit_limit": 8.99,
                "payment_terms": {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "label": "Net 7",
                    "net_term_days": 7
                },
                "account_classifications": [
                    {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "name": "VIP"
                    }
                ]
            }
        ]
    },
    "numbering_schemes": [
        {
            "entity": "SERVICE_REQUESTS",
            "prefix": "SR",
            "starting_number": "0000001",
            "number_of_digits": "7",
            "last_number": "SR000001"
        }
    ]
}
Update Account Settings
PUT /accounts/settings

Update the generic account settings

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_settings
string

Shows how the account name will be automatically set

Enumeration:
NUMBER

Account name is the same as the account number

NUMBER_NAME

Account name is the same as the account number and contact’s name

Default:
NUMBER
Example:
NUMBER
allocation_settings
string required

The allocation principle applied on crediting an account

Enumeration:
FIFO

First-In-First-Out. Credit transactions allocated to the oldest unallocated debit

FIFO_AGAINST_ITEM

Credit transaction allocated against specified debit transaction and if there’s remaining amount, then this is allocated based on FIFO

Default:
FIFO
Example:
FIFO
accounting_period_settings
Object

Settings related to how accounting periods are managed

close_months_before
integer

Accounting period closes automatically X months after its end date

Default:
1
Example:
3
credit_terms_settings
Object

Account Credit Terms that include default Credit Limit and Payment Terms

credit_limit
number

The default Credit Limit that a contact will be assigned when creating a new Account. Defined in the business’s base currency. The Credit Limits defines the maximum allowed balance per account. This limit is never exceeded.

Example:
9.99
payment_terms_id
string

Payment Terms define when debit trasnactions will be due.

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

Conditional Credit Terms. If specified, then an account’s credit limit and/or Payment Terms will be differentiated compared to the default rules. Conditional rules are applied based on the account owner’s classification. Credit term rules specified in base currency of the business.

Object
name
string

Conditional terms rule name. Has to be unique across rule names

Example:
VIP credit terms
credit_limit
number required nullable

Credit limit to be applied on account owners with the related classiciation.

Example:
8.99
payment_terms_id
string required nullable

Payment Terms to be applied on account owners with the related classiciation

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
account_classifications
Array required

Account classifications for which the conditional terms apply. At least one must be specified. Each classification is specified once per conditioal credit terms rules

Min items: 1
Unique items: YES
Object
id
string

The classification’s ientifier

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

Numbering schemes used for Accounts, Invoices and Credit Notes

Object
entity
string required

The entity for whichthe numberig scheme is specified

Enumeration:
ACCOUNTS
INVOICES
CREDIT_NOTES
Example:
ACCOUNTS
prefix
string

The numbering scheme’s prefix. “A” for Accounts, “I” for Invoices ad “CR” for Credit Notes

number_of_digits
integer

Number of dgitis following the scheme’s Prefix

Default:
5
Example:
5
starting_number
string

Starting number of the scheme.

Default:
10001
Example:
00001

Responses

200 200

Successful Request

Body
Object
id
string

Unique identifier of Account Settings

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/settings HTTP/1.1 

Content-Type: application/json

{
    "name_settings": "NUMBER",
    "allocation_settings": "FIFO",
    "accounting_period_settings": {
        "close_months_before": 3
    },
    "credit_terms_settings": {
        "credit_limit": 9.99,
        "payment_terms_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "conditional_terms": [
            {
                "name": "VIP credit terms",
                "credit_limit": 8.99,
                "payment_terms_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "account_classifications": [
                    {
                        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
                    }
                ]
            }
        ]
    },
    "numbering_schemes": [
        {
            "entity": "ACCOUNTS",
            "prefix": "",
            "number_of_digits": 5,
            "starting_number": "00001"
        }
    ]
}
List Accounting Periods
GET /accounting_periods

Retrieve the Accounting Periods

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

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array
Object
id
string

The unique identifier of the accounting period

Example:
8d734d8b-abef-4e06-a6cf-d3efd5496590
name
string

The name of the accounting period (month and year)

Example:
MARCH2022
number
string

A unique number fo the accounting period (month and year)

Example:
032022
state
string

Defines whether the accounting period is open or closed. A single accounting period can be set as Open over time

Enumeration:
OPEN
CLOSED
Example:
OPEN
from_date
integer

The first day of the accounting period

Example:
1646092800
to_date
integer

The last day of the accounting period

Example:
1648771199
closed_date
integer

The date on which the accounting period was closed

Example:
1648771199
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/accounting_periods HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "8d734d8b-abef-4e06-a6cf-d3efd5496590",
            "name": "MARCH2022",
            "number": "032022",
            "state": "OPEN",
            "from_date": 1646092800,
            "to_date": 1648771199,
            "closed_date": 1648771199
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Account Classifications
POST /accounts/classifications
PUT /accounts/classifications/{id}
DELETE /accounts/classifications/{id}
GET /accounts/classifications
Create Account Classifications
POST /accounts/classifications

Creates a new account classification. Each classification must have a unique 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

Request body

Object
name
string required

The name of the classification to be created. The nae of the classification must be unique

Example:
VIP
is_default
boolean

Determines whether it’s the default classification

Default:
false
Example:
true

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier of the classification

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/classifications HTTP/1.1 

Content-Type: application/json

{
    "name": "VIP",
    "is_default": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Account Classification
PUT /accounts/classifications/{id}

Update a specific account classification

Path variables

id
string GUID required

The account classification identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
name
string nullable

The name of the classification which must be unique across the lis tof account classifications

Example:
VIP
is_default
boolean nullable

Determines whether it’s the default classification

Default:
false
Example:
true

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the account classification

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/classifications/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Content-Type: application/json

{
    "name": "VIP",
    "is_default": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Account Classification
DELETE /accounts/classifications/{id}

Delete a specific account classification

Path variables

id
string GUID required

The account classification identifier that will be deleted

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

Request body

Responses

204 204

Successful Request

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/accounts/classifications/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

HTTP/1.1 204 No Content 
List Account Classifications
GET /accounts/classifications

List all the available account classifications

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

The name of the account classification

Example:
VIP

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array
Object
id
string

The account lassification’s unique identifier

Example:
7b3a5787-1f0f-4062-b373-df2ecf943658
name
string

The name of the account classification

Example:
Normal
is_default
boolean

Marks the default account classification.

Example:
true
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/accounts/classifications HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "7b3a5787-1f0f-4062-b373-df2ecf943658",
            "name": "Normal",
            "is_default": true
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Payment Terms
GET /payment_terms
PUT /payment_terms/
Get Payment Terms
GET /payment_terms

List all the available Payment Terms

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
search_value
string optional

The name of the Payment Term

Example:
Net 7

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array
Object
id
string

Payment Terms unique identifier

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

Payment Terms name

Example:
Net 7
net_term_days
integer

The payment terms number of days, i.e. the credit period’s duration

Example:
7
is_default
string

Marks the default payment terms

Example:
true
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/payment_terms HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Net 7",
            "net_term_days": 7,
            "is_default": "true"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Payment Terms
PUT /payment_terms/

Updates the set of available Payment Terms.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
content
Array
Object
id
string required

The unique identifier of the payment term to be updated

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

Payment terms name. If not specified, then the name is automaticalyl set as “Net” plus the number of payment terms days

Example:
Net 7
net_term_days
integer required

Payment mterms days

Example:
7

Responses

200 200

Successful Request

Body
Object
id
string GUID

The unique identifier account settings

Example:
4AD9C84FA60F9FE407140E20F707726A
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/payment_terms/ HTTP/1.1 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Net 7",
            "net_term_days": 7
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4AD9C84FA60F9FE407140E20F707726A"
}
Activities
Activity Types
POST /activities/types
PUT /activities/types/{id}
DELETE /activities/types/{id}
GET /activities/types
GET /activities/types/{id}
Create Activity Type
POST /activities/types

Create an activity type

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 activity type (unique) name

Example:
Installations
description
string nullable

The activity type description

Example:
A contact requires an installation of some sorts.
color
string nullable

The activity type (unique) color that will be used for visual identification

Example:
FAC9990
Examples

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The activity type identifier

Example:
abcfd606-3a2c-2cb2-5650-d0d3fc8ba893
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/types HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Installations",
    "description": "A contact requires an installation of some sorts.",
    "color": "FAC9990"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "abcfd606-3a2c-2cb2-5650-d0d3fc8ba893"
}
Update Activity Type
PUT /activities/types/{id}

Update an existing activity type

Path variables

id
string GUID required

The activity type (identifier) that will be updated

Example:
abcfd606-3a2c-2cb2-5650-d0d3fc8ba893

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 activity type (unique) name

Example:
Installations
state
string nullable

The type of the activity

Enumeration:
ACTIVE
INACTIVE
description
string nullable

The activity type description

Example:
A contact requires an installation of some sorts.
color
string nullable

The activity type (unique) color that will be used for visual identification

Example:
FAC9990
Examples

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The activity type identifier

Example:
abcfd606-3a2c-2cb2-5650-d0d3fc8ba893
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/types/abcfd606-3a2c-2cb2-5650-d0d3fc8ba893 HTTP/1.1 

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

{
    "name": "Installations",
    "state": "Active",
    "description": "A customer requires an installation of some sorts.",
    "color": "FAC9990",
    "owner": [
        {
            "user id": "4KHSKUFGKNS8369874KJGJKS",
            "name": "John Smith"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "abcfd606-3a2c-2cb2-5650-d0d3fc8ba893"
}
Delete Activity Type
DELETE /activities/types/{id}

Delete an existing activity type

Path variables

id
string GUID required

The activity type (identifier) that will be deleted

Example:
abcfd606-3a2c-2cb2-5650-d0d3fc8ba893

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/types/abcfd606-3a2c-2cb2-5650-d0d3fc8ba893 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Activity Types
GET /activities/types

Retrieve a list of activity types based on search criteria (e.g. all active activity types)

Request parameters

search_value
string optional

Filter based on name (behave as like)

Example:
installation
state
string optional

Filter based on activity type state

Enumeration:
ACTIVE
INACTIVE
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 type identifier

Example:
74D9C84FA60F9FE407140E20F707726A
name
string

The activity type (unique) name

Example:
Billing Issues
description
string

The activity type description

Example:
The user requires installation of some type.
color
string

The activity type (unique) color that will be used for visual identification

Example:
F56CSD
state
string

The activity type state

Example:
Active
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/activity_types HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "74D9C84FA60F9FE407140E20F707726A",
            "name": "Billing Issues",
            "description": "The user requires installation of some type.",
            "color": "F56CSD",
            "state": "Active"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Activity Type
GET /activities/types/{id}

Retrieve detailed information for an activity type

Path variables

id
string GUID required

The activity type (identifier) that will be retrieved

Example:
45930303-926d-a7d2-3dcd-174a32580323

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 activity type identifier

Example:
45930303-926d-a7d2-3dcd-174a32580323
name
string

The activity type name

Example:
Installation
state
string

The type of the activity

Enumeration:
ACTIVE
INACTIVE
description
string

The activity type description

Example:
The user requires an installation of some sorts.
color
string

The activity type (unique) color that will be used for visual identification

Example:
TRD45F
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/types/45930303-926d-a7d2-3dcd-174a32580323 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "45930303-926d-a7d2-3dcd-174a32580323",
    "name": "Installation",
    "state": "ACTIVE",
    "description": "The user requires an installation of some sorts.",
    "color": "TRD45F"
}
Business Network
GET /business_network/settings
PUT /business_network_settings
Get Business Network Settings
GET /business_network/settings

Retrieve business network settings

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
model
string

Defines which organisation types will consist the business network

Enumeration:
MERCHANT_VENUE

Merchants & Venues will be supported

SERVICE_PROVIDER_POINT

Service Providers & Service Points will be supported

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/business_network/settings HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "model": "SERVICE_PROVIDER_POINT"
}
Set Business Network Settings
PUT /business_network_settings

Update the generic business network settings

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

Defines which organisation types will consist the business network

Enumeration:
MERCHANT_VENUE

Merchants & Venues will be supported

SERVICE_PROVIDER_POINT

Service Providers & Service Points will be supported

Default:
MERCHANT_VENUE

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
55b2ac29-f2b1-396f-75f8-f4418ae5f983
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/business_network_settings HTTP/1.1 

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

{
    "model": "MERCHANT_VENUE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "55b2ac29-f2b1-396f-75f8-f4418ae5f983"
}
B2B Settlement
PUT /community_commerce
GET /community_commerce
GET /settlement_transactions
Set Community Commerce
PUT /community_commerce

Update the community commerce settings (e.g. B2B Settlement)

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

Details about settlement settings (required if settlement is enabled)

enable_settlement
boolean required

Defines whether settlement is enabled or not

Example:
false
settlement_evaluation
string nullable

Defines when settlement will take place

Enumeration:
REAL_TIME
HOURLY
DAILY
WEEKLY
MONTHLY
Default:
DAILY
frequency
string nullable

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
settlement_fees
Object nullable

Details about the settlement fee(s) that will be applied on award and/or spend transactions (applicable only if settlement is enabled)

enable_settlement_fees
boolean required

Defines whether settlement fees will be applied or not

Example:
true
fee_type
string required

Defines whether the related type will be amount or percentage based

Enumeration:
AMOUNT
PERCENTAGE
default_award_fee
number required

Defines the default fee on award that will be applied on all organisations (merchants/service providers)

Example:
1.99
default_spend-fee
number required

Defines the default fee on spend that will be applied on all organisations (merchants/service providers)

Example:
2.91
explicit_fees
Array nullable

Defines the fees that will be applied explicitly on specific organisations (merchants/service providers)

Object
entity_type
string required

Defines the entity type that fees will be explicitly applied

Enumeration:
ORGANISATION
entity_id
string GUID required

Defines the entity identifier that fees will be explicitly applied

Example:
3a4ff705-356d-16e4-d5f7-dd5e7c3c29d5
award_fee
number nullable

The explicit award fee

Example:
5.91
spend_fee
number nullable

The explicit spend fee

Example:
1.99
settlement_rules
Object nullable

Defines the settlement rules that will be applied during settlement (e.g. financial transaction types)

financial_transactions
Object nullable

Defines the financial transaction types that will be used when posting a payment/payout during settlement

payment_type_id
string GUID nullable

The payment type identifier that will be used. If not specified, then the default type will be used

Example:
cf916e07-0f19-4640-a800-3fc9b3ba509c
payout_type_id
string GUID nullable

The payout type identifier that will be used. If not specified, then the default type will be used

Example:
4ff4cefb-05c7-2db6-19f7-917e6770219b
amount_allowance
Object nullable

Defines the min/max amount that can be settled against an organisation account

min_amount
number nullable

The min amount that can be settled against an organisation account

Example:
99.99
max_amount
number nullable

The max amount that can be settled against an organisation account

Example:
999.99

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
a331211c-7a48-c107-096e-870a574f0e85
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/community_commerce HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "settlement_settings": {
        "enable_settlement": "false",
        "settlement_evaluation": "DAILY",
        "frequency": "0 0 12 * * ?"
    },
    "settlement_fees": {
        "enable_settlement_fees": "true",
        "fee_type": "AMOUNT",
        "default_award_fee": 1.99,
        "default_spend-fee": 2.91,
        "explicit_fees": [
            {
                "entity_type": "ORGANISATION",
                "entity_id": "3a4ff705-356d-16e4-d5f7-dd5e7c3c29d5",
                "award_fee": 5.91,
                "spend_fee": 1.99
            }
        ]
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a331211c-7a48-c107-096e-870a574f0e85"
}
Get Community Commerce
GET /community_commerce

Retrieve the community commerce settings (e.g. B2B Settlement)

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

Details about settlement settings

enable_settlement
boolean

Defines whether settlement is enabled or not

Example:
true
settlement_evaluation
string

Defines when settlement will take place

Enumeration:
REAL_TIME
HOURLY
DAILY
WEEKLY
MONTHLY
Default:
DAILY
frequency
string

The repeat frequency provided as a cron expression pattern

Example:
0 0 12 * * ?
settlement_fees
Object

Details about the settlement fee(s) that will be applied on award and/or spend transactions (applicable only if settlement is enabled)

enable_settlement_fees
boolean

Defines whether settlement fees will be applied or not

Example:
true
fee_type
string

Defines whether the related type will be amount or percentage based

Enumeration:
AMOUNT
PERCENTAGE
default_award_fee
number

Defines the default fee on award that will be applied on all organisations (merchants/service providers)

Example:
1.98
default_spend_fee
number

Defines the default fee on spend that will be applied on all organisations (merchants/service providers)

Example:
9.99
explicit_fees
Array

Defines the fees that will be applied explicitly on specific organisations (merchants/service providers)

Object
entity_type
string

Defines the entity type that fees will be explicitly applied

Enumeration:
ORGANISATION
Example:
ORGANISATION
entity
Object

Defines the entity that fees will be explicitly applied

id
string GUID

Defines the entity (identifier) that fees will be explicitly applied

Example:
4c6a4cbb-7b47-b360-0654-e50cb52bd891
name
string

Defines the entity (name) that fees will be explicitly applied

Example:
Nice Restaurant
entity_id
string

Defines the entity (identifier) that fees will be explicitly applied

Example:
3a4ff705-356d-16e4-d5f7-dd5e7c3c29d5
award_fee
number

The explicit award fee

Example:
5.91
spend_fee
number

The explicit award fee

Example:
1.99
settlement_rules
Object

Defines the settlement rules that will be applied during settlement (e.g. financial transaction types)

financial_transactions
Object

Defines the financial transaction types that will be used when posting a payment/payout during settlement

payment_type
Object

Details about the payment type that should be used for settlement

id
string GUID

The payment type identifier

Example:
e2f0f36a-a192-35b1-f2f6-363a0ace9e15
name
string

The payment type name

Example:
Settlement Payment
payout_type
Object

Details about the payout type that should be used for settlement

id
string GUID

The payout identifier

Example:
bcff5929-8bc5-10ce-0bf5-6d659c314ae2
name
string

The payout name

Example:
Settlement Payout
amount_allowance
Object

Defines the min/max amount that can be settled against an organisation account

min_amount
number

The min amount that can be settled against an organisation account

max_amount
number

The max amount that can be settled against an organisation account

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/community_commerce HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "settlement_settings": {
        "enable_settlement": "true",
        "settlement_evaluation": "DAILY",
        "frequency": "0 0 12 * * ?"
    },
    "settlement_fees": {
        "enable_settlement_fees": "true",
        "fee_type": "AMOUNT",
        "default_award_fee": 1.98,
        "default_spend_fee": 9.99,
        "explicit_fees": [
            {
                "entity_type": "ORGANISATION",
                "entity": {
                    "id": "4c6a4cbb-7b47-b360-0654-e50cb52bd891",
                    "name": "Nice Restaurant"
                },
                "entity_id": "3a4ff705-356d-16e4-d5f7-dd5e7c3c29d5",
                "award_fee": 5.91,
                "spend_fee": 1.99
            }
        ]
    }
}
Get Settlement Transactions
GET /settlement_transactions

Retrieve the settlement transactions related to B2B Settlement

Request parameters

settlement_type
string optional

Filter based on the settlement transaction type

Enumeration:
AWARD

Award Transaction

SPEND

Spend Transaction

AWARD_FEE

Award Settlement Fee

SPEND_FEE

Spend Settlement Fee

accounting_type
string optional

Filter based on the accounting transaction type

Enumeration:
DEBIT
CREDIT
state
string optional

Filter based on settlement transaction state

Enumeration:
POSTED
CANCELLED
organisation_id
string GUID optional

Filters based on the organisation (identifier) that the settlement transaction is posted against

Example:
71c42a44-f8ce-919c-074e-b0a213ca3885
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

account_journal_entry_id
string GUID optional

Filter based on an account journal entry

Example:
4c156688-4d53-d0e4-e483-1809cacaaaca
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 settlement transaction identifier

Example:
daf23f03-e267-fe94-9965-5c81e9ab4a4d
settlement_type
string

Defines the settlement transaction type

Enumeration:
AWARD

Award Transaction

SPEND

Spend Transaction

AWARD_FEE

Award Settlement Fee

SPEND_FEE

Spend Settlement Fee

accounting_type
string

Defines the accounting type of the settlement transaction

Enumeration:
DEBIT
CREDIT
state
string

The settlement transaction status

Enumeration:
POSTED
CANCELLED
event_amount
number

The initial amount to be settled (before applying the applicable contribution/settlement fee)

Example:
2.22
settlement_amount
number

The amount to be settled (after contribution/settlement fee is applied)

Example:
20.12
fee
Object

The contribution/settlement fee that was applied on the settlement transaction

fee_type
string

Defines the fee type

Enumeration:
CONTRIBUTION

Contribution fee, applied on award transactions

SETTLEMENT

Settlement fee, applied on award/spend transactions

value_type
string

Defines whether the fee is amount or percentage based

Enumeration:
AMOUNT

Fee will be amount based

PERCENTAGE

Fee will be percentage based

value
number

The fee value

Example:
2.84
organisation
Object

The organisation that the settlement transaction is posted against

type
string

The organisation type

Enumeration:
MERCHANT
id
string GUID

The organisation identifier

Example:
f2c2d9ea-5a94-729d-0c45-7fdd1d540e7b
name
string

The organisation name

Example:
CRM
settlement_event
Object

Details about the event that initiated such settlement request

type
string

Defines the type of the event that is related to the settlement transaction

Enumeration:
PURCHASE
id
string GUID

The event identifier

Example:
598c02d3-1978-3585-3a3b-2311d6c94d1c
reference_number
string

The event reference number/code (if applicable)

Example:
2833205645375343
amount
number

The event amount

Example:
102.79
posted_date
integer epoch

The date on which the event was posted

Example:
1635170879
reward_offer
Object

Details about the reward offer (related to the award type)

id
string GUID

The reward offer identifier

Example:
1b5f5824-e05f-bb8e-d2ee-19eb5ed83240
name
string

The reward offer name

Example:
10% instant discount
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/settlement_transactions HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "daf23f03-e267-fe94-9965-5c81e9ab4a4d",
            "settlement_type": "AWARD",
            "accounting_type": "CREDIT",
            "state": "POSTED",
            "event_amount": 2.22,
            "settlement_amount": 20.12,
            "fee": {
                "fee_type": "CONTRIBUTION",
                "value_type": "AMOUNT",
                "value": 2.84
            },
            "organisation": {
                "type": "MERCHANT",
                "id": "f2c2d9ea-5a94-729d-0c45-7fdd1d540e7b",
                "name": "CRM"
            },
            "settlement_event": {
                "type": "PURCHASE",
                "id": "598c02d3-1978-3585-3a3b-2311d6c94d1c",
                "reference_number": "2833205645375343",
                "amount": 102.79,
                "posted_date": 1635170879
            },
            "reward_offer": {
                "id": "1b5f5824-e05f-bb8e-d2ee-19eb5ed83240",
                "name": "10% instant discount"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Organisation Groups
POST /organisations/groups
PUT /organisations/groups/{id}
DELETE /organisations/groups/{id}
GET /organisations/groups
GET /organisations/groups/{id}
Create Organisation Group
POST /organisations/groups

Create an organisation group

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

Example:
Seasonal
description
string nullable

The organisation group description

Example:
Lorem Ipsum

Responses

201 Created

The request has succeded

Body
Object
id
string GUID

The organisation group identifier

Example:
f68f4851-b02b-6eee-e0e7-d80f4a2dc8bd
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/groups HTTP/1.1 

Content-Type: application/json

{
    "name": "Seasonal",
    "description": "Lorem Ipsum"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "f68f4851-b02b-6eee-e0e7-d80f4a2dc8bd"
}
Update Organisation Group
PUT /organisations/groups/{id}

Update an existing organisation group

Path variables

id
string GUID required

The organisation group (identifier) that will be updated

Example:
867a46bd-bd1f-4312-073d-134ef2b98249

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

Example:
Seasonal
description
string nullable

The organisation group description

Example:
Lorem Ipsum

Responses

200 OK

The request has succeded

Body
Object
id
string GUID

The organisation group identifier

Example:
867a46bd-bd1f-4312-073d-134ef2b98249
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/groups/867a46bd-bd1f-4312-073d-134ef2b98249 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Seasonal",
    "description": "Lorem Ipsum"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "867a46bd-bd1f-4312-073d-134ef2b98249"
}
Delete Organisation Group
DELETE /organisations/groups/{id}

Delete an existing organisation group

Path variables

id
string GUID required

The organisation group (identifier) that will be deleted

Example:
f477a0d2-eb40-0e77-d3db-7ca729d04a5f

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/groups/f477a0d2-eb40-0e77-d3db-7ca729d04a5f HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Organisation Groups
GET /organisations/groups

Retrieve a list of organisation groups based on search criteria (e.g. all groups)

Request parameters

name
string optional

Filter based on the organisation group name

Example:
Nicosia Dinners

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

Information about the organisation groups

Object
id
string GUID

The organisation group identifier

Example:
b97b6dba-e118-12ca-d4a5-d17e8f897f2f
name
string

The organisation group name

Example:
Nicosia Dinners
description
string

The organisation group description

Example:
Lorem Ipsum
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/groups HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "b97b6dba-e118-12ca-d4a5-d17e8f897f2f",
            "name": "Nicosia Dinners",
            "description": "Lorem Ipsum"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Organisation Group
GET /organisations/groups/{id}

Retrieve detailed infromation for an organisation group

Path variables

id
string GUID required

The organisation group (identifier) that will be retrieved

Example:
9216e37e-f0d7-2ee7-7377-0cc66e134366

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 organisation group identifier

Example:
9216e37e-f0d7-2ee7-7377-0cc66e134366
name
string

The organisation group name

Example:
Seasonal
description
string

The organisation group description

Example:
Lorem Ipsum
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/groups/9216e37e-f0d7-2ee7-7377-0cc66e134366 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9216e37e-f0d7-2ee7-7377-0cc66e134366",
    "name": "Seasonal",
    "description": "Lorem Ipsum"
}
Communications
PUT /tracking_settings
GET /tracking_settings
Update tracking settings
PUT /tracking_settings

Updates the tracking settings of communications

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
enable_tracking
boolean

Enables the tracking functionality

Example:
true
track_end_point
string
track_custom_url
string
email_tracking_mode
string
Enumeration:
ALL
COMM_PLANS
link_tracking_mode
string
Enumeration:
ALL
COMM_PLANS

Responses

200 OK

The request has succeeded

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://devapi.crm.com/backoffice/v1/tracking_settings HTTP/1.1 

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

{
    "enable_tracking": true,
    "track_end_point": "",
    "track_custom_url": "",
    "email_tracking_mode": "ALL",
    "link_tracking_mode": "ALL"
}

HTTP/1.1 200 OK 
Get tracking settings
GET /tracking_settings

Retrieves the tracking settings for communications

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
application/json
Object
enable_tracking
boolean

Enables the tracking functionality

Example:
true
track_end_point
string
track_custom_url
string
email_tracking_mode
string
Enumeration:
ALL
COMM_PLANS
link_tracking_mode
string
Enumeration:
ALL
COMM_PLANS
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://devapi.crm.com/backoffice/v1/tracking_settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "enable_tracking": true,
    "track_end_point": "",
    "track_custom_url": "",
    "email_tracking_mode": "ALL",
    "link_tracking_mode": "COMM_PLANS"
}
Contacts
Generic
GET /contacts/settings
PUT /contacts/settings
Get Contact Settings
GET /contacts/settings

Returns the general system settings for contacts

Responses

200 200

The request has succeeded

Body
Object
name_display_settings
string

Name display setting defining how the contact name is presented throughout the software

Enumeration:
FIRST_LAST

first name, last name

LAST_FIRST

last name, first name

FIRST_MIDDLE_LAST

first name, middle name, last name

LAST_MIDDLE_FIRST

last name, middle name, first name

Example:
FIRST_LAST
cim_settings
Array

Contact Identification Medium (CIM) settings, how the contact is uniquely identified throughout the system

Object
medium
string

Medium type

Enumeration:
CARD

card number

PHONE

phone number

EMAIL

email address

GIFT_PASS

gift pass code

Example:
PHONE
is_enabled
boolean

Is the cim setting enabled? i.e. in use?

Example:
true
identities_settings
Object

Contact Identities settings, applying additional security precautions

require_verification
boolean

Defines whether credentials (username&password) will require verification or not

Example:
false
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/contact_generic_settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name_display_settings": "FIRST_LAST",
    "cim_settings": [
        {
            "medium": "PHONE",
            "is_enabled": true
        }
    ]
}
Update Contact Settings
PUT /contacts/settings

Update the generic contact system settings

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_display_settings
string

This setting defines how contact names will appear throughout the system

Enumeration:
FIRST_LAST

first name, last name

LAST_FIRST

last name, first name

FIRST_MIDDLE_LAST

first name, middle name, last name

LAST_MIDDLE_FIRST

last name, middle name, first name

Example:
FIRST_LAST
cim_settings
Array

Contact Identification Medium (CIM) settings, how the contact is uniquely identified throughout the system

Object
medium
string

Medium type

Enumeration:
CARD

card number

EMAIL

phone number

PHONE

email address

GIFT_PASS

gift pass code

Example:
PHONE
is_enabled
boolean

Is the cim setting enabled? i.e. in use?

Example:
true
identities_settings
Object

Contact Identities settings, applying additional security precautions

require_verification
boolean

Defines whether credentials (username&password) will require verification or not

Default:
true
Example:
false

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the organisation

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/contact_generic_settings HTTP/1.1 

Content-Type: application/json

{
    "name_display_settings": "FIRST_LAST",
    "cim_settings": [
        {
            "medium": "PHONE",
            "is_enabled": true
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Categories
POST /contact_categories
PUT /contact_categories/{id}
DELETE /contact_categories/{id}
GET /contact_categories
Create Contact Category
POST /contact_categories

Create a contact category definition

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 category to be created

Example:
VIP

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the category

Example:
473539a2-1cb9-4674-9260-d68d3d639b5c
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/contact_categories HTTP/1.1 

Content-Type: application/json

{
    "name": "VIP"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "473539a2-1cb9-4674-9260-d68d3d639b5c"
}
Update Contact Category
PUT /contact_categories/{id}

Update a specific contact category

Path variables

id
string GUID required

The contact category identifier to be updated

Example:
473539a2-1cb9-4674-9260-d68d3d639b5c

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 new category name

Example:
VIP

Responses

200 200

Successful Request

Body
Object
id
string

The unique id of the updated contact category

Example:
473539a2-1cb9-4674-9260-d68d3d639b5c
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/contact_categories/473539a2-1cb9-4674-9260-d68d3d639b5c HTTP/1.1 

Content-Type: application/json

{
    "name": "VIP"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "473539a2-1cb9-4674-9260-d68d3d639b5c"
}
Delete Contact Category
DELETE /contact_categories/{id}

Delete a specific contact category

Path variables

id
string GUID required

The contact category identifier to be deleted

Example:
473539a2-1cb9-4674-9260-d68d3d639b5c

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

Responses

200 200

Successful Request

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/contact_categories/473539a2-1cb9-4674-9260-d68d3d639b5c HTTP/1.1 

Content-Type: application/json

HTTP/1.1 200 OK 
List Contact Categories
GET /contact_categories

List all the available contact categories

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

The name of the contact category

Example:
VIP

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array

Contact categories retrieved

Object
id
string GUID

The unique id of the contact category

Example:
473539a2-1cb9-4674-9260-d68d3d639b5c
name
string

The contact category name

Example:
VIP
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/contact_categories HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "473539a2-1cb9-4674-9260-d68d3d639b5c",
            "name": "VIP"
        }
    ]
}
Name Days
POST /name_day_rules
PUT /name_day_rules/{id}
GET /name_day_rules
DELETE /name_day_rule/{id}
Create Name Day Rule
POST /name_day_rules

Create a name day rule

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
day
number

The day of the name day (1-31)

Example:
15
month
number

The month of the name day (1-12)

Example:
8
names
string

A comma separated list of names that celebrate on the specific day

Example:
Mario, Maria, Panayiota
description
string

A description of the name day

Example:
Assumption of the Virgin Mary

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the name day rule created

Example:
e18ee2bc-c6f3-49e1-8e05-763386378017
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/name_day_rules HTTP/1.1 

Content-Type: application/json

{
    "day": 15,
    "month": 8,
    "names": "Mario, Maria, Panayiota",
    "description": "Assumption of the Virgin Mary"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "e18ee2bc-c6f3-49e1-8e05-763386378017"
}
Update Name Day Rule
PUT /name_day_rules/{id}

Update a single name day rule

Path variables

id
string GUID required

Unique id of the name day to be updated

Example:
78b79217-0c14-4285-9c7b-e1701d31f18c

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
day
number

The day of the name day (1-31)

Example:
15
month
number

The month of the name day (1-12)

Example:
8
names
string

A comma separated list of names that celebrate on the specific day

Example:
Mario, Maria, Panayiota
description
string

A description of the name day

Example:
Assumption of the Virgin Mary

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the name day rule updated

Example:
78b79217-0c14-4285-9c7b-e1701d31f18c
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/name_day_rules/78b79217-0c14-4285-9c7b-e1701d31f18c HTTP/1.1 

Content-Type: application/json

{
    "day": 15,
    "month": 8,
    "names": "Mario, Maria, Panayiota",
    "description": "Assumption of the Virgin Mary"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "78b79217-0c14-4285-9c7b-e1701d31f18c"
}
List Name Day Rules
GET /name_day_rules

Retrieve all the name day rules

Request parameters

name
string optional

Filter using one of the name day ‘names’

Example:
Mario
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
day
integer optional

Filter using a specific day to list names related to the chosen day

Example:
15
month
string optional

Filter using a specific month to list names related to the chosen month

Example:
January

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array
Object
id
string

The unique identification of the name day rule

Example:
78b79217-0c14-4285-9c7b-e1701d31f18c
day
integer

The day of the name day

Example:
15
month
integer

The month of the name day

Example:
8
names
string

A comma separated list of names celebrating on this day

Example:
Mario, Maria, Panayiota
description
string

A description of the name day

Example:
Assumption of the Virgin Mary
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/name_day_rules?name=Mario HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "78b79217-0c14-4285-9c7b-e1701d31f18c",
            "day": 15,
            "month": 8,
            "names": "Mario, Maria, Panayiota",
            "description": "Assumption of the Virgin Mary"
        }
    ]
}
Delete Name Day Rule
DELETE /name_day_rule/{id}

Delete a single name day rule

Path variables

id
string GUID required

Unique name day rule id to be deleted

Example:
78b79217-0c14-4285-9c7b-e1701d31f18c

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the deleted name day rule

Example:
78b79217-0c14-4285-9c7b-e1701d31f18c
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/name_day_rule/78b79217-0c14-4285-9c7b-e1701d31f18c HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "78b79217-0c14-4285-9c7b-e1701d31f18c"
}
Communities
POST /communities/relations
PUT /communities/relations/{id}
DELETE /communities/relations/{id}
GET /communities/relations
Create Community Relation
POST /communities/relations

Create a new contact community relation

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 contact community type relation

Example:
Employees

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The contact community relation identifier

Example:
01bdde91-ba65-dcb1-02c2-131c641ea8da
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/communities/relations HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Employees"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "01bdde91-ba65-dcb1-02c2-131c641ea8da"
}
Update Community Relation
PUT /communities/relations/{id}

Update an existing contact community relation

Path variables

id
string GUID required

The contact community relation (identifier) that will be updated

Example:
01bdde91-ba65-dcb1-02c2-131c641ea8da

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 contact community type relations

Example:
Employees

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact community relation identifier

Example:
01bdde91-ba65-dcb1-02c2-131c641ea8da
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/communities/relations/01bdde91-ba65-dcb1-02c2-131c641ea8da HTTP/1.1 

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

{
    "name": "Employees"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "01bdde91-ba65-dcb1-02c2-131c641ea8da"
}
Delete Community Relation
DELETE /communities/relations/{id}

Delete an existing contact community relation

Path variables

id
string GUID required

The contact community relation (identifer) that will be deleted

Example:
01bdde91-ba65-dcb1-02c2-131c641ea8da

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/communities/relations/01bdde91-ba65-dcb1-02c2-131c641ea8da HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 204 No Content 
List Community Relations
GET /communities/relations

Retrieve a list of contact community relations based on search criteria (e.g. all contact community relations)

Request parameters

name
string optional

Filter based on contact community relation name (behave as like)

Example:
Employees
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 contact community relation identifier

Example:
01bdde91-ba65-dcb1-02c2-131c641ea8da
name
string

The contact community relation name

Example:
Employees
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/communities/relations HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "01bdde91-ba65-dcb1-02c2-131c641ea8da",
            "name": "Employees"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Customer Events
GET /customer_events/settings
PUT /customer_events/settings
Get Customer Event Settings
GET /customer_events/settings

Retrieve the customer event settings

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

Information about handling invalid product information on purchase customer events

invalid_product_type_id
string GUID

The product type identifier that will be used when creating invalid products from purchase customer events

Example:
1c17d213-f1b5-a4df-a432-39cd87dcc648
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 /customer_event_generic_settings HTTP/1.1 

authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "purchase_settings": {
        "invalid_product_type_id": "QWERTY1234543212345678UJIKY76HJR"
    }
}
Update Customer Event Settings
PUT /customer_events/settings

Set the customer event settings

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

Information about handling invalid product information on purchase customer events

invalid_product_type_id
string GUID nullable

The product type identifier that will be used when creating invalid products from purchase customer events

Default:
Invalid Purchase Products
Example:
1c17d213-f1b5-a4df-a432-39cd87dcc648

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
1c17d213-f1b5-a4df-a432-39cd87dcc648
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 /customer_event_generic_settings HTTP/1.1 

Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A

{
    "purchase_settings": {
        "invalid_product_type_id": "QWERTY1234543212345678UJIKY76HJR"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "QWERTY1234543212345678UJIKY76HJR"
}
Customer Event Classifications
POST /customer_events/classifications
PUT /customer_events/classifications/{id}
DELETE /customer_events/classifications/{id}
GET /customer_events/classifications
GET /customer_events/classifications/{id}
Create Customer Event Classification
POST /customer_events/classifications

Create a customer event classification

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

Example:
Cash
description
string nullable

The classification description

Example:
Cash driven customer event
type
string

The classification type

Enumeration:
PURCHASE
ACHIEVEMENT

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The classification identifier

Example:
df843f9e-a263-4ed3-e4ea-5678266bd465
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/customer_event_classifications HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Cash",
    "description": "Cash driven customer event",
    "type": "PURCHASE"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "df843f9e-a263-4ed3-e4ea-5678266bd465"
}
Update Customer Event Classification
PUT /customer_events/classifications/{id}

Update a customer event classification

Path variables

id
string GUID required

The classification (identifier) that will be updated

Example:
08ad0805-6059-b0d0-b253-e4fcc8cb4bd0

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 classification

Example:
Cash
description
string nullable

The description of the classification

Example:
Represent cash driven customer events

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The classification identifier

Example:
08ad0805-6059-b0d0-b253-e4fcc8cb4bd0
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/customer_events/classifications/08ad0805-6059-b0d0-b253-e4fcc8cb4bd0 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Cash",
    "description": "Represent cash driven customer events"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "08ad0805-6059-b0d0-b253-e4fcc8cb4bd0"
}
Delete Customer Event Classification
DELETE /customer_events/classifications/{id}

Delete a customer event classification

Path variables

id
string GUID required

The classification (identifier) that will be deleted

Example:
ba702382-ad09-8bbe-e661-97bdb838cdad

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/customer_events/classifications/ba702382-ad09-8bbe-e661-97bdb838cdad HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 204 No Content 
List Customer Event Classifications
GET /customer_events/classifications

Retrieve a list of customer event classifications based on search criteria (e.g. all purchase classifications)

Request parameters

name
string optional

Filter based on classification name

Example:
Cash
type
string optional

Filter based on classification type

Enumeration:
PURCHASE
ACHIEVEMENT
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

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 classification identifier

Example:
08ad0805-6059-b0d0-b253-e4fcc8cb4bd0
name
string

The classification name

Example:
Cash
description
string

The classification description

Example:
Cash driven customer event
type
string

The classification type

Enumeration:
PURCHASE
ACHIEVEMENT
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/customer_events/classifications HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "08ad0805-6059-b0d0-b253-e4fcc8cb4bd0",
            "name": "Cash",
            "description": "Cash driven customer event",
            "type": "ACHIEVEMENT"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Customer Event Classification
GET /customer_events/classifications/{id}

Retrieve detailed information for a customer event classification

Path variables

id
string GUID required

The classification (identifier) that will be retrieved

Example:
08ad0805-6059-b0d0-b253-e4fcc8cb4bd0

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 classification identifier

Example:
08ad0805-6059-b0d0-b253-e4fcc8cb4bd0
name
string

The classification name

Example:
Cash
description
string

The classification description

Example:
Cash driven customer event
type
string

The classification type

Enumeration:
PURCHASE
ACHIEVEMENT
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/customer_events/classifications/08ad0805-6059-b0d0-b253-e4fcc8cb4bd0 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "08ad0805-6059-b0d0-b253-e4fcc8cb4bd0",
    "name": "Cash",
    "description": "Cash driven customer event",
    "type": "PURCHASE"
}
Financial Transactions
GET /financials/settings
PUT /financial_settings
Get Financial Settings
GET /financials/settings

Get the generic financial settings

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
tax_model
string

The default tax model that is automatically set when setting up product prices

Enumeration:
TAX_INCLUSIVE

Prices include taxes

TAX_EXCLUSIVE

Prices does not include tax

Default:
TAX_INCLUSIVE
Example:
TAX_INCLUSIVE
payment_retries
Object

Business rules that enable a payment retry attempt on failing to pay off an invoice or a subscription

enable
boolean

Enable payment retries

Default:
false
Example:
true
frequency
Object required

How often an attempt will be perfomed right after a payment failure

value
integer required

The frequency value

Example:
1
uot
string required

The frequency’s unit of time

Enumeration:
HOURS
DAYS
Default:
HOURS
Example:
HOURS
retries
integer required

How many payment attempts will be performed

Example:
3
maximum_period
Object

The maximum period of time that the system will retry. A payment retry will not be performed if maximum period of time is reached ad regardless of the fact that not all retries were perforemd.

period
integer required

The period of time

Example:
3
uot
string required

Period of time unit of time

Enumeration:
HOURS
DAYS
WEEKS
Default:
DAYS
Example:
DAYS
subscription_action
string nullable

Defines what happens to the subscription if all payment retries fail

Enumeration:
REMAINS_AS_IS
DEACTIVATE
Default:
DEACTIVATE
Example:
DEACTIVATE
payment_methods
Array

The allowed payment method types that can be used across the system

Object
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
is_allowed
boolean

Defines whether the payment method type is allowed or not. Not allowed types canno tbe used when adding contac tpayment methods, posting payments etc

Example:
false
payment_on_file
Object

Defines how automated payments are managed when using an online contact payment method.

amount_to_collect
string

Defaults to Invoiced Amount. On using an online payment method, the invoicing process will collect the appropriate amount on automated payments.

Enumeration:
INOIVED_AMOUNT
OUTSTANDING_AMOUNT
Default:
INOIVED_AMOUNT
Example:
INOIVED_AMOUNT
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/financials/settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "tax_model": "TAX_INCLUSIVE",
    "payment_retries": {
        "enable": true,
        "frequency": {
            "value": 1,
            "uot": "HOURS"
        },
        "retries": 3,
        "maximum_period": {
            "period": 3,
            "uot": "DAYS"
        },
        "subscription_action": "DEACTIVATE"
    },
    "payment_methods": [
        {
            "type": "CRM_WALLET",
            "is_allowed": "false"
        }
    ],
    "payment_on_file": {
        "amount_to_collect": "INOIVED_AMOUNT"
    }
}
Update Financial Settings
PUT /financial_settings

Update the generic financial settings

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

The default tax model that is automatically set when setting up product prices

Enumeration:
TAX_INCLUSIVE

Prices include taxes

TAX_EXCLUSVE

Prices do not include taxes

payment_retries
Object

Business rules that enable a payment retry attempt on failing to pay off an invoice or a subscription

enable
boolean required

Enable payment retries

Default:
false
Example:
true
frequency
Object

How often an attempt will be perfomed right after a payment failure

value
integer required

The frequency value

Example:
1
uot
string required

The frequency’s unit of time

Enumeration:
HOURS
DAYS
Default:
HOURS
retries
integer required

How many payment attempts will be performed

Example:
3
maximum_period
Object

The maximum period of time that the system will retry. A payment retry will not be performed if maximum period of time is reached ad regardless of the fact that not all retries were perforemd.

period
integer required

The period’s value

Example:
3
uot
string required

Period of time unit of time

Enumeration:
HOURS
DAYS
WEEKS
Default:
DAYS
Example:
DAYS
subscription_action
string nullable

Defines what happens to the subscription of all payment retries fail

Enumeration:
REMAINS_AS_IS
DEACTIVATE
Default:
DEACTIVATE
Example:
DEACTIVATE
payment_methods
Array
Object
type
string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
payment_on_file
Object

Defines how automated payments are managed when using an online contact payment method.

amount_to_collect
string

Defaults to Invoiced Amount. On using an online payment method, the invoicing process will collect the appropriate amount on automated payments.

Enumeration:
INVOICED_AMOUNT

Collect only the invoiced amount

OUTSTANDING_AMOUNT

Make a payment to pay off the account’s outstanding amount

Responses

200 200

Successful Request

Body
Object
id
string

The organisation identifier

Example:
81560181-f08f-4a83-a683-8ca6555b608a
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/financial_settings HTTP/1.1 

Content-Type: application/json

{
    "tax_model": "TAX_INCLUSIVE",
    "payment_retries": {
        "enable": true,
        "frequency": {
            "value": 1,
            "uot": "HOURS"
        },
        "retries": 3,
        "maximum_period": {
            "period": 3,
            "uot": "DAYS"
        },
        "subscription_action": "DEACTIVATE"
    },
    "payment_methods": [
        {
            "type": "ACCOUNT_DEBIT"
        }
    ],
    "payment_on_file": {
        "amount_to_collect": "INVOICED_AMOUNT"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "81560181-f08f-4a83-a683-8ca6555b608a"
}
Financial Transaction Types

Use financial transaction types to differentiate various transactions issued throughout the software and by various processes like the ordering flow and subscriptions billing.

POST /financials/types
GET /financials/types
PUT /financials/types/{id}
DELETE /financials/types/{id}
Create Financial Transactions Type
POST /financials/types

Create a new financial transaction type

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 name of the financial transaction type. The name should be unique between types of the same transaction classification.

Example:
Sales Invoices
classification
string required

The type of the event

Enumeration:
INVOICE
CREDIT_NOTE
PAYMENT
REFUND
PAYOUT
Example:
INVOICE
is_default
boolean

Sets the financial transaction type as the default of its classification. One type must be set as the default among types of the same classification

Default:
false
Example:
true
description
string

A description of the financial transaction type

Example:
Used on manyally debiting contacts during hardware sales

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the financial transaction type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/financials/types HTTP/1.1 

Content-Type: application/json

{
    "name": "Sales Invoices",
    "classification": "INVOICE",
    "is_default": "true",
    "description": "Used on manyally debiting contacts during hardware sales"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Financial Transaction Types
GET /financials/types

Get a list of all financial transaction types

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

The value of the search across name, classification (case insensitive)

Example:
DEBIT
classification
string optional

The classification of the financial transaction

Enumeration:
INVOICE
CREDIT_NOTE
PAYMENT
REFUND
PAYOUT
Example:
INVOICE
is_default
boolean optional

Filters only the default types

Example:
true

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
content
Array
Object
id
string

Unique identifier of the financial transaction type

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

The name of the financial transaction type

Example:
Sale sInvoice
classification
string

The type of the event

Enumeration:
INVOICE
CREDIT_NOTE
PAYMENT
REFUND
PAYOUT
Example:
INVOICE
is_default
boolean

Sets the financial transaction tyep as the default of its classification

Example:
true
description
string

A description of the financial transaction type

Example:
Used during hardware sales
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/financials/types HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Sale sInvoice",
            "classification": "INVOICE",
            "is_default": "true",
            "description": "Used during hardware sales"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Financial Transaction Type
PUT /financials/types/{id}

Update the financial transaction type

Path variables

id
string required

The id of the financial transaction type to be updated

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

Request body

Object
name
string

The name of the financial transaction type

Example:
Sales Invoice
is_default
boolean

Sets the financial transaction type as the default of its classification

Example:
true
description
string

A description of the financial transaction type

Example:
Used during hardware sales

Responses

200 200

Successful Request

Body
Object
id
string

The unique identifier of the financial transaction type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/financials/types/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "name": "Sales Invoice",
    "is_default": "true",
    "description": "Used during hardware sales"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Financial Transaction Type
DELETE /financials/types/{id}

Delete a financial transaction type

Path variables

id
string required

The id of the financial transaction type to be deleted

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

204 No Content

Successful Request

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/financials/types/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 204 No Content 
Inventory
Device Statuses
POST /devices/statuses
PUT /devices/statuses/{id}
DELETE /devices/statuses/{id}
GET /devices/statuses
Create Device Status
POST /devices/statuses

Create a new device status

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 device status name

Example:
under maintenance
description
string nullable

The device status description

Example:
devices under this status are blocked and are under maintenance
state
string required

The device’ state

Enumeration:
NEW
USED
RENTED
BLOCKED
DISPATCHED
is_default
boolean nullable

Defines whether the device status is the default one

Example:
false

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The device status identifier

Example:
42db5477-a544-11c5-45dc-2d444b34056f
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
POST https://sandbox.crm.com/backoffice/v2/devices/statuses HTTP/1.1 

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

{
    "name": "under maintenance",
    "description": "devices under this status are blocked and are under maintenance",
    "state": "SOLD",
    "is_default": "false"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "42db5477-a544-11c5-45dc-2d444b34056f"
}
Update Device Status
PUT /devices/statuses/{id}

Update an existing device status

Path variables

id
string GUID required

The device status (identifier) that will be updated

Example:
8580cba8-73f4-6bde-7ac6-b6713d6df89c

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 device status name

Example:
under maintenance
description
string nullable

The device status description

Example:
devices under this status are blocked and are under maintenance
is_default
boolean nullable

Defines whether the device status is the default one

Example:
false

Responses

200 OK

The request has succeeded

Body
Object
id
string

The device status identifier

Example:
42db5477-a544-11c5-45dc-2d444b34056f
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
PUT https://sandbox.crm.com/backoffice/v2/devices/statuses/8580cba8-73f4-6bde-7ac6-b6713d6df89c HTTP/1.1 

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

{
    "name": "under maintenance",
    "description": "devices under this status are blocked and are under maintenance",
    "is_default": "false"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "42db5477-a544-11c5-45dc-2d444b34056f"
}
Delete Device Status
DELETE /devices/statuses/{id}

Delete an existing device status

Path variables

id
string GUID required

The device status (identifier) that will be deleted

Example:
8580cba8-73f4-6bde-7ac6-b6713d6df89c

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/devices/statuses/8580cba8-73f4-6bde-7ac6-b6713d6df89c HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Device Statuses
GET /devices/statuses

Retrieve a list of device statuses based on search criteria (e.g. all used device statuses)

Request parameters

search_value
string optional

Filter based on device status attributes (name and classification)

Example:
new status
state
string optional

Filter based on device state

Example:
NEW
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 device status identifier

Example:
a7025bb4-100e-b64b-eaf0-cbbe3327515a
name
string

The device status name

Example:
under maintenance
description
string

The device status description

Example:
devices are under maintenance
state
string

The device’ state

Enumeration:
NEW
USED
RENTED
BLOCKED
DISPATCHED
is_default
boolean

Defines whether the device status is the default one or not

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

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
GET https://sandbox.crm.com/backoffice/v2/devices/statuses HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "a7025bb4-100e-b64b-eaf0-cbbe3327515a",
            "name": "under maintenance",
            "description": "devices are under maintenance",
            "state": "RENTED",
            "is_default": "false"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Leads

Leads configurations.

Lost Reasons

Define and manage the possible reasons why a lead may be lost. A lost reason must be provided when a lead takes on the state of ‘Lost’.

POST /leads/lost_reasons
PUT /leads/lost_reasons/{id}
DELETE /leads/lost_reasons/{id}
GET /leads/lost_reasons
Create Lost Reason
POST /leads/lost_reasons

Create a possible reason for losing a lead

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

A unique name for the lost reason

Example:
Competitor
description
string

A description for the lost reason

Example:
Lost to a competitor
Examples

Responses

201 Created
Body
Object
id
string GUID

The unique identifier of the newly created lost reason

Example:
2964aaff-df07-4798-b585-82a813800b3e
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/leads/lost_reasons HTTP/1.1 

Content-Type: application/json

{
    "name": "Competitor",
    "description": "Lost to a competitor"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "2964aaff-df07-4798-b585-82a813800b3e"
}
Update Lost Reason
PUT /leads/lost_reasons/{id}

Update a lost (lead) reason

Path variables

id
string GUID required

The GUID of the lost reason to be updated

Example:
2964aaff-df07-4798-b585-82a813800b3e

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

A unique lost reason name

Example:
Too expensive
description
string

A description of the lost lead reason

Example:
Pricing is not within organisation's budget.
Examples

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated lost reason

Example:
2964aaff-df07-4798-b585-82a813800b3e
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/leads/lost_reasons/2964aaff-df07-4798-b585-82a813800b3e HTTP/1.1 

Content-Type: application/json

{
    "name": "Too expensive",
    "description": "Pricing is not within organisation's budget."
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "2964aaff-df07-4798-b585-82a813800b3e"
}
Delete Lost Reason
DELETE /leads/lost_reasons/{id}

Delete a lost lead reason

Path variables

id
string required

The GUID of the lost reason to be deleted

Example:
2964aaff-df07-4798-b585-82a813800b3e

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/leads/lost_reasons/2964aaff-df07-4798-b585-82a813800b3e HTTP/1.1 

HTTP/1.1 204 No Content 
List Lost Reasons
GET /leads/lost_reasons

List all available reasons for losing a lead

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 for a lost reason based on its name and description

Example:
pricing

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 GUID

The id of the lost reason

Example:
2964aaff-df07-4798-b585-82a813800b3e
name
string

The name of the lost reason

Example:
Pricing
description
string

The description of the lost reason

Example:
Pricing not within organisation's budget
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/leads/lost_reasons HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "2964aaff-df07-4798-b585-82a813800b3e",
            "name": "Pricing",
            "description": "Pricing not within organisation's budget"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Queues

Queues are defined and assigned to leads upon creation. A queue contains the stages that a lead will progresses through from start to finish during it’s life cycle. Multiple queues can be created based on your leads classifications.

POST /leads/queues
PUT /leads/queues/{id}
GET /leads/queues
GET /leads/queues/{id}
DELETE /leads/queues/{id}
DELETE /leads/queues/{id}/stage/{stage_id}
Create Lead Queue
POST /leads/queues

Create a queue for leads with it’s stages. By default a Lead Queue is created as ‘Inactive’ and should be activated in a separate Web API call.

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

A unique name for the lead queue

Example:
International subscriptions lead
description
string

A description for the Lead queue

Example:
Queue that manages B2B leads
state
string

Queue state, set to ‘inactive’ by default, can be changed to ‘active’ through another API call

Enumeration:
ACTIVE

Can be assigned to a Lead

INACTIVE

Can’t be assigned to a Lead

Default:
INACTIVE
Example:
ACTIVE
stages
Array required

Queue stages information. At least three stages must be specified, i.e. one for each one of that available states of the lead; New, In Progress, Won and Lost

Min items: 3
Unique items: YES
Object
order
integer required

The order of the stage within the queue

Example:
1
name
string required

Stage name

Example:
Proposal Submitted
description
string

Stage description

Example:
Proposal has been forwarded to the customer
colour
string

Stage colour hex code

Example:
#fa5c7c
state
string required

The order life cycle state

Enumeration:
NEW
IN_PROGRESS
WON
LOST
Examples

Responses

201 Created
Body
Object
id
string

The unique identifier of the newly created queue

Example:
2964aaff-df07-4798-b585-82a813800b3e
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/leads/queues HTTP/1.1 

Content-Type: application/json

{
    "name": "International subscriptions lead",
    "description": "Queue that manages B2B leads",
    "state": "ACTIVE",
    "stages": [
        {
            "order": 1,
            "name": "Proposal Submitted",
            "description": "Proposal has been forwarded to the customer",
            "colour": "#fa5c7c",
            "state": "LOST"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "2964aaff-df07-4798-b585-82a813800b3e"
}
Update Lead Queue
PUT /leads/queues/{id}

Update a lead queue and it’s stages

Path variables

id
string GUID required

The GUID of the lead queue to be updated

Example:
2964aaff-df07-4798-b585-82a813800b3e

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 unique queue name

Example:
Large-scale business lead
description
string
state
string

Lead queue state

Enumeration:
ACTIVE

Can be assigned to a lead

INACTIVE

Cannot be assigned to a lead

Example:
INACTIVE
stages
Array

The stages of the queue. Each stage must have a unique name, order and colour.

Object
order
integer required

Order of the stage within the queue

Example:
4
name
string required

Stage name

Example:
Proposal Submitted
description
string

Stage description

Example:
Proposal has been submitted to the customer
colour
string

Stage colour hex code

Example:
#fa5c7c
state
string required

The order life cycle state

Enumeration:
NEW
IN_PROGRESS
WON
LOST
Examples

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated lead queue

Example:
2964aaff-df07-4798-b585-82a813800b3e
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/leads/queues/2964aaff-df07-4798-b585-82a813800b3e HTTP/1.1 

Content-Type: application/json

{
    "name": "Large-scale business lead",
    "description": "",
    "state": "INACTIVE",
    "stages": [
        {
            "order": 4,
            "name": "Proposal Submitted",
            "description": "Proposal has been submitted to the customer",
            "colour": "#fa5c7c",
            "state": "IN_PROGRESS"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "2964aaff-df07-4798-b585-82a813800b3e"
}
List Lead Queues
GET /leads/queues

Retrieve all queues configured for leads

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 for a queue by name and description

Example:
Small-Medium local businesses
state
string optional

The state of the leads queue

Enumeration:
ACTIVE
INACTIVE
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 OK
Body
Object
content
Array
Object
id
string

The GUID of the queue

Example:
2964aaff-df07-4798-b585-82a813800b3e
name
string

The name of the queue

Example:
Small local business lead
description
string

Lead queue description

Example:
Manages local businesses leads flows
state
string

The state of the queue

Enumeration:
ACTIVE
INACTIVE
number_of_stages
integer

Number of stages that the queue is comprised of

Example:
5
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/leads/queues HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "2964aaff-df07-4798-b585-82a813800b3e",
            "name": "Small local business lead",
            "description": "Manages local businesses leads flows",
            "state": "INACTIVE",
            "number_of_stages": 5
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Lead Queue
GET /leads/queues/{id}

Retrieve a lead queue with it’s stages

Path variables

id
string GUID required

The GUID of the lead queue to be retrieved

Example:
2964aaff-df07-4798-b585-82a813800b3e

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

The GUID of the retrieved queue

Example:
2964aaff-df07-4798-b585-82a813800b3e
name
string

Queue name

Example:
Small local business lead
description
string

Queue description

Example:
Manage leads of small local businesses
state
string

The state of the queue

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
stages
Array

Queue stages information

Object
id
string GUID

Stage id

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244
name
string

Stage name

Example:
Proposal submitted
description
string

Stage description

Example:
Proposal has been forwarded to the customer
order
integer

The order of the stage within the queue

Example:
5
colour
string

stage colour hex code

Example:
#fa5c7c
state
string

The order life cycle state

Enumeration:
NEW
IN_PROGRESS
WON
LOST
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/leads/queues/2964aaff-df07-4798-b585-82a813800b3e HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "2964aaff-df07-4798-b585-82a813800b3e",
    "name": "Small local business lead",
    "description": "Manage leads of small local businesses",
    "state": "ACTIVE",
    "stages": [
        {
            "id": "61c943c8-dfeb-4c09-a25c-b054f48bf244",
            "name": "Proposal submitted",
            "description": "Proposal has been forwarded to the customer",
            "order": 5,
            "colour": "#fa5c7c",
            "state": "NEW"
        }
    ]
}
Delete Lead Queue
DELETE /leads/queues/{id}

Delete a lead queue definition

Path variables

id
string required

The GUID of the lead queue to be deleted

Example:
2964aaff-df07-4798-b585-82a813800b3e

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/leads/queues/2964aaff-df07-4798-b585-82a813800b3e HTTP/1.1 

HTTP/1.1 204 No Content 
Delete Lead Queue Stage
DELETE /leads/queues/{id}/stage/{stage_id}

Delete a stage from a lead queue. If there are any existing leads in that stage then they must be transferred to another stage of the same queue.

Path variables

id
string required

The GUID of the queue

Example:
2964aaff-df07-4798-b585-82a813800b3e
stage_id
string required

The GUID of the queue stage to be deleted

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244

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
stage_id
string

The GUID of the new stage (in the same queue) to which any existing leads will be transferred to. Required only if there are one or more leads in the stage to be deleted

Example:
e4119c11-2437-4c80-b321-0fc2143020e7

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/v2/leads/queues/2964aaff-df07-4798-b585-82a813800b3e/stage/61c943c8-dfeb-4c09-a25c-b054f48bf244 HTTP/1.1 

Content-Type: application/json

{
    "stage_id": "e4119c11-2437-4c80-b321-0fc2143020e7"
}

HTTP/1.1 200 OK 
Licenses
POST /licenses
PUT /licenses/{id}
DELETE /licenses/{id}
GET /organisations/{id}/licenses
GET /licenses/{license_id}
POST /licenses/{id}/actions
POST /licenses/{id}/assets
POST /assets
GET /assets
GET /assets/{id}
PUT /assets/{id}
DELETE /assets/{id}
Create License
POST /licenses

Create a new license

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 name of the license

Example:
Trial License
description
string nullable

The description of the license

Example:
This is free Trial License with limited access to features

Responses

200 OK
Body
Object
id
string GUID

The license identifier

Example:
42f3752c-676a-8245-1c87-130b93f960c7
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/licenses HTTP/1.1 

Content-Type: application/json

{
    "name": "Trial License",
    "description": "This is free Trial License with limited access to features"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "42f3752c-676a-8245-1c87-130b93f960c7"
}
Update License
PUT /licenses/{id}

Update a license

Path variables

id
string GUID required

The identifier of the license that will be updated

Example:
42f3752c-676a-8245-1c87-130b93f960c7

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 name of the license

Example:
Trial License
description
string nullable

The description of the license

Example:
This is free Trial License with limited access to features

Responses

200 OK
Body
Object
id
string GUID

The license identifier

Example:
42f3752c-676a-8245-1c87-130b93f960c7
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/licenses/42f3752c-676a-8245-1c87-130b93f960c7 HTTP/1.1 

Content-Type: application/json

{
    "name": "Trial License",
    "description": "This is free Trial License with limited access to features"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "42f3752c-676a-8245-1c87-130b93f960c7"
}
Delete License
DELETE /licenses/{id}

Delete a single license

Path variables

id
string GUID required

The license (identifier) that will be deleted

Example:
42f3752c-676a-8245-1c87-130b93f960c7

Responses

200 OK

Successfull Request

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/licenses/42f3752c-676a-8245-1c87-130b93f960c7 HTTP/1.1 

HTTP/1.1 200 OK 
List Licenses
GET /organisations/{id}/licenses

Returns a list of licenses of the organisation

Path variables

id
string GUID required

The oginasation identifier

Example:
d332dd8a-254e-47c9-ba1f-3f369877a9b3

Request parameters

search_value
string optional

Search for license based on name and description

Example:
Trial License
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
id
string GUID

The license identifier

Example:
42f3752c-676a-8245-1c87-130b93f960c7
name
string

The name of the license

Example:
Trial License
description
string

The description of the license

Example:
This is free Trial License with limited access to features
life_cycle_state
string

The life cycle state of the license

Enumeration:
ACTIVE
INACTIVE
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/organization/d332dd8a-254e-47c9-ba1f-3f369877a9b3/licenses HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "42f3752c-676a-8245-1c87-130b93f960c7",
            "name": "Trial License",
            "description": "The is  Trial License",
            "life_cycle_state": "ACTIVE"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get License
GET /licenses/{license_id}

Returns the details of a license of the organisation.

Path variables

license_id
string GUID required

The license (identifier) for which information will be retreived

Example:
42f3752c-676a-8245-1c87-130b93f960c7

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

Successful Request

Body
Object
content
Object
id
string GUID

The license identifier

Example:
42f3752c-676a-8245-1c87-130b93f960c7
name
string

The name of the license

Example:
Trial License
description
string

The description of the license

Example:
This is free Trial License with limited access to features
life_cycle_state
string

The life cycle state of the license

Enumeration:
ACTIVE
INACTIVE
assets
Array

The assets of a license

Object
id
string GUID

The asset identifier

Example:
1a7fc6dc-9932-5965-b028-14843782c843
name
string

The name of the asset

Example:
CRM
description
string

The description of the asset

Example:
Asset for CRM modules
modules
Array

The modules of the asset

Object
name
string

The name of the module

Example:
Contacts
features
Array

The features of the module

Object
name
string

The name of the feature

Example:
View Contacts
license_code
string

The license code of the feature

Example:
CRM_CON_VIEW
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/organization/d332dd8a-254e-47c9-ba1f-3f369877a9b3/licenses/42f3752c-676a-8245-1c87-130b93f960c7 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": {
        "id": "42f3752c-676a-8245-1c87-130b93f960c7",
        "name": "Trial License",
        "description": "The is a Trial License with limited access to features",
        "life_cycle_state": "ACTIVE",
        "assets": [
            {
                "id": "1a7fc6dc-9932-5965-b028-14843782c843",
                "name": "CRM",
                "description": "Asset for CRM modules",
                "modules": [
                    {
                        "name": "Contacts",
                        "features": [
                            {
                                "name": "View Contacts",
                                "license_code": "CRM_CON_VIEW"
                            },
                            {
                                "name": "Manage Contacts",
                                "license_code": "CRM_CON_MANAGE"
                            }
                        ]
                    },
                    {
                        "name": "Activities",
                        "features": [
                            {
                                "name": "View Activities",
                                "license_code": "CRM_ACT_VIEW"
                            },
                            {
                                "name": "Manage Activities",
                                "license_code": "CRM_ACT_MANAGE"
                            }
                        ]
                    }
                ]
            },
            {
                "id": "a744fded-8f08-0dd9-97ef-8a97c5512c38",
                "name": "Analytics",
                "description": "Asset for Analytics modules",
                "modules": [
                    {
                        "name": "Insights",
                        "features": [
                            {
                                "name": "View Insights",
                                "license_code": "ANA_INS_VIEW"
                            },
                            {
                                "name": "Manage Insights",
                                "license_code": "ANA_INS_MANAGE"
                            }
                        ]
                    },
                    {
                        "name": "Reports",
                        "features": [
                            {
                                "name": "View Reports",
                                "license_code": "ANA_REP_VIEW"
                            },
                            {
                                "name": "Manage Reports",
                                "license_code": "ANA_REP_MANAGE"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}
Perform License Actions
POST /licenses/{id}/actions

Perform an action on an existing license

Path variables

id
string GUID required

The license (identifier) whose life cycle state will be updated

Example:
42f3752c-676a-8245-1c87-130b93f960c7

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
life_cycle_state
string

The life cycle state that the license will changed into

Enumeration:
ACTIVE
INACTIVE

Responses

200 OK

Successfull Requst

Body
Object
id
string GUID

The license identifier

Example:
42f3752c-676a-8245-1c87-130b93f960c7
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/licenses/42f3752c-676a-8245-1c87-130b93f960c7/actions HTTP/1.1 

Content-Type: application/json

{
    "life_cycle_state": "ACTIVE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "42f3752c-676a-8245-1c87-130b93f960c7"
}
Add Assets to License
POST /licenses/{id}/assets

Add assets to license

Path variables

id
string GUID required

The license (identifier) for which assets will be set

Example:
42f3752c-676a-8245-1c87-130b93f960c7

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
assets
Array

The assets added to the license

Object
id
string

The asset identifier to add to the license

Example:
"2b7adb86-ef99-a693-699f-ca2f48b75b91"

Responses

200 OK

Successful Request

Body
Object
id
string GUID

The license identifier

Example:
42f3752c-676a-8245-1c87-130b93f960c7
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/licenses/42f3752c-676a-8245-1c87-130b93f960c7/assets HTTP/1.1 

Content-Type: application/json

{
    "assets": [
        {
            "id": "2b7adb86-ef99-a693-699f-ca2f48b75b91"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "42f3752c-676a-8245-1c87-130b93f960c7"
}
Create Asset
POST /assets

Create an asset

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 asset

Example:
CRM
description
string

The description of the asset

Example:
The CRM related modules of the system
modules
Array

The modules of the asset

Object
name
string

The name of the module

Example:
Contacts
features
Array

The features of the module

Object
name
string

The name of the feature

Example:
Manage Contacts
license_code
string

The unique license code of the feature

Example:
CRM_COM_MANAGE

Responses

200 OK

Successsful Request

Body
Object
id
string GUID

The asset identifier

Example:
92357407-15a3-4228-6581-383ffc5c9a74
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/assets HTTP/1.1 

Content-Type: application/json

{
    "name": "CRM",
    "description": "The CRM related modules of the system",
    "modules": [
        {
            "name": "Contacts",
            "features": [
                {
                    "name": "Manage Contacts",
                    "license_code": "CRM_COM_MANAGE"
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "92357407-15a3-4228-6581-383ffc5c9a74"
}
List Assets
GET /assets

Returns a list of assets

Request parameters

search_value
string optional

Search for assets based on name and description

Example:
CRM
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
id
string GUID

The asset identifier

Example:
81c3f16b-9d36-3eef-6fc3-f9206f2edc6c
name
string

The name of the asset

Example:
CRM
description
string

The description of the asset

Example:
The asset related the CRM modules of the system
modules
Array

The modules of the asset

Object
name
string

The name of the module

Example:
Contacts
features
Array

The features of the module

Object
name
string

The name of the feature

Example:
Manage Contacts
license_code
string

The license code of the feature

Example:
CRM_CON_MANAGE
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/assets HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "81c3f16b-9d36-3eef-6fc3-f9206f2edc6c",
            "name": "CRM",
            "description": "The asset related the CRM modules of the system",
            "modules": [
                {
                    "name": "Contacts",
                    "features": [
                        {
                            "name": "Manage Contacts",
                            "license_code": "CRM_CON_MANAGE"
                        }
                    ]
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Asset
GET /assets/{id}

Returns the details of a single asset

Path variables

id
string GUID required

The asset (identifier) for which information will be retrieved

Example:
addd8657-b32a-fa54-b7d8-3ba166f37779

Responses

200 OK
Body
Object
id
string

The asset identifier

Example:
addd8657-b32a-fa54-b7d8-3ba166f37779
name
string

The name of the asset

Example:
CRM
description
string

The description of the asset

Example:
The asset related to CRM modules
modules
Array

The modules of the asset

Object
name
string

The name of the module

Example:
Contacts
features
Array

The features of the module

Object
name
string

The name of the feature

Example:
View Contacts
license_code
string

The license code of the feature

Example:
CRM_CON_VIEW
Example 1
GET https://sandbox.crm.com/backoffice/v1/assets/addd8657-b32a-fa54-b7d8-3ba166f37779 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "addd8657-b32a-fa54-b7d8-3ba166f37779",
    "name": "CRM",
    "description": "The asset related to CRM modules",
    "modules": [
        {
            "name": "Contacts",
            "features": [
                {
                    "name": "View Contacts",
                    "license_code": "CRM_CON_VIEW"
                }
            ]
        },
        {
            "name": "Activities",
            "features": [
                {
                    "name": "View Activities",
                    "license_code": "CRM_ACT_VIEW"
                }
            ]
        }
    ]
}
Update Asset
PUT /assets/{id}

Update an asset

Path variables

id
string GUID required

The asset (identifier) which will be updated

Example:
92357407-15a3-4228-6581-383ffc5c9a74

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 asset

Example:
CRM
description
string

The description of the asset

Example:
The CRM related modules of the system
modules
Array

The modules of the asset

Object
name
string

The name of the module

Example:
Contacts
features
Array

The features of the module

Object
name
string

The name of the feature

Example:
Manage Contacts
license_code
string

The unique license code of the feature

Example:
CRM_COM_MANAGE

Responses

200 OK

Successsful Request

Body
Object
id
string GUID

The asset identifier

Example:
92357407-15a3-4228-6581-383ffc5c9a74
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/assets/92357407-15a3-4228-6581-383ffc5c9a74 HTTP/1.1 

Content-Type: application/json

{
    "name": "CRM",
    "description": "The CRM related modules of the system",
    "modules": [
        {
            "name": "Contacts",
            "features": [
                {
                    "name": "Manage Contacts",
                    "license_code": "CRM_COM_MANAGE"
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "92357407-15a3-4228-6581-383ffc5c9a74"
}
Delete Asset
DELETE /assets/{id}

Delete a single asset

Path variables

id
string GUID required

The asset (identifier) that will be deleted

Example:
1c64097c-1f09-82d3-5d5e-2f662a254a3d

Responses

200 OK

Successfull Request

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/assets/1c64097c-1f09-82d3-5d5e-2f662a254a3d HTTP/1.1 

HTTP/1.1 200 OK 
Measurement Units
POST /measurement_units
GET /measurement_units
PUT /measurement_units/{id}
DELETE /measurement_units/{id}
Create Measurement Unit
POST /measurement_units

Create a new measurement unit. A single measurement unit can be created per Web API call.

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 name of the measurement unit which is mandatory and unique.

Example:
Phone calls
display_name
string required

The name of the unit that wll be used for display and checkout purposes.

Example:
minutes
description
string

The measurement unit description.

Example:
Unit that measures the duration of a phone call in minutes

Responses

201 Created
Body
Object
id
string

The unique identifier of the new measurement unit

Example:
3ac0809f-ed91-4b68-b912-5bd6064d901e
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/measurement_units HTTP/1.1 

Content-Type: application/json

{
    "name": "Phone calls",
    "display_name": "minutes",
    "description": "Unit that measures the duration of a phone call in minutes"
}
List Measurement Units
GET /measurement_units

Returns a list of measurement units

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 for measurement units using their name or display name.

Example:
GB

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 OK
Body
Object
content
Array
Object
id
string

The unique identifier of the measurement unit

Example:
3FD9C84FA60F9FE407140E20F707726A
name
string

The name of measurement unit

Example:
Minutes
display_name
string

The display name of the measurement unit

Example:
min.
description
string

The measurement unit’s description

Example:
Phone call minutes
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/measurement_units HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "3FD9C84FA60F9FE407140E20F707726A",
            "name": "Minutes",
            "display_name": "min.",
            "description": "Phone call minutes"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Measurement Unit
PUT /measurement_units/{id}

Update an existing unit of measurement. A sinly measurement unit can be updated per Web API call

Path variables

id
string required

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 measurement unit

Example:
Phone call minutes
display_name
string nullable

The display name of the measurement unit

Example:
minutes
description
string nullable

The measurement unit’s description

Example:
Measures a phone call's duration in minutes

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated measurement unit

Example:
2dc0809f-ed91-4b68-b912-5bd6064d901e
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/measurement_units/{id} HTTP/1.1 

Content-Type: application/json

{
    "name": "Phone call minutes",
    "display_name": "minutes",
    "description": "Measures a phone call's duration in minutes"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "2dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Measurement Unit
DELETE /measurement_units/{id}

Deletes an existing unit of measurement. A single measurement unit can be deleted per Web API call

Path variables

id
string required

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
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/measurement_units/{id} HTTP/1.1 

HTTP/1.1 200 OK 
Orders
PUT /orders/settings
GET /orders/settings
Update Order Settings
PUT /orders/settings

Retrieve Order generic settings

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
numbering_schemes
Array

Orders numbering scheme

Object
entity
string

Scheme name

Default:
ORDERS
Example:
ORDERS
prefix
string

Prefix for Order numbers

Default:
O
Example:
O
starting_number
string

Starting number for the scheme

Default:
10001
Example:
00000001
number_of_digits
integer

Number of digits following the prefix

Default:
5
Example:
5
financial_settings
Array nullable

Rules on how financial trasnactions will be issued on managing Orders

Object
supply_method
string required

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
invoice_type_id
string GUID nullable

The invoice type identifier that will be used. If not specified, then the default invoice type will be used

Example:
4ea25d61-ebfe-3a7b-2a45-96d8b059d369
credit_note_type_id
string GUID nullable

The credit note type identifier that will be used. If not specified, then the default credit note type will be used

Example:
4ea25d61-ebfe-3a7b-2a45-96d8b059d369
milestone_settings
Object

Business rules that define how Invoices will be generated for milestone-based Orders

invoice_type_id
string

The invoice type identifier that will be used. If not specified, then the default invoice type will be used

Example:
4ea25d61-ebfe-3a7b-2a45-96d8b059d369
product_id
string required

The invoice milestone product, i.e. the product that will be included in the milestone invoice. Only products classified as expenses can be specified.

Example:
4ea25d61-ebfe-3a7b-2a45-96d8b059d369

Responses

200 OK
Body
Object
id
string

Order settings unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/orders/settings HTTP/1.1 

Content-Type: application/json

{
    "numbering_schemes": [
        {
            "entity": "ORDERS",
            "prefix": "O",
            "starting_number": "00000001",
            "number_of_digits": 5
        }
    ],
    "financial_settings": [
        {
            "supply_method": "DELIVERY",
            "invoice_type_id": "4ea25d61-ebfe-3a7b-2a45-96d8b059d369",
            "credit_note_type_id": "4ea25d61-ebfe-3a7b-2a45-96d8b059d369"
        }
    ],
    "milestone_settings": {
        "invoice_type_id": "4ea25d61-ebfe-3a7b-2a45-96d8b059d369",
        "product_id": "4ea25d61-ebfe-3a7b-2a45-96d8b059d369"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Get Order Settings
GET /orders/settings

Retrieve Order generic settings

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

The type of the event

entity
string required

The entity for which the numbering scheme is configured

Enumeration:
INVOICES
CREDIT_NOTES
PAYMENTS
REFUNDS
ORDERS
SERVICE_REQUESTS
Example:
SERVICE_REQUESTS
prefix
string

The prefix of the numbering scheme. Defaults to the first letter(s) of the entity’s name

Example:
SR
starting_number
string

The starting number of the nuberig scheme (excluding prefix). Defaults to 10001

Default:
10001
Example:
0000001
number_of_digits
string

Number of digits (excluding prefix). Defaults to 5

Default:
5
Example:
7
last_number
string

The last number generated for this numbering scheme

Example:
SR000001
financial_settings
Array

Business rules that define how financial transactions will be issued for Orders

Object
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
invoice_type
Object

Details about the invoice type that will be used

id
string GUID

The invoice type identifier

Example:
The invoice type identifier that will be used
name
string

The invoice type name

Example:
Order Invoice
credit_note_type
Object

Details about the credit note type that will be used

id
string GUID

The credit note type identifier

Example:
a4b059a3-2aa7-b2c2-4191-a966168e97d7
name
string

The credit note type name

Example:
ORDER Credit Note
milestone_settings
Object

Business rules that define how Invoices will be generated for milestone-based Orders

invoice_type
Object

The invoice type that will be used. If not specified, then the default invoice type will be used

id
string

Invoice financial transaction type identifier

Example:
4ea25d61-ebfe-3a7b-2a45-96d8b059d369
name
string

Invoice type name

Example:
Milestone Invoice
product
Object

The invoice milestone product, i.e. the product that will be included in the milestone invoice. Only products classified as expenses can be specified.

id
string

Product identifier

Example:
4ea25d61-ebfe-3a7b-2a45-96d8b059d369
sku
string

Product SKU

Example:
FEE1
name
string

Product name

Example:
Pre-payment
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/orders/settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "numbering_schemes": {
        "entity": "SERVICE_REQUESTS",
        "prefix": "SR",
        "starting_number": "0000001",
        "number_of_digits": "7",
        "last_number": "SR000001"
    },
    "financial_settings": [
        {
            "supply_method": "DELIVERY",
            "invoice_type": {
                "id": "The invoice type identifier that will be used",
                "name": "Order Invoice"
            },
            "credit_note_type": {
                "id": "a4b059a3-2aa7-b2c2-4191-a966168e97d7",
                "name": "ORDER Credit Note"
            }
        }
    ],
    "milestone_settings": {
        "invoice_type": {
            "id": "4ea25d61-ebfe-3a7b-2a45-96d8b059d369",
            "name": "Milestone Invoice"
        },
        "product": {
            "id": "4ea25d61-ebfe-3a7b-2a45-96d8b059d369",
            "sku": "FEE1",
            "name": "Pre-payment"
        }
    }
}
Cancellation Reasons
GET /orders/cancellation_reasons
POST /orders/cancellation_reasons/
PUT /orders/cancellation_reasons/{id}
DELETE /orders/cancellation_reasons/{id}
List Order Cancellation Reasons
GET /orders/cancellation_reasons

Retrieve all reasons that will justify an order cancellation

Request parameters

search_value
string optional

Search for a cancellation reason based on its name or description

Example:
Placed by mistake
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
id
string GUId

The cancellation reason identifier

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
name
string

The cancellation reason name

Example:
Cancelled by Customer
description
string

The cancellation reason description

Example:
Customer requested to cancel an order due to mistake
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/v2/orders/cancellation_reasons HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "caf332bc-4e90-47b5-a05d-142b264897b9",
            "name": "Cancelled by Customer",
            "description": "Customer requested to cancel an order due to mistake"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Create Order Cancellation Reason
POST /orders/cancellation_reasons/

Creates a new Cancellation Reason that will be used when cancelling orders

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

Cancellation reason name

Example:
Cancelled by consumer
description
string

Cncellation reason descripiton

Example:
Set in orders that are cancelled on consumer request

Responses

201 Created
Body
Object
id
string

Cancellation reason name

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/orders/cancellation_reasons/ HTTP/1.1 

Content-Type: application/json

{
    "name": "Cancelled by consumer",
    "description": "Set in orders that are cancelled on consumer request"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Order Cancellation Reason
PUT /orders/cancellation_reasons/{id}

Updates an existing Cancellation reason

Path variables

id
string required

Unique identifier of the Cancellation reason

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

Cancellation reason name

Example:
On consumer request
description
string nullable

Canellation reason description

Example:
Used in cases where consumer cancels the Order

Responses

200 OK
Body
Object
id
string

Cancellation reason unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/orders/cancellation_reasons/{id} HTTP/1.1 

Content-Type: application/json

{
    "name": "On consumer request",
    "description": "Used in cases where consumer cancels the Order"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Order Cancellation Reason
DELETE /orders/cancellation_reasons/{id}

Deletes an existing Cancellation reason

Path variables

id
string GUID required

The cancellation reason (identifier) that will be deleted

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

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/orders/cancellation_reasons/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 204 No Content 
Categories
POST /orders/categories
DELETE /orders/categories/{id}
PUT /orders/categories/{id}
GET /orders/categories
Create Order Category
POST /orders/categories

Creates a new Order Category. Order categories have a tree structure so on creating a new category it is optonal to specify the parent category as well to structure the tree.

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

Category name

Example:
Soft drinks
descripion
string

Category description

Example:
All soft drinks
parent_id
string

Parent category identifier

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

Responses

201 Created
Body
Object
id
string

Unique identifier of the Category

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/orders/categories HTTP/1.1 

Content-Type: application/json

{
    "name": "Soft drinks",
    "descripion": "All soft drinks",
    "parent_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Order Category
DELETE /orders/categories/{id}

Deletes an existing Order Category. A Category cannot be deleted ift it was used in at least one Order. A Category with chile categories cannot be deleted either. All of its child categories must be deleted first.

Path variables

id
string required

Unique identifier of an Order Category

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

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/orders/categories/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 204 No Content 
Update Order Category
PUT /orders/categories/{id}

Updates a single Order Category. During update, an Order’s parent cateogry can be updated as well

Path variables

id
string required

Order category unique identifier

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

Request body

Object
name
string

Category name

Example:
Soft drinks
description
string

Category description

Example:
All soft drinks
parent_id
string

Updated parent category

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

Responses

200 OK
Body
Object
id
string

Category unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/orders/categories/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "name": "Soft drinks",
    "description": "All soft drinks",
    "parent_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Order Categories
GET /orders/categories

Returns a list of Order Categories

Request parameters

parent_id
string optional

Returns all cateogries under this parent category

return_all
boolean optional

If set to True , then all categories are returned, regardless of their parent-child relation.

search_value
string optional

Search for a category using its name or description

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

Category identfier

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

Category name

Example:
Soft Drinks
description
string

Category description

Example:
All soft drinks
child_nodes
integer

Number of child nodes if a category is a parent

Example:
2
parent
Object

The parent category

id
string

Unique identifier of parent category

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

Parent caregory name

Example:
Cold Drinks
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/orders/categories HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Soft Drinks",
            "description": "All soft drinks",
            "child_nodes": 2,
            "parent": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Cold Drinks"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Queues
POST /orders/queues
PUT /orders/queues/{id}
DELETE /orders/queues/{id}
GET /orders/queues
GET /orders/queues/{id}
Create Order Queue
POST /orders/queues

Creates a new Order Queue

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

Order queue name which has to be unique across all Queues

Example:
Support Calls
description
string

Queue description

Example:
Deals with support calls
state
string

Queue state. If not specified, then the queue is created a Inactive and has to change in a different call

Enumeration:
ACTIVE
INACTIVE
Default:
ACTIVE
Example:
ACTIVE
invoice_upfront
boolean

Determines if Orders on this queue will be invoiced up front (on placing them and setting their state into New)

Default:
false
Example:
true
stages
Array required

List of Queue stages. At least 2 stages must be incuded for the New and Completed Order states (one stage for each state). Multiple stages can be set up while Orders are In Progress

Object
order
integer required

The stage’s ordering sequence

state
string

The order life cycle state

Enumeration:
NEW
IN_PROGRESS
COMPLETED
CANCELLED
name
string required

Stage name

Example:
Awaiting customer
description
string

Stage description

Example:
This status is awaiting confirmation from a customer
colour
string

Stage colour. It has to be unique across the colours among stages of the same queue

Example:
F1SJ86
invoice_milestone
Object

Defines whether an Invoice milestone is planned as soon as Orders reach this stage.

percentage
number nullable

The milestone’s percentage. This percentage defines the Invoice’s total amount which will be the specfied X% on the order’s total amount.

Example:
13.5

Responses

201 Created
Body
Object
id
string

Order queu unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/orders/queues HTTP/1.1 

Content-Type: application/json

{
    "name": "Support Calls",
    "description": "Deals with support calls",
    "state": "ACTIVE",
    "invoice_upfront": "true",
    "stages": [
        {
            "order": 1,
            "state": "CANCELLED",
            "name": "Awaiting customer",
            "description": "This status is awaiting confirmation from a customer",
            "colour": "F1SJ86",
            "invoice_milestone": {
                "percentage": 13.5
            }
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Order Queue
PUT /orders/queues/{id}

Updates an existing Order Queue

Path variables

id
string required

Order Queue identifier

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

Request body

Object
name
string required

Order queue name which has to be unique across all Queues

Example:
Support Calls
description
string

Queue description

Example:
Manage Support Calls
state
string

Queue state. Only Active queues can be used for managing Orders

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
invoice_upfront
boolean

Determines if Orders will be invoiced upfront(on their creation)

Example:
true
stages
Array

List of Queue stages. At least 2 stages must be incuded for the New and Completed Order states (one stage for each state). Multiple stages can be set up while Orders are In Progress

Object
order
integer

The stage’s ordering sequence

Example:
1
state
string

The order life cycle state

Enumeration:
NEW
IN_PROGRESS
COMPLETED
CANCELLED
name
string

Stage name

Example:
Awaiting customer
description
string

Staeg description

Example:
This status is awaiting confirmation from a customer
colour
string

Stage colour. Has to be unique across colous of stages in the same queue

Example:
F1SJ86
invoice_milestone
Object

Milestone Invoices issued on reaching this stage

percentage
number

the Invoice lmilesotne’s amont calculated based on this X5 on the Oder’s total cost

Example:
11.5
is_ponr
boolean

Indicates that this stage will be the Point of No Return for Orders following the queue

Default:
false
Example:
true

Responses

200 OK
Body
Object
id
string

Order queue unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/orders/queues/{id} HTTP/1.1 

Content-Type: application/json

{
    "name": "Support Calls",
    "description": "Manage Support Calls",
    "state": "ACTIVE",
    "invoice_upfront": "true",
    "stages": [
        {
            "order": 1,
            "state": "COMPLETED",
            "name": "Awaiting customer",
            "description": "This status is awaiting confirmation from a customer",
            "colour": "F1SJ86",
            "invoice_milestone": {
                "percentage": 11.5
            },
            "is_ponr": "true"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Order Queue
DELETE /orders/queues/{id}

Deletes an Order Queue A Queue can only be delete dif it was never used in any Orders

Path variables

id
string required

Order queue unique identifier

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

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/orders/queues/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 204 No Content 
List Order Queues
GET /orders/queues

Returns a list of Order Queues

Request parameters

search_value
string optional

Search Queues by name, description

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

The state of the order queue

Enumeration:
ACTIVE
INACTIVE

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

Unique identifier of the Queue

Example:
74D9C84FA60F9FE407140E20F707726A
name
string

Queue name

Example:
Basic food ordering queue
description
string

Queue description

Example:
Basic food ordering queue
state
string

Queue state

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
stages
integer

Number of stages included in the Queue

Example:
3
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/orders/queues HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "74D9C84FA60F9FE407140E20F707726A",
            "name": "Basic food ordering queue",
            "description": "Basic food ordering queue",
            "state": "ACTIVE",
            "stages": 3
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Order Queue
GET /orders/queues/{id}

Returns detailed information of an Order Queue

Path variables

id
string required

Order Queue unique identifier

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 OK
Body
Object
id
string

Queue unique identifer

Example:
74D9C84FA60F9FE407140E20F707726A
name
string

Queue name

Example:
Basic food ordering queue
description
string

Queue description

Example:
Basic food ordering queue
state
string

Queue state

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
invoice_upfront
boolean

Determine sif Orders will be invoiced up front (on their creation) or on their completion

Default:
false
Example:
true
stages
Array

List of stages through which Orders using this queue will go through

Object
id
string

Queue stage uniue identifier

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

Stage ordering sequence

Example:
1
name
string

Stage name

Example:
Awaiting customer
description
string

Stage description

Example:
Awaiting customer lorem ipsulum
state
string

The type of the event

Enumeration:
NEW

Only one status is allowed for the NEW state per queue

IN PROGRESS

Multiple statuses are allowed for the IN PROGRESS state per queue.

COMPLETED

Only one status is allowed for the COMPLETED state per queue

point_of_no_return
boolean

Shows which order queue status also marks the point of no return for Orders

Example:
true
colour
string

Stage colour

Example:
FSD56F
invoice_milestone
Object

Milestone invoice issued when Orders of this queue reach the specified stage

percentage
number

The milestones percentage that defines the Invoice’s amount.

Example:
11.5
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/orders/queues/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "74D9C84FA60F9FE407140E20F707726A",
    "name": "Basic food ordering queue",
    "description": "Basic food ordering queue",
    "state": "ACTIVE",
    "invoice_upfront": "true",
    "stages": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "order": 1,
            "name": "Awaiting customer",
            "description": "Awaiting customer lorem ipsulum",
            "state": "NEW",
            "point_of_no_return": true,
            "colour": "FSD56F",
            "invoice_milestone": {
                "percentage": 11.5
            }
        }
    ]
}
Fulfillment Policies
POST /orders/fulfillment_policies/
PUT /orders/fulfillment_policies/{id}
DELETE /orders/fulfillment_policies/{id}
GET /orders/fulfillment_policies
GET /orders/fulfillment_policies/{id}
Create Order Fulfillment Policy
POST /orders/fulfillment_policies/

Creates a Fulfillment Policy that defines business rules on how Orders will be fulfilled. A business might have multiple Fuflfillement policies as long as their business rules are unique.

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

Fulfillment policy name which has to be unique across all policies.

Example:
Delivery Orders
description
string

Description of Fulfillment policy

Example:
Business rules on fulfilling Delivery orders
supply_methods
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
minimum_amount
number

Minimum required amount in order to place Orders. the amount is set in the business’s base Currency. This amount is validated against an Order’s final cost (i.e. after applying taxes and discounts).

Example:
9.99
automatic_completion
Object

Automatically mark an Order as Completed after a period of time. Such Orders must be in In progress state and also invoiced up-frond

duration
number required

Set the Order as Completed after this duration elapses

Example:
5
uot
string required

Duration’s unit of time

Example:
MINUTES
enable_completion_time
boolean

Defines whether average completion time will be calculated.

Default:
false
Example:
true
average_completion_time
Object

Used to calculate the average completion time for an Order

time_to_complete
integer required

Time required on an average basis

Example:
30
uot
string required

Average completion time’s unit of time

Example:
MINUTES
expenses
Array

List of expenses that will be applied as part of fulfilling an Order

Unique items: YES
Object
product_id
string required

Expense product to be applied on the Order’s cost. Only services marked as Expenses can be specified.

supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
order_amount
number

Defines the maximum threshold for applying the expense on the order (i.e. apply 2 euro delivery expense for orders less than 10 euros)

Example:
9.99
accessibility
Object required

Defines whether the fulfillment policy is applicable for all organisations under the Business or specific organisations

type
string required

Fulfillment policy to be applie don all or specific Organisations of the Business

Enumeration:
ALL
SPECIFIC
Default:
ALL
Example:
SPECIFIC
organisations
Array of string

The organisations (Merchants, Venues) that will fulfill orders based on this policy (applicable only if type = SPECIFIC)

Example:
[
    "CAD1E31269B76D7A65ACCE45B2E68DFD"
]
payment_method_types
Array

The applicable payment method types for this policy. If not specified then all allowed payment method types are applicable.

string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The fulfillment policy identifier

Example:
d892c9b4-0a6b-baf9-8a32-913c932bd2ab
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/orders/fulfillment_policies/ HTTP/1.1 

Content-Type: application/json

{
    "name": "Delivery Orders",
    "description": "Business rules on fulfilling Delivery orders",
    "supply_methods": "DELIVERY",
    "minimum_amount": 9.99,
    "automatic_completion": {
        "duration": 5,
        "uot": "MINUTES"
    },
    "enable_completion_time": "true",
    "average_completion_time": {
        "time_to_complete": 30,
        "uot": "MINUTES"
    },
    "expenses": [
        {
            "product_id": "",
            "supply_method": "DELIVERY",
            "order_amount": 9.99
        }
    ],
    "accessibility": {
        "type": "SPECIFIC",
        "organisations": [
            ""
        ]
    },
    "payment_method_types": [
        "ACCOUNT_DEBIT"
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "d892c9b4-0a6b-baf9-8a32-913c932bd2ab"
}
Update Order Fulfillment Policy
PUT /orders/fulfillment_policies/{id}

Update an existing Fulfillement Policy of Orders.

Path variables

id
string GUID required

The order fulfillment policy that will be updated

Example:
d892c9b4-0a6b-baf9-8a32-913c932bd2ab

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

Fulfillment policy name

Example:
Pick Up Orders
description
string

Fulfillment policy description

Example:
Business rules on fuflfilling Pick Up Orders
supply_methods
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
minimum_amount
integer

Minimum required amount in order to place Orders. the amount is set in the business’s base Currency. This amount is validated against an Order’s final cost (i.e. after applying taxes and discounts).

Example:
1
automatic_completion
Object

Automatically mark an Order as Completed after a period of time. Such Orders must be in In progress state and also invoiced up-frond

duration
string

Set the Order as Completed after this duration elapses

Example:
30
uot
string

Unit of time

Example:
MINUTES
enable_completion_time
boolean

Defines whether average completion time will be calculated.

Example:
true
average_completion_time
Object

Used to calculate the average completion time for an Order

time_to_complete
integer required

Time required on an average basis

Example:
30
time_to_complete_UOT
string required

Unit of time

Example:
MINUTES
expenses
Array

List of expenses that will be applied as part of fulfilling an Order

Unique items: YES
Object
product_id
string required

The expense to be applied on fulfilling Orders. Only Expense service products can be specified

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

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
order_amount
number

Defines the maximum threshold for applying the expense on the order (i.e. apply 2 euro delivery expense for orders less than 10 euros)

Example:
9.99
accessibility
Object required

Defines whether the fulfillment policy is applicable for all organisations under the Business or specific organisations

type
string required

Define whether the fulfillment policy is applied to all or specific organisations of the business

Enumeration:
ALL
SPECIFIC
Default:
ALL
Example:
SPECIFIC
organisations
Array of string

The organisations (Merchants, Venues) that will fulfill orders based on this policy (applicable only if type = SPECIFIC)

Example:
[
    "CAD1E31269B76D7A65ACCE45B2E68DFD"
]
payment_method_types
Array

The applicable payment method types for this policy. If not specified then all allowed payment method types are applicable.

string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The order fulfillment policy identifier

Example:
d892c9b4-0a6b-baf9-8a32-913c932bd2ab
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/orders/fulfillment_policies/d892c9b4-0a6b-baf9-8a32-913c932bd2ab HTTP/1.1 

Content-Type: application/json

{
    "name": "Pick Up Orders",
    "description": "Business rules on fuflfilling Pick Up Orders",
    "supply_methods": "DELIVERY",
    "minimum_amount": 1,
    "automatic_completion": {
        "duration": "30", 
        "uot": "MINUTES"
    },
    "enable_completion_time": "true",
    "average_completion_time": {
        "time_to_complete": 30,
        "time_to_complete_UOT": "MINUTES"
    },
    "expenses": [
        {
            "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "supply_method": "DELIVERY",
            "order_amount": 9.99
        }
    ],
    "accessibility": {
        "type": "SPECIFIC",
        "organisations": [
            ""
        ]
    },
    "payment_method_types": [
        "CHEQUE"
    ]
}
Delete Order Fulfillment Policy
DELETE /orders/fulfillment_policies/{id}

Deletes an existing Fulfillment Policy.

Path variables

id
string GUID required

The order fulfillment poilicy that will be deleted

Example:
d892c9b4-0a6b-baf9-8a32-913c932bd2ab

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/orders/fulfillment_policies/d892c9b4-0a6b-baf9-8a32-913c932bd2ab HTTP/1.1 

HTTP/1.1 204 No Content 
List Order Fulfillement Policies
GET /orders/fulfillment_policies

Return a list of configured Fulfillment Polcies for Orders.

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 by name or description

fulfilled_by
string optional

Search by the Organisation that fulfills Orders (base don policy’s Accessibility information).

supply_method
string optional

Search by Supply method

Enumeration:
DELIVERY
PICK_UP
DIRECT_SALE
ALL

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

Fulfillment Policy name

Example:
Delivery Orders
description
string

Fulfillment Policy Description

Example:
Business rules on fulfilling Delibery orders
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
organisations
Array

List of Organisations that can fulfill Orders based on this policy. If not specified, then policy is applied in the same way across all Organisations

Object
id
string

Organisation identifier

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

Organisation name

Example:
Good Burgers
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/orders/fulfillment_policies HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "name": "Delivery Orders",
            "description": "Business rules on fulfilling Delibery orders",
            "supply_method": "DELIVERY",
            "organisations": [
                {
                    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "Good Burgers"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Order Fulfillment Policy
GET /orders/fulfillment_policies/{id}

Returns detailed information for an Order fulfillment policy

Path variables

id
string GUID required

The order fulfillment policy that will be retrieved

Example:
c011cb43-b76e-7e5a-436c-f5917e358849

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

Fulfillment Policy name

Example:
Deivery Orders
description
string

Fulfillment Policy description

Example:
Business rules on fulfilling Delivery orders
supply_method
string

Policy applied on fulfilling orders of the specified supply method.

Enumeration:
DELIVERY
PICK_UP
DIRECT_SALE
ALL
minimum_amount
number

Minimum required amount in order to place Orders. the amount is set in the business’s base Currency. This amount is validated against an Order’s final cost (i.e. after applying taxes and discounts).

Example:
9.99
automatic_completion
Object

Automatically mark an Order as Completed after a period of time. Such Orders must be in In progress state and also invoiced up-frond

duration
string

Set the Order as Completed after this duration elapses

Example:
30
uot
string

Unit of time

Example:
MINUTES
enable_completion_time
boolean

Defines whether average completion time will be calculated.

Example:
true
average_completion_time
Object

Used to calculate the average completion time for an Order

time_to_complete
integer

Time required on an average basis

Example:
30
uot
string

Unit of time

Example:
MINUTES
accessibility
Object

Defines whether the fulfillment policy is applicable for all organisations under the Business or specific organisations

type
string

Fulfillment policy to be applie don all or specific Organisations of the Business

Enumeration:
ALL
SPECIFIC
organisations
Array

The organisations (Merchants, Venues) that will fulfill orders based on this policy (applicable only if type = SPECIFIC)

Object
id
string

The organisation identifier

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

The name of the organisation

Example:
Good Burgers
payment_method_types
Array

The applicable payment method types for this policy

string

The type of the event

Enumeration:
CARD
ACCOUNT_DEBIT
WALLET
CRM_WALLET
CASH
CHEQUE
ELECTRONIC_TRANSFER
expenses
Array

List of expenses that will be applied as part of fulfilling an Order

Object
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
product
Object

The Expense to be applied

id
string

Product identifier

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

Product SKU

Example:
DFEE
name
string

Product name

Example:
Delivery Fee
order_amount
number

Defines the maximum threshold for applying the expense on the order (i.e. apply 2 euro delivery expense for orders less than 10 euros)

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
GET https://sandbox.crm.com/backoffice/v2/orders/fulfillment_policies/c011cb43-b76e-7e5a-436c-f5917e358849 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "Deivery Orders", 
    "description": "Business rules on fulfilling Delivery orders",
    "supply_method": "DIRECT_SALE",
    "minimum_amount": 9.99,
    "automatic_completion": {
        "duration": "30",
        "uot": "MINUTES"
    },
    "enable_completion_time": "true",
    "average_completion_time": {
        "time_to_complete": 30,
        "uot": "MINUTES"
    },
    "accessibility": {
        "type": "SPECIFIC",
        "organisations": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Good Burgers"
            }
        ]
    },
    "payment_method_types": [
        "CHEQUE"
    ],
    "expenses": [
        {
            "supply_method": "DELIVERY",
            "product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "DFEE",
                "name": "Delivery Fee"
            },
            "order_amount": 1
        }
    ]
}
Completion Rules
POST /orders/completion_rules
PUT /orders/completion_rules/{id}
GET /orders/completion_rules/
DELETE /orders/completion_rules/{id}
Create Order Completion Rule
POST /orders/completion_rules

Creates a new rule for completing orders. These rules can be used in order to calculate an Order’s estimated completion time based on the Orders already placed within the Business. Multiple rules can be set up, as long as their business conditions are unique. If a rule’s conditions are met, then an additional completion time is added to the order’s estimated delivery time (the one that might be calculated based on average estimations of the Fulfillment Policy).

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

An additional completion time will be required and will be added to the Order’s estimated completion time if this rule’s conditions are met

duration
string

Additional completion time duration

Example:
5
uot
string

Unit of time

Example:
MINUTES
organisation_id
string

The Organisation that will fulfill the Orders

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
pending_orders
Object nullable

Number of pending, i.e. non-completed, Orders at the time that a new one is placed.

minimum
integer

Minimum number of Orders

Example:
1
maximum
integer required

Maximum number of Orders

Example:
10
pending_items
Object nullable

Number of items pending to be delivered i.e. the total number of items among all pending Orders

minimum
integer

Minimum ordered items in pending Orders

Example:
10
maximum
integer required

Maximum ordered items in pending Orders

Example:
22
product_conditions
Array nullable

Conditions related to the Ordered items (among the Orders which are pending)

Unique items: YES
Object
item_type
string required

Item type

Enumeration:
PRODUCT
TYPE
item_id
string required

The product identifier or product type identifier depending on the selected item type.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
timing_conditions
Array nullable

Timing conditions mthat must be met at the time a new Order is placed

Object
day_of_week
string

Order placed during a week day

Example:
MONDAY
start_time
string

Order placed from this time of the day

Example:
09:00
end_time
string

Order place until this time of day (must be specified after the start_time

Example:
11:00

Responses

201 Created
Body
Object
id
string

The Completion rule’s identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/orders/completion_rules HTTP/1.1 

Content-Type: application/json

{
    "additional_completion_time": {
        "duration": "5",
        "uot": "MINUTES"
    },
    "organisation_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "pending_orders": {
        "minimum": 1,
        "maximum": 10
    },
    "pending_items": {
        "minimum": 10,
        "maximum": 22
    },
    "product_conditions": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "timing_conditions": [
        {
            "day_of_week": "MONDAY",
            "start_time": "09:00",
            "end_time": "11:00"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Order Completion Rule
PUT /orders/completion_rules/{id}

Updates an existing rule for completing orders. An Order completion rule can be removed at any point of time.

Path variables

id
string required

Order Completion Rule identifier

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

Request body

Object
additional_completion_time
Object

An additional completion time will be required and will be added to the Order’s estimated completion time if this rule’s conditions are met

duration
string

Additional completion time duration

Example:
5
uot
string

Unit of time

Example:
MINUTES
organisation_id
string

The Organisation that will fulfill the Orders

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
pending_orders
Object nullable

Number of pending, i.e. non-completed, Orders at the time that a new one is placed.

minimum
integer

Minimum number of Orders

Example:
1
maximum
integer required

Maximum number of Orders

Example:
10
pending_items
Object nullable

Number of items pending to be delivered i.e. the total number of items among all pending Orders

minimum
integer

Minimum ordered items in pending Orders

Example:
10
maximum
integer required

Maximum ordered items in pending Orders

Example:
22
product_conditions
Array nullable

Conditions related to the Ordered items (among the Orders which are pending)

Unique items: YES
Object
item_type
string required

Item type

Enumeration:
PRODUCT
TYPE
item_id
string required

The product identifier or product type identifier depending on the selected item type.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
timing_conditions
Array nullable

Timing conditions mthat must be met at the time a new Order is placed

Object
day_of_week
string

Order placed during a week day

Example:
MONDAY
start_time
string

Order placed from this time of the day

Example:
09:00
end_time
string

Order place until this time of day (must be specified after the start_time

Example:
11:00

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

200 OK

The request has succeeded

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

Content-Type: application/json

{
    "additional_completion_time": {
        "duration": "5",
        "uot": "MINUTES"
    },
    "organisation_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "pending_orders": {
        "minimum": 1,
        "maximum": 10
    },
    "pending_items": {
        "minimum": 10,
        "maximum": 22
    },
    "product_conditions": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "timing_conditions": [
        {
            "day_of_week": "MONDAY",
            "start_time": "09:00",
            "end_time": "11:00"
        }
    ]
}

HTTP/1.1 200 OK 
List Order Completion Rules
GET /orders/completion_rules/

Retrieves a list of all Order Completion Rules.

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
organisation_id
string optional

Search for completion rules based on the Organisation that fulfills orders

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

Request body

Object
additional_completion_time
Object

An additional completion time will be required and will be added to the Order’s estimated completion time if this rule’s conditions are met

duration
string

Additional completion time duration

Example:
5
uot
string

Unit of time

Example:
MINUTES
organisation
Object

The Organisation that will fulfill the Orders

id
string

Organisation identifier

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

Organisation name

Example:
Good Burgers
pending_orders
Object nullable

Number of pending, i.e. non-completed, Orders at the time that a new one is placed.

minimum
integer

Minimum number of Orders

Example:
1
maximum
integer required

Maximum number of Orders

Example:
10
pending_items
Object nullable

Number of items pending to be delivered i.e. the total number of items among all pending Orders

minimum
integer

Minimum ordered items in pending Orders

Example:
10
maximum
integer required

Maximum ordered items in pending Orders

Example:
22
product_conditions
Array nullable

Conditions related to the Ordered items (among the Orders which are pending)

Unique items: YES
Object
item_type
string required

Item type

Enumeration:
PRODUCT
TYPE
iid
string required

The product identifier or product type identifier depending on the selected item type.

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

Product or Product type name

Example:
Coffee
SKU
string

Product SKU

Example:
COFFEE
timing_conditions
Array nullable

Timing conditions mthat must be met at the time a new Order is placed

Object
day_of_week
string

Order placed during a week day

Example:
MONDAY
start_time
string

Order placed from this time of the day

Example:
09:00
end_time
string

Order place until this time of day (must be specified after the start_time

Example:
11:00

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

200 OK

The request has succeeded

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

Content-Type: application/json

{
    "additional_completion_time": {
        "duration": "5",
        "uot": "MINUTES"
    },
    "organisation": {
        "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "name": "Good Burgers"
    },
    "pending_orders": {
        "minimum": 1,
        "maximum": 10
    },
    "pending_items": {
        "minimum": 10,
        "maximum": 22
    },
    "product_conditions": [
        {
            "item_type": "TYPE",
            "iid": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Coffee",
            "SKU": "COFFEE"
        }
    ],
    "timing_conditions": [
        {
            "day_of_week": "MONDAY",
            "start_time": "09:00",
            "end_time": "11:00"
        }
    ]
}

HTTP/1.1 200 OK 
Delete Order Completion Rule
DELETE /orders/completion_rules/{id}

Delete an existing order completion rule

Path variables

id
string required

Order Completion Rule identifier

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

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/orders/completion_rules/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 204 No Content 
Passes

Generic settings for passes

GET /pass_settings
PUT /pass_settings
Get Pass Settings
GET /pass_settings

Get the generic settings for financial passes

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Responses

200 200

Successful Request

Body
Object
pass_code_hashing
Object

Pass code hashing details

is_enabled
boolean

Is pass code hashing enabled?

Example:
true
algorithm
string

Hashing algorithm (if hashing is enabled)

Enumeration:
SHA-1
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/pass_settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "pass_code_hashing": {
        "is_enabled": "true",
        "algorithm": "SHA-1"
    }
}
Update Pass Settings
PUT /pass_settings

Update generic financial pass settings

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

Pass code hashing details

is_enabled
boolean

Is pass code hashing enabled?

Example:
true
algorithm
string

Hashing algorithm (if hashing is enabled)

Enumeration:
SHA-1

Responses

200 OK
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/pass_settings HTTP/1.1 

Content-Type: application/json

{
    "pass_code_hashing": {
        "is_enabled": "true",
        "algorithm": "SHA-1"
    }
}
Platform

Platform enables the ability to configure system settings applicable across the software

PUT /platform/settings
GET /platform/settings
Update Platform Settings
PUT /platform/settings

Set (generic) platform settings that will be applicable across the software

Notes

TIMEZONE

Timezone defines the local time that the business operates in.

COUNTRIES OF AGREEMENT

Countries of agreement defines the countries that a business operates in (multi-regional business) and are assigned on contacts during their registration - based on a contry of agreement a business can target specific reward offers or segment contacts.

COMMUNICATION & CONTENT TRANSLATION LANGUAGES

Communication languages can be configured per business and are used for sending a communication content in different languages (based on contact’s preferred communication language).

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

The timezone of the organisation (applicable for business organisations)

Example:
EUROPE/ATHENS
content_languages
Array nullable

The languages that can be used in communications and content translations

string
Example:
EN
agreement_countries
Array

Defines the countries that will be assigned on a contact during registration

Object
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
is_default
boolean

Defines whether the country is the default one or not

Example:
true
currencies
Array

List of supported currencies per Country of agreement used in cases where a business requires different currency options per operating country. If nothing is specified, then contacts of this Country of agremeent can have accounts in any of the supported currencies of the business, having the business base currency applied on creating a default account. If currencies are set, then contacts of this country can only hav accounts in currencies of this restrictive list. The set of currencies must include only the business’s supported currencies.

Unique items: YES
Object
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
is_default
boolean

One (and only one) currency must be marked as the default one

Example:
true

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
PUT https://sandbox.crm.com/backoffice/v2/platform/settings HTTP/1.1 

Content-Type: application/json

{
    "timezone": "EUROPE/ATHENS",
    "content_languages": [
        "EN"
    ],
    "agreement_countries": [
        {
            "country_code": "CYP",
            "is_default": true,
            "currencies": [
                {
                    "currency_code": "EUR",
                    "is_default": "true"
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 
Get Platform Settings
GET /platform/settings

Get (generic) platform settings that are applicable across the software

Notes

TIMEZONE

Timezone defines the local time that the business operates in.

COUNTRIES OF AGREEMENT

Countries of agreement defines the countries that a business operates in (multi-regional business) and are assigned on contacts during their registration - based on a contry of agreement a business can target specific reward offers or segment contacts.

SOFTWARE LANGUAGES

Software languages is a pre-defined list of languages that the CRM.COM back-end SPA can be translated into and each user can select the preferred software language. Such languages cannot be configured and come our of the box.

COMMUNICATION & CONTENT TRANSLATION LANGUAGES

Communication languages can be configured per business and are used for sending a communication content in different languages (based on contact’s preferred communication language).

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
timezone
string

The organisation timezone

Example:
EUROPE/ATHENS
software_languages
Array

The languages that the back-end software can be translated to

string
Example:
GR
content_languages
Array

The languages that can be used in communications and content translations

string
Example:
EN
agreement_countries
Array

Defines a contact’s Country of Agreement that could be assigned on contact registration. One of them (and only one) must be specified as the default i.e. the base Country of agreement that usually represents the Business’s base country

Object
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
is_default
boolean

Defines whether the country is the default one or not

Example:
true
currencies
Array

List of supported currencies per Country of agreement used in cases where a business requires different currency options per operating country. If nothing is specified, then contacts of this Country of agremeent can have accounts in any of the supported currencies of the business, having the business base currency applied on creating a default account. If currencies are set, then contacts of this country can only hav accounts in currencies of this restrictive list. The set of currencies must include only the business’s supported currencies.

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

One (and only one) currency must be marked as the default one

Example:
true
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/platform/settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "timezone": "EUROPE/ATHENS",
    "software_languages": [
        "GR"
    ],
    "content_languages": [
        "EN"
    ],
    "agreement_countries": [
        {
            "country_code": "CYP",
            "is_default": "true",
            "currencies": [
                {
                    "currency_code": "EUR",
                    "is_default": "true"
                }
            ]
        }
    ]
}
Applications

Applications provided by CRM.COM is an ultra modern approach to enabling contacts to register, earn and keep track of their loyalty progress, view reward offers, place online orders and view & manage their subscriptions

POST /applications
PUT /applications/{id}
DELETE /applications/{id}
GET /applications
GET /applications/{id}
Create Application
POST /applications

Create a new application

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

Example:
Brew Coffee
description
string nullable

The application description

Example:
Best coffee application
type
string required

The application type

Enumeration:
NATIVE

Mobile Contact Applications

NATIVE_MERCHANT

Mobile Merchant Applications

WEB

Web Portal

CAPTIVE

Captive Portal

appearance
Object required

The application appearance settings

colors
Array nullable

The application color style

Object
type
string required

Defines the component on which the color will be applied

Enumeration:
LANDING_BACKGROUND
LANDING_CARD
LANDING_TEXT
SCREEN_CARD
SCREEN_BUTTON
SCREEN_WALLET
value
string required

The color (hex) code

Example:
#eb4034
fonts
Array nullable

The application text font style

Object
type
string required

Defines the component on which the font will be applied

Enumeration:
TEXT
font
string required

The text font style that the app will use

Enumeration:
San Francisco
Roboto
Helvetica
Open Sans
Poppins
Georgia
Gilroy
dark_mode
boolean nullable

The colour scheme of the app

Default:
false
Example:
true
homepage_layout
string nullable

The application type

Enumeration:
LAYOUT1
LAYOUT2
LAYOUT3
LAYOUT4
LAYOUT5
advanced_colour_mapping
string nullable

JSON script contaning specific mapping of existing colour settings to particular elements of the app. Used in special circumstances to allow fine tuning of colour mapping without the need to rebuild the app. This is maintatined solely by CRMI and is not visible on the back-end UI.

Example:
let appearance = { main_color: '#ffffff', //landing_page.text_color, landing_page.button_text_color, main_page.card_text_color, main_page.icon_color, side_bar.text_color, side_bar.icon_color, tab_bar.background_color button_color: '#50e3c2',//landing_page.button_color, main_page.button_color, main_page.button_selected, side_bar.background_color, tab_bar.selected, card_color: '#F0F0F3', //main_page.button_unselected, main_page.card_bg_color, main_page.input_background_color background_color: '#d32166', //landing_page.background_color text_normal_color: '#212121', //main_page.text_label_color, main_page.input_label_color text_main_color: '#03041D', //main_page.button_unselected_text_color, main_page.text_color, main_page.text_title_color, main_page.card_icon_color, main_page.input_text_color border_color: 'rgba(3, 4, 29, 0.16)', //main_page.border_button_color, main_page.border_input_color, tab_bar.unselected, darkmode_color: '#212121', //background pages when dark_mode = true darkmode_text: '#ffffff', //main_page.text_color }
features
Object required

The application feature settings

contact
Object required nullable

Details about the features that will be supported by the app

business_network
Object required

Defines the supported business network features

is_supported
boolean required

Defines whether business network features should be available

Default:
false
Example:
true
multitenancy
Object required

Defines whether multitenancy features will be available

is_supported
boolean required

Defines whether multitenancy is supported

Example:
true
contact
Object required

Defines the supported contact features

code_representation
string nullable

How the contact code will be depicted on the app/portal, for scanning purposes

Enumeration:
BARCODE

As a barcode

QR_CODE

As a QR code

Example:
BARCODE
existing_contacts
boolean nullable

Defines whether app will prompt contacts to link their past loyalty account with CRM

Example:
false
communities
Object nullable

Defines whether communities (relationships between contacts) features will be available

is_supported
boolean required

Defines whether communities is supported

Example:
true
profile
Array nullable

Defines the details that a contact can provide

Object
type
string required

The contact detail

Enumeration:
BIRTHDATE
GENDER
NAMEDAY
is_supported
boolean required

Defines if such detail is supported or not

Example:
true
crm
Object required

Defines the supported crm features

is_supported
boolean required

Defines whether contact features should be available

Default:
false
Example:
true
service_requests
Object nullable

Defines the supported service request features

is_supported
boolean required

Defines whether contacts will be able to create service requests

Example:
true
supported_queues
Array

Defines whether and which service request queue, contacts will be able to select

Object
id
string GUID

The service request queue identifier

Example:
8237416b-ecca-769a-a38a-293320b0ffdf
finance
Object required

Defines the supported finance features

is_supported
boolean required

Defines whether finance features should be available

Default:
false
Example:
true
wallet_top_up
boolean required

Defines whether contacts will be able to top up their wallets

Example:
true
redeem_pass
Object nullable

Defines the supported redeem pass features

is_supported
boolean required

Defines whether contacts will be able to redeem a pass

Example:
false
pass_attributes
Array nullable

Defines whether pass redemption should be supported by other attributes

Object
type
string required

The type of supplementary attribute

Enumeration:
CODE
VALUE
PIN
order
Object required

Defines the supported ordering features

is_supported
boolean required

Defines whether order features should be available

Default:
false
Example:
true
pick_up
boolean required

Defines whether pick up is supported as supply method

Example:
true
delivery
boolean required

Defines whether delivery is supported as supply method

Example:
true
direct_sale
boolean required

Defines whether direct sale is supported as supply method

Example:
true
preferred_organisation
boolean nullable

Defines whether contact can set preferred organisation for ordering

Example:
true
order_countries
Array nullable

Defines the countries where orders can be made

Object
country
string required

The country (code)

Example:
CYP
order_catalogs
Array nullable

Defines a list of order catalogs that should filter available products to order

Object
id
string GUID required

The order catalog identifier

Example:
676055d9-fe79-6836-8a50-c2d3764e9919
use_wallet_funds
Object required

Defines the wallet funds features

is_supported
boolean required

Defines whether contact can pay for order using wallet funds

Default:
false
Example:
false
specific_funds_amount
boolean required

Defines whether contacts can specific the wallet funds amount to use on orders

Default:
false
Example:
false
cover_full_basket
boolean required

Defines whether the wallet fund amount must cover the full basket amount

Default:
false
Example:
false
reward
Object required

Defines the supported rewards features

is_supported
boolean required

Defines whether reward features should be available

Default:
false
Example:
true
tiering
boolean required

Defines whether reward tiering will be supported

Example:
true
preferred_organisation
boolean

Defines whether contact can select his/her preferred organisation for rewards

Example:
true
refer_friend
Object nullable

Defines the supported refer a friend features

is_supported
boolean required

Defines whether refer a friend will be supported

Example:
true
refer_methods
Array required

Defines the communication method that should be used for refer a friend (required when refer a friend is enabled)

string
Enumeration:
EMAIL
SMS
otp_spend
Object nullable

Defines the supported OTP spend features

is_supported
boolean required

Defines whether OTP spend will be supported

Example:
true
spend_attributes
Array nullable

Defines the supplementary attributes that will be supported for OTP spends (required when OTP spend is enabled)

Object
type
string required

The type of supplementary attribute

Enumeration:
AMOUNT
self_submit_purchases
Object nullable

Defines the supported contact self-submit purchase events features

is_supported
boolean required

Defines whether contact can self-submit purchase events

Example:
true
self_submit_methods
Array required

Defines how self-submit (reclaim) purchase identification will be made (required when contact self-submit purchase is enabled)

string
Enumeration:
BARCODE
TRX_CODE
marketing
Object required

Defines the supported marketing content features

is_supported
boolean required

Defines whether marketing content should be available

Default:
false
Example:
true
embedded_links
Array required

Define links for embedded browser in front-end systems

Object
title
string required

Defines the title of the link

Example:
New and upcoming events
url
string required

Defines the URL of the link

Example:
https://www.guababechbar.com/news&events
creatives
Array nullable
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
mobile_pass
Object required

Defines the supported mobile pass features

is_supported
boolean required

Defines whether mobile pass should be available

Example:
true
merchant
Object required nullable

The features that will be supported by the application

reward
Object nullable

Defines the supported reward features

is_supported
boolean required

Defines whether reward features should be available

Example:
true
purchase
Object nullable

Defines the supported purchase event features

is_supported
boolean required

Defines whether merchants can submit purchase events

Example:
true
allow_spend
boolean nullable

Defines whether the merchant app supports submission of spend requests

Example:
false
restrict_fully_covered
boolean nullable

Defines whether the purchase will be posted successfully only if requested spend amount fully covers the purchase amount

Example:
true
authentication
Object required

The application authentication settings, i.e. how contacts can register and sign-in

email_password
boolean required

Defines whether contacts can register & sign-in based on email and password

Default:
false
Example:
true
email_otp
boolean required

Defines whether contacts can register & sign-in based on email and one-time password

Default:
false
Example:
true
sms_otp
boolean required

Defines whether contacts can register & sign-in based on phone and one-time password

Default:
false
Example:
true
facebook
Object required

Defines whether contacts can register & sign-in based on Facebook (including Facebook authentication details)

is_supported
boolean required

Defines whether Facebook authentication is enabled or not

Default:
false
Example:
true
app_id
string required nullable

The Facebook App ID required for Google authentication (required when Facebook Auth is enabled)

Example:
dsf-w-f-esf-23f-w-eff2f
app_secret
string required nullable

The Facebook App Secret for Server-to-Server communication (must not be sent to client) (required when Facebook Auth is enabled)

Example:
qqsdf-23-we-wer-3ew-qq
google
Object required

Defines whether contacts can register & sign-in based on Google (including Google authentication details)

is_supported
boolean required

Defines whether Google authentication is supported or not

Default:
false
Example:
true
app_id
string required nullable

The Google App ID required for Google authentication (required when Google Auth is enabled)

Example:
dsf-w-f-esf-23f-w-eff2f
app_secret
string required nullable

The Google App Secret for Server-to-Server communication (must not be sent to client) (required when Google Auth is enabled)

Example:
qqsdf-23-we-wer-3ew-qq
demo_contact
Object required

The contact assigned as demo contact (used for app store verification purposes)

is_supported
boolean required

Defines whether demo contact is supported or not

Default:
false
Example:
true
contact_id
string GUID required nullable

The contact (identifier) that will be assigned as demo contact (required only if demo contact is enabled)

Example:
17e32149-1da4-6a55-456e-8874b7afac56
otp
string required nullable

The one-time password that will be accepted for sign-in purposes (required only if demo contact is enabled)

Example:
123456
manage_credentials
Object required

Defines whether contacts will be able to manager their authentication details

add_new
boolean required

Defiens whether contact will be able to add new authentication details

Example:
false
update_existing
boolean required

Defiens whether contact will be able to update existing authentication details

Example:
true
delete_existing
boolean required

Defiens whether contact will be able to delete existing authentication details

Example:
false
platforms
Array required

The application platform identifiers (e.g. operating platform, version, cloud name)

Unique items: YES
Object
platform
string required

The platform on which the application will be published

Enumeration:
APPLE
GOOGLE
WEB
platform_id
string required nullable

The platform identifier on which such application is published (applicable for native mobile applications)

Example:
1762e052-4805-73eb-36f2-e77d6dc883e8
cloud_name
string required nullable

The cloud name on which such application is published (applicable for browser based applications)

version
string nullable

The application version

Example:
1.1
information
Object required

The application “about” settings (e.g. terms & conditions, FAQs)

content
Array nullable

The application content information

Object
type
string required

The content type

Enumeration:
ABOUT

About

TERMS_CONDITIONS

Terms & Conditions

PRIVACY_POLICY

Privacy Policy

FAQS

Frequently-Asked Questions

url
string required nullable

The detail URL endpoint (URL or Content is required)

Example:
https?/crm.com
rich_content
string required nullable

The detail rich content (URL or Content is required)

Example:
Terms & Conditions
contact_us
Object nullable

The application “contact us” details

email_address
string nullable

The contact email address

Example:
info@crm.com
phone
Object nullable
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
number
string

The phone number

Example:
99123456
type
string
Enumeration:
LANDLINE
MOBILE
FAX
website
string nullable

The contact website (URL endpoint)

Example:
https://crm.com

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The application identifier

Example:
118e64a6-85ad-413a-b6a1-9aeffd678ef3
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/applications HTTP/1.1 

Content-Type: application/json

{
    "name": "Brew Coffee",
    "description": "Best coffee application",
    "type": "NATIVE",
    "appearance": {
        "colors": [
            {
                "type": "SCREEN_BUTTON",
                "value": "#eb4034"
            }
        ],
        "fonts": [
            {
                "type": "TEXT",
                "font": "Roboto"
            }
        ],
        "dark_mode": true,
        "homepage_layout": "LAYOUT1",
        "advanced_colour_mapping": "let appearance = { main_color: '#ffffff', //landing_page.text_color, landing_page.button_text_color, main_page.card_text_color, main_page.icon_color, side_bar.text_color, side_bar.icon_color, tab_bar.background_color button_color: '#50e3c2',//landing_page.button_color, main_page.button_color, main_page.button_selected, side_bar.background_color, tab_bar.selected, card_color: '#F0F0F3', //main_page.button_unselected, main_page.card_bg_color, main_page.input_background_color background_color: '#d32166', //landing_page.background_color text_normal_color: '#212121', //main_page.text_label_color, main_page.input_label_color text_main_color: '#03041D', //main_page.button_unselected_text_color, main_page.text_color, main_page.text_title_color, main_page.card_icon_color, main_page.input_text_color border_color: 'rgba(3, 4, 29, 0.16)', //main_page.border_button_color, main_page.border_input_color, tab_bar.unselected, darkmode_color: '#212121', //background pages when dark_mode = true darkmode_text: '#ffffff', //main_page.text_color }"
    },
    "features": {
        "contact": {
            "business_network": {
                "is_supported": true,
                "multitenancy": {
                    "is_supported": "true"
                }
            },
            "contact": {
                "code_representation": "BARCODE",
                "existing_contacts": "false",
                "people": {
                    "is_supported": "true"
                },
                "profile": [
                    {
                        "type": "GENDER",
                        "is_supported": "true"
                    }
                ]
            },
            "crm": {
                "is_supported": true,
                "service_requests": {
                    "is_supported": true,
                    "supported_queues": [
                        {
                            "id": "8237416b-ecca-769a-a38a-293320b0ffdf"
                        }
                    ]
                }
            },
            "finance": {
                "is_supported": true,
                "wallet_top_up": "true",
                "redeem_pass": {
                    "is_supported": "false",
                    "pass_attributes": [
                        {
                            "type": "VALUE"
                        }
                    ]
                }
            },
            "order": {
                "is_supported": true,
                "pick_up": true,
                "delivery": true,
                "direct_sale": true,
                "preferred_organisation": "true",
                "order_countries": [
                    {
                        "country": "CYP"
                    }
                ],
                "order_catalogs": [
                    {
                        "id": "676055d9-fe79-6836-8a50-c2d3764e9919"
                    }
                ],
                "use_wallet_funds": {
                    "is_supported": "false",
                    "specific_funds_amount": "false",
                    "cover_full_basket": "false"
                }
            },
            "reward": {
                "is_supported": "true",
                "tiering": "true",
                "preferred_organisation": "true",
                "refer_friend": {
                    "is_supported": "true",
                    "refer_methods": [
                        "EMAIL"
                    ]
                },
                "otp_spend": {
                    "is_supported": "true",
                    "spend_attributes": [
                        {
                            "type": "AMOUNT"
                        }
                    ]
                },
                "self_submit_purchases": {
                    "is_supported": "true",
                    "self_submit_methods": [
                        "BARCODE"
                    ]
                }
            },
            "marketing": {
                "is_supported": true,
                "embedded_links": [
                    {
                        "title": "New and upcoming events",
                        "url": "https://www.guababechbar.com/news&events",
                        "creatives": [
                            {
                                "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                                "usage_type": "WALLET_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"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            "mobile_pass": {
                "is_supported": "true"
            }
        },
        "merchant": {
            "reward": {
                "is_supported": true,
                "purchase": {
                    "is_supported": "true",
                    "allow_spend": "false",
                    "restrict_fully_covered": "true"
                }
            }
        }
    },
    "authentication": {
        "email_password": true,
        "email_otp": "true",
        "sms_otp": true,
        "facebook": {
            "is_supported": "true",
            "app_id": "dsf-w-f-esf-23f-w-eff2f",
            "app_secret": "qqsdf-23-we-wer-3ew-qq"
        },
        "google": {
            "is_supported": "true",
            "app_id": "dsf-w-f-esf-23f-w-eff2f",
            "app_secret": "qqsdf-23-we-wer-3ew-qq"
        },
        "demo_contact": {
            "is_supported": "true",
            "contact_id": "17e32149-1da4-6a55-456e-8874b7afac56",
            "otp": "123456"
        }
    },
    "platforms": [
        {
            "platform": "GOOGLE",
            "platform_id": "1762e052-4805-73eb-36f2-e77d6dc883e8",
            "cloud_name": "",
            "version": "1.1"
        }
    ],
    "information": {
        "content": [
            {
                "type": "ABOUT",
                "url": "https?/crm.com",
                "rich_content": "Terms & Conditions"
            }
        ],
        "contact_us": {
            "email_address": "info@crm.com",
            "phone": {
                "country_code": "CYP",
                "number": "99123456",
                "type": "LANDLINE"
            },
            "website": "https://crm.com"
        }
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "118e64a6-85ad-413a-b6a1-9aeffd678ef3"
}
Update Application
PUT /applications/{id}

Update an existing application

Path variables

id
string GUID required

The application (identifier) that will be updated

Example:
5fd79941-e4ce-e6b9-2a3c-b455e3fb0220

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

Example:
Brew Coffee
description
string nullable

The application description

Example:
Best coffee application
appearance
Object nullable

The application appearance settings

colors
Array nullable

The application color style

Object
type
string required

Defines the component on which the color will be applied

Enumeration:
LANDING_BACKGROUND
LANDING_CARD
LANDING_TEXT
SCREEN_CARD
SCREEN_BUTTON
SCREEN_WALLET
value
string required

The color (hex) code

Example:
#eb4034
fonts
Array nullable

The application text font style

Object
type
string required

Defines the component on which the font will be applied

Enumeration:
TEXT
font
string required

The text font style that the app will use

Enumeration:
San Francisco
Roboto
Helvetica
Open Sans
Poppins
Georgia
Gilroy
dark_mode
boolean nullable

The colour scheme of the app

Default:
false
Example:
true
homepage_layout
string nullable

The application type

Enumeration:
LAYOUT1
LAYOUT2
LAYOUT3
LAYOUT4
LAYOUT5
advanced_colour_mapping
string nullable

JSON script contaning specific mapping of existing colour settings to particular elements of the app. Used in special circumstances to allow fine tuning of colour mapping without the need to rebuild the app. This is maintatined solely by CRMI and is not visible on the back-end UI.

Example:
let appearance = { main_color: '#ffffff', //landing_page.text_color, landing_page.button_text_color, main_page.card_text_color, main_page.icon_color, side_bar.text_color, side_bar.icon_color, tab_bar.background_color button_color: '#50e3c2',//landing_page.button_color, main_page.button_color, main_page.button_selected, side_bar.background_color, tab_bar.selected, card_color: '#F0F0F3', //main_page.button_unselected, main_page.card_bg_color, main_page.input_background_color background_color: '#d32166', //landing_page.background_color text_normal_color: '#212121', //main_page.text_label_color, main_page.input_label_color text_main_color: '#03041D', //main_page.button_unselected_text_color, main_page.text_color, main_page.text_title_color, main_page.card_icon_color, main_page.input_text_color border_color: 'rgba(3, 4, 29, 0.16)', //main_page.border_button_color, main_page.border_input_color, tab_bar.unselected, darkmode_color: '#212121', //background pages when dark_mode = true darkmode_text: '#ffffff', //main_page.text_color }
features
Object nullable

The application feature settings

contact
Object required nullable

Details about the features that will be supported by the app

business_network
Object required

Defines the supported business network features

is_supported
boolean required

Defines whether business network features should be available

Default:
false
Example:
true
multitenancy
Object required

Defines whether multitenancy features will be available

is_supported
boolean required

Defines whether multitenancy is supported

Example:
true
contact
Object required

Defines the supported contact features

code_representation
string nullable

How the contact code will be depicted on the app/portal, for scanning purposes

Enumeration:
BARCODE

As a barcode

QR_CODE

As a QR code

Example:
BARCODE
existing_contacts
boolean nullable

Defines whether app will prompt contacts to link their past loyalty account with CRM

Example:
false
communities
Object nullable

Defines whether communities (relationships between contacts) features will be available

is_supported
boolean required

Defines whether communities is supported

Example:
true
profile
Array nullable

Defines the details that a contact can provide

Object
type
string required

The contact detail

Enumeration:
BIRTHDATE
GENDER
NAMEDAY
is_supported
boolean required

Defines if such detail is supported or not

Example:
true
crm
Object required

Defines the supported crm features

is_supported
boolean required

Defines whether contact features should be available

Default:
false
Example:
true
service_requests
Object nullable

Defines the supported service request features

is_supported
boolean required

Defines whether contacts will be able to create service requests

Example:
true
supported_queues
Array

Defines whether and which service request queue, contacts will be able to select

Object
id
string GUID

The service request queue identifier

Example:
8237416b-ecca-769a-a38a-293320b0ffdf
finance
Object required

Defines the supported finance features

is_supported
boolean required

Defines whether finance features should be available

Default:
false
Example:
true
wallet_top_up
boolean required

Defines whether contacts will be able to top up their wallets

Example:
true
redeem_pass
Object nullable

Defines the supported redeem pass features

is_supported
boolean required

Defines whether contacts will be able to redeem a pass

Example:
false
pass_attributes
Array nullable

Defines whether pass redemption should be supported by other attributes

Object
type
string required

The type of supplementary attribute

Enumeration:
CODE
VALUE
PIN
order
Object required

Defines the supported ordering features

is_supported
boolean required

Defines whether order features should be available

Default:
false
Example:
true
pick_up
boolean required

Defines whether pick up is supported as supply method

Example:
true
delivery
boolean required

Defines whether delivery is supported as supply method

Example:
true
direct_sale
boolean required

Defines whether direct sale is supported as supply method

Example:
true
preferred_organisation
boolean nullable

Defines whether contact can set preferred organisation for ordering

Example:
true
order_countries
Array nullable

Defines the countries where orders can be made

Object
country
string required

The country (code)

Example:
CYP
order_catalogs
Array nullable

Defines a list of order catalogs that should filter available products to order

Object
id
string GUID required

The order catalog identifier

Example:
676055d9-fe79-6836-8a50-c2d3764e9919
use_wallet_funds
Object required

Defines the wallet funds features

is_supported
boolean required

Defines whether contact can pay for order using wallet funds

Default:
false
Example:
false
specific_funds_amount
boolean required

Defines whether contacts can specific the wallet funds amount to use on orders

Default:
false
Example:
false
cover_full_basket
boolean required

Defines whether the wallet fund amount must cover the full basket amount

Default:
false
Example:
false
reward
Object required

Defines the supported rewards features

is_supported
boolean required

Defines whether reward features should be available

Default:
false
Example:
true
tiering
boolean required

Defines whether reward tiering will be supported

Example:
true
preferred_organisation
boolean

Defines whether contact can select his/her preferred organisation for rewards

Example:
true
refer_friend
Object nullable

Defines the supported refer a friend features

is_supported
boolean required

Defines whether refer a friend will be supported

Example:
true
refer_methods
Array required

Defines the communication method that should be used for refer a friend (required when refer a friend is enabled)

string
Enumeration:
EMAIL
SMS
otp_spend
Object nullable

Defines the supported OTP spend features

is_supported
boolean required

Defines whether OTP spend will be supported

Example:
true
spend_attributes
Array nullable

Defines the supplementary attributes that will be supported for OTP spends (required when OTP spend is enabled)

Object
type
string required

The type of supplementary attribute

Enumeration:
AMOUNT
self_submit_purchases
Object nullable

Defines the supported contact self-submit purchase events features

is_supported
boolean required

Defines whether contact can self-submit purchase events

Example:
true
self_submit_methods
Array required

Defines how self-submit (reclaim) purchase identification will be made (required when contact self-submit purchase is enabled)

string
Enumeration:
BARCODE
TRX_CODE
marketing
Object required

Defines the supported marketing content features

is_supported
boolean required

Defines whether marketing content should be available

Default:
false
Example:
true
embedded_links
Array required

Define links for embedded browser in front-end systems

Object
title
string required

Defines the title of the link

Example:
New and upcoming events
url
string required

Defines the URL of the link

Example:
https://www.guababechbar.com/news&events
creatives
Array nullable
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
mobile_pass
Object required

Defines the supported mobile pass features

is_supported
boolean required

Defines whether mobile pass should be available

Example:
true
merchant
Object required nullable

The features that will be supported by the application

reward
Object nullable

Defines the supported reward features

is_supported
boolean required

Defines whether reward features should be available

Example:
true
purchase
Object nullable

Defines the supported purchase event features

is_supported
boolean required

Defines whether merchants can submit purchase events

Example:
true
allow_spend
boolean nullable

Defines whether the merchant app supports submission of spend requests

Example:
false
restrict_fully_covered
boolean nullable

Defines whether the purchase will be posted successfully only if requested spend amount fully covers the purchase amount

Example:
true
authentication
Object nullable

The application authentication settings, i.e. how contacts can register and sign-in

email_password
boolean required

Defines whether contacts can register & sign-in based on email and password

Default:
false
Example:
true
email_otp
boolean required

Defines whether contacts can register & sign-in based on email and one-time password

Default:
false
Example:
true
sms_otp
boolean required

Defines whether contacts can register & sign-in based on phone and one-time password

Default:
false
Example:
true
facebook
Object required

Defines whether contacts can register & sign-in based on Facebook (including Facebook authentication details)

is_supported
boolean required

Defines whether Facebook authentication is enabled or not

Default:
false
Example:
true
app_id
string required nullable

The Facebook App ID required for Google authentication (required when Facebook Auth is enabled)

Example:
dsf-w-f-esf-23f-w-eff2f
app_secret
string required nullable

The Facebook App Secret for Server-to-Server communication (must not be sent to client) (required when Facebook Auth is enabled)

Example:
qqsdf-23-we-wer-3ew-qq
google
Object required

Defines whether contacts can register & sign-in based on Google (including Google authentication details)

is_supported
boolean required

Defines whether Google authentication is supported or not

Default:
false
Example:
true
app_id
string required nullable

The Google App ID required for Google authentication (required when Google Auth is enabled)

Example:
dsf-w-f-esf-23f-w-eff2f
app_secret
string required nullable

The Google App Secret for Server-to-Server communication (must not be sent to client) (required when Google Auth is enabled)

Example:
qqsdf-23-we-wer-3ew-qq
demo_contact
Object required

The contact assigned as demo contact (used for app store verification purposes)

is_supported
boolean required

Defines whether demo contact is supported or not

Default:
false
Example:
true
contact_id
string GUID required nullable

The contact (identifier) that will be assigned as demo contact (required only if demo contact is enabled)

Example:
17e32149-1da4-6a55-456e-8874b7afac56
otp
string required nullable

The one-time password that will be accepted for sign-in purposes (required only if demo contact is enabled)

Example:
123456
manage_credentials
Object required

Defines whether contacts will be able to manager their authentication details

add_new
boolean required

Defiens whether contact will be able to add new authentication details

Example:
false
update_existing
boolean required

Defiens whether contact will be able to update existing authentication details

Example:
true
delete_existing
boolean required

Defiens whether contact will be able to delete existing authentication details

Example:
false
platforms
Array nullable

The application platform identifiers (e.g. operating platform, version, cloud name)

Unique items: YES
Object
platform
string required

The platform on which the application will be published

Enumeration:
APPLE
GOOGLE
WEB
platform_id
string required nullable

The platform identifier on which such application is published (applicable for native mobile applications)

Example:
1762e052-4805-73eb-36f2-e77d6dc883e8
cloud_name
string required nullable

The cloud name on which such application is published (applicable for browser based applications)

version
string nullable

The application version

Example:
1.1
information
Object nullable

The application “about” settings (e.g. terms & conditions, FAQs)

content
Array nullable

The application content information

Object
type
string required

The content type

Enumeration:
ABOUT

About

TERMS_CONDITIONS

Terms & Conditions

PRIVACY_POLICY

Privacy Policy

FAQS

Frequently-Asked Questions

url
string required nullable

The detail URL endpoint (URL or Content is required)

Example:
https?/crm.com
rich_content
string required nullable

The detail rich content (URL or Content is required)

Example:
Terms & Conditions
contact_us
Object nullable

The application “contact us” details

email_address
string nullable

The contact email address

Example:
info@crm.com
phone
Object nullable
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
number
string

The phone number

Example:
99123456
type
string
Enumeration:
LANDLINE
MOBILE
FAX
website
string nullable

The contact website (URL endpoint)

Example:
https://crm.com

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The application identifier

Example:
5fd79941-e4ce-e6b9-2a3c-b455e3fb0220
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/applications/5fd79941-e4ce-e6b9-2a3c-b455e3fb0220 HTTP/1.1 

Content-Type: application/json

{
    "name": "Brew Coffee",
    "description": "Best coffee application",
    "appearance": {
        "colors": [
            {
                "type": "SCREEN_CARD",
                "value": "#eb4034"
            }
        ],
        "fonts": [
            {
                "type": "TEXT",
                "font": "Roboto"
            }
        ],
        "dark_mode": true,
        "homepage_layout": "LAYOUT2",
        "advanced_colour_mapping": "let appearance = { main_color: '#ffffff', //landing_page.text_color, landing_page.button_text_color, main_page.card_text_color, main_page.icon_color, side_bar.text_color, side_bar.icon_color, tab_bar.background_color button_color: '#50e3c2',//landing_page.button_color, main_page.button_color, main_page.button_selected, side_bar.background_color, tab_bar.selected, card_color: '#F0F0F3', //main_page.button_unselected, main_page.card_bg_color, main_page.input_background_color background_color: '#d32166', //landing_page.background_color text_normal_color: '#212121', //main_page.text_label_color, main_page.input_label_color text_main_color: '#03041D', //main_page.button_unselected_text_color, main_page.text_color, main_page.text_title_color, main_page.card_icon_color, main_page.input_text_color border_color: 'rgba(3, 4, 29, 0.16)', //main_page.border_button_color, main_page.border_input_color, tab_bar.unselected, darkmode_color: '#212121', //background pages when dark_mode = true darkmode_text: '#ffffff', //main_page.text_color }"
    },
    "features": {
        "contact": {
            "business_network": {
                "is_supported": true,
                "multitenancy": {
                    "is_supported": "true"
                }
            },
            "contact": {
                "code_representation": "BARCODE",
                "existing_contacts": "false",
                "people": {
                    "is_supported": "true"
                },
                "profile": [
                    {
                        "type": "GENDER",
                        "is_supported": "true"
                    }
                ]
            },
            "crm": {
                "is_supported": true,
                "service_requests": {
                    "is_supported": true,
                    "supported_queues": [
                        {
                            "id": "8237416b-ecca-769a-a38a-293320b0ffdf"
                        }
                    ]
                }
            },
            "finance": {
                "is_supported": true,
                "wallet_top_up": "true",
                "redeem_pass": {
                    "is_supported": "false",
                    "pass_attributes": [
                        {
                            "type": "VALUE"
                        }
                    ]
                }
            },
            "order": {
                "is_supported": true,
                "pick_up": true,
                "delivery": true,
                "direct_sale": true,
                "preferred_organisation": "true",
                "order_countries": [
                    {
                        "country": "CYP"
                    }
                ],
                "order_catalogs": [
                    {
                        "id": "676055d9-fe79-6836-8a50-c2d3764e9919"
                    }
                ],
                "use_wallet_funds": {
                    "is_supported": "false",
                    "specific_funds_amount": "false",
                    "cover_full_basket": "false"
                }
            },
            "reward": {
                "is_supported": "true",
                "tiering": "true",
                "preferred_organisation": "true",
                "refer_friend": {
                    "is_supported": "true",
                    "refer_methods": [
                        "EMAIL"
                    ]
                },
                "otp_spend": {
                    "is_supported": "true",
                    "spend_attributes": [
                        {
                            "type": "AMOUNT"
                        }
                    ]
                },
                "self_submit_purchases": {
                    "is_supported": "true",
                    "self_submit_methods": [
                        "BARCODE"
                    ]
                }
            },
            "marketing": {
                "is_supported": true,
                "embedded_links": [
                    {
                        "title": "New and upcoming events",
                        "url": "https://www.guababechbar.com/news&events",
                        "creatives": [
                            {
                                "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                                "usage_type": "ATTACHMENT",
                                "width": 2159,
                                "height": 3075,
                                "format": "jpg",
                                "url": "https://assets.crm.com/image/logo.jpg",
                                "public_id": "crm-com/image",
                                "media": [
                                    {
                                        "width": 200,
                                        "height": 300,
                                        "url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            "mobile_pass": {
                "is_supported": "true"
            }
        },
        "merchant": {
            "reward": {
                "is_supported": true,
                "purchase": {
                    "is_supported": "true",
                    "allow_spend": "false",
                    "restrict_fully_covered": "true"
                }
            }
        }
    },
    "authentication": {
        "email_password": true,
        "email_otp": "true",
        "sms_otp": true,
        "facebook": {
            "is_supported": "true",
            "app_id": "dsf-w-f-esf-23f-w-eff2f",
            "app_secret": "qqsdf-23-we-wer-3ew-qq"
        },
        "google": {
            "is_supported": "true",
            "app_id": "dsf-w-f-esf-23f-w-eff2f",
            "app_secret": "qqsdf-23-we-wer-3ew-qq"
        },
        "demo_contact": {
            "is_supported": "true",
            "contact_id": "17e32149-1da4-6a55-456e-8874b7afac56",
            "otp": "123456"
        }
    },
    "platforms": [
        {
            "platform": "WEB",
            "platform_id": "1762e052-4805-73eb-36f2-e77d6dc883e8",
            "cloud_name": "",
            "version": "1.1"
        }
    ],
    "information": {
        "content": [
            {
                "type": "ABOUT",
                "url": "https?/crm.com",
                "rich_content": "Terms & Conditions"
            }
        ],
        "contact_us": {
            "email_address": "info@crm.com",
            "phone": {
                "country_code": "CYP",
                "number": "99123456",
                "type": "LANDLINE"
            },
            "website": "https://crm.com"
        }
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "5fd79941-e4ce-e6b9-2a3c-b455e3fb0220"
}
Delete Application
DELETE /applications/{id}

Delete an existing application

Path variables

id
string GUID required

The application (identifer) that will be deleted

Example:
eac1f771-2608-85c1-9289-08abb5c1d7a0

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/applications/eac1f771-2608-85c1-9289-08abb5c1d7a0 HTTP/1.1 

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

HTTP/1.1 204 No Content 
List Applications
GET /applications

Retrieve a list of applications based on search criteria (e.g. all native applications)

Request parameters

name
string optional

Filters based on application name (behave as like)

Example:
Best Coffee App
type
array of App Type (enum) optional

Filters based on application type

Collection format: csv
platform_app_id
string optional

Filter based on platform application identifier

Example:
f9e4b742-bfe1-09dc-f623-de71aaed61ff
cloud_name
string optional

Filter based on cloud name (behave as like)

Example:
crm
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 application identifier

Example:
6d2652b7-9b8d-6174-65c3-c3fefc87e8cd
name
string

The application name

Example:
Coffee App
description
string

The application description

Example:
Best coffee app description
type
string

The application type

Enumeration:
NATIVE

Mobile Contact Applications

NATIVE_MERCHANT

Mobile Merchant Applications

WEB

Web Portal

CAPTIVE

Captive Portal

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/applications HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "6d2652b7-9b8d-6174-65c3-c3fefc87e8cd",
            "name": "Coffee App",
            "description": "Best coffee app description",
            "type": "CAPTIVE"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Application
GET /applications/{id}

Retrieve detailed information for an application

Path variables

id
string GUID required

The application (identifer) that will be returned

Example:
bd909bd2-2397-8af8-b256-87e496620209

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 application identifier

Example:
bd909bd2-2397-8af8-b256-87e496620209
name
string

The application name

Example:
Brew Coffee App
description
string

The application description

Example:
Best coffee app
type
string

The application type

Enumeration:
NATIVE

Mobile Contact Applications

NATIVE_MERCHANT

Mobile Merchant Applications

WEB

Web Portal

CAPTIVE

Captive Portal

appearance
Object

The application appearance settings

colors
Array

The application color style

Object
type
string

Defines the component on which the color will be applied

Enumeration:
LANDING_BACKGROUND
LANDING_CARD
LANDING_TEXT
SCREEN_CARD
SCREEN_BUTTON
SCREEN_WALLET
value
string

The color (hex) code

Example:
#eb4034
fonts
Array

The application text font style

Object
type
string

Defines the component on which the font will be applied

Enumeration:
TEXT
font
string

The text font style that the app will use

Enumeration:
San Francisco
Roboto
Helvetica
Open Sans
Poppins
Georgia
Gilroy
dark_mode
boolean

The colour scheme of the app

Default:
false
Example:
true
homepage_layout
string

The application type

Enumeration:
LAYOUT1
LAYOUT2
LAYOUT3
LAYOUT4
LAYOUT5
features
Object

Details about the features that will be supported by the app

contact
Object

Details about the features that will be supported by the app

contact
Object

Defines the supported contact features

code_representation
string nullable

How the contact code will be depicted on the app/portal, for scanning purposes

Enumeration:
BARCODE

As a barcode

QR_CODE

As a QR code

Example:
BARCODE
existing_contact
boolean

Defines whether contacts will be prompted to connect their past loyalty account to CRM

Example:
false
profile
Array

Defines the details that a contact can provide

Object
type
string

The contact detail

Enumeration:
BIRTHDATE
GENDER
NAMEDAY
is_supported
boolean

Defines if such detail is supported or not

Example:
true
communities
Object

Defines whether communities (relationships between contacts) features will be available

is_supported
boolean

Defines whether communities is supported

Example:
false
business_network
Object

Defines the supported business network features

is_supported
boolean

Defines whether business network features should be available

Default:
false
Example:
true
multitenancy
Object

Defines whether multitenancy features will be available

is_supported
boolean

Defines whether multitenancy is supported

Example:
true
crm
Object

Defines the supported crm features

is_supported
boolean

Defines whether contact features should be available

Default:
false
Example:
true
service_requests
Object

Defines the supported service request features

is_supported
boolean

Defines whether contacts will be able to create service requests

Example:
true
supported_queues
Array

Defines whether and which service request queues, contacts will be able to select

Object
id
string GUID

The queue identifier

Example:
848f9c93-e95f-4188-55fb-bb51326f66d5
name
string

The queue name

Example:
Customer Support
finance
Object

Defines the supported finance features

is_supported
boolean

Defines whether finance features should be available

Default:
false
Example:
true
wallet_top_up
boolean

Defines whether contacts will be able to top up their wallets

Example:
true
redeem_pass
Object

Defines the supported redeem pass features

is_supported
boolean

Defines whether contacts will be able to redeem a pass

Example:
false
pass_attributes
Array

Defines whether pass redemption should be supported by other attributes

Object
type
string

The type of supplementary attribute

Enumeration:
CODE
VALUE
PIN
order
Object

Defines the supported ordering features

is_supported
boolean

Defines whether order features should be available

Default:
false
Example:
true
pick_up
boolean

Defines whether pick up is supported as supply method

Example:
true
delivery
boolean

Defines whether delivery is supported as supply method

Example:
true
direct_sale
boolean

Defines whether direct sale is supported as supply method

Example:
true
model
string

Defines whether contacts will be able to select from which location an order will be placed (via a list of merchants/venues) or not

Enumeration:
MARKETPLACE

Ability to select location

SINGLE_BUSINESS

Location won’t be selectable

preferred_organisation
boolean

Defines whether contact can set preferred organisation for ordering

Example:
true
order_countries
Array

Defines the countries where orders can be made

Object
country
string

The country (code)

Example:
CYP
order_catalogs
Array

Defines a list of order catalogs that should filter available products to order

Object
id
string GUID

The order catalog identifier

Example:
676055d9-fe79-6836-8a50-c2d3764e9919
name
string

The order catalog name

Example:
Network Products
use_wallet_funds
Object

Defines whether contact can pay for order using wallet funds

is_supported
boolean

Defines whether contact can pay for orders using wallet funds

Example:
true
specific_funds_amount
boolean

Defines whether contacts can specific the wallet funds amount to use on orders

Example:
true
cover_full_basket
boolean

Defines whether the wallet fund amount must cover the full basket amount

Example:
true
reward
Object

Defines the supported rewards features

is_supported
boolean

Defines whether reward features should be available

Default:
false
Example:
true
tiering
boolean

Defines whether reward tiering will be supported

Example:
true
preferred_organisation
boolean

Defines whether contact can select his/her preferred organisation for rewards

Example:
true
refer_friend
Object

Defines the supported refer a friend features

is_supported
boolean

Defines whether refer a friend will be supported

Example:
true
refer_methods
Array

Defines the communication method that should be used for refer a friend (required when refer a friend is enabled)

string
Enumeration:
EMAIL
SMS
otp_spend
Object

Defines the supported OTP spend features

is_supported
boolean

Defines whether OTP spend will be supported

Example:
true
spend_attributes
Array

Defines the supplementary attributes that will be supported for OTP spends (required when OTP spend is enabled)

Object
type
string

The type of supplementary attribute

Enumeration:
AMOUNT
self_submit_purchases
Object

Defines the supported contact self-submit purchase events features

is_supported
boolean

Defines whether contact can self-submit purchase events

Example:
true
self_submit_methods
Array

Defines how self-submit (reclaim) purchase identification will be made (required when contact self-submit purchase is enabled)

string
Enumeration:
BARCODE
TRX_CODE
marketing
Object

Defines the supported marketing content features

is_supported
boolean

Defines whether marketing content should be available

Default:
false
Example:
true
embedded_links
Array

Define links for embedded browser in front-end systems

Object
title
string

Defines the title of the link

Example:
New and upcoming events
url
string

Defines the URL of the link

Example:
https://www.guababechbar.com/news&events
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
mobile_pass
Object

Defines the supported mobile pass features

is_supported
boolean

Defines whether mobile pass should be available

Example:
false
merchant
Object

The features that will be supported by the application

reward
Object

Defines the supported reward features

is_supported
boolean

Defines whether reward features should be available

Example:
true
purchase
Object

Defines the supported purchase event features

is_supported
boolean

Defines whether merchants can submit purchase events

Example:
true
allow_spend
boolean

Defines whether the merchant app supports submission of spend requests

Example:
false
restrict_fully_covered
boolean

Defines whether the purchase will be posted successfully only if requested spend amount fully covers the purchase amount

Example:
true
authentication
Object

The application authentication settings, i.e. how contacts can register and sign-in

email_password
boolean

Defines whether contacts can register & sign-in based on email and password

Default:
false
Example:
true
email_otp
boolean

Defines whether contacts can register & sign-in based on email and one-time password

Default:
false
Example:
true
sms_otp
boolean

Defines whether contacts can register & sign-in based on phone and one-time password

Default:
false
Example:
true
facebook
Object

Defines whether contacts can register & sign-in based on Facebook (including Facebook authentication details)

is_supported
boolean

Defines whether Facebook authentication is enabled or not

Default:
false
Example:
true
app_id
string

The App ID required for Facebbok authentication (required when Facebook Auth is enabled)

Example:
dsf-w-f-esf-23f-w-eff2f
app_secret
string

The Facebook App Secret for Server-to-Server communication (must not be sent to client) (required when Facebook Auth is enabled)

Example:
qqsdf-23-we-wer-3ew-qq
google
Object

Defines whether contacts can register & sign-in based on Google (including Google authentication details)

is_supported
boolean

Defines whether Google authentication is supported or not

Default:
false
Example:
true
app_id
string

The Google App ID required for Google authentication (required when Google Auth is enabled)

Example:
dsf-w-f-esf-23f-w-eff2f
app_secret
string

The Google App Secret for Server-to-Server communication (must not be sent to client) (required when Google Auth is enabled)

Example:
qqsdf-23-we-wer-3ew-qq
demo_contact
Object

The contact assigned as demo contact (used for app store verification purposes)

is_supported
boolean

Defines whether demo contact is supported or not

Default:
false
Example:
true
contact
Object

The (demo) contact (required only if demo contact is enabled)

id
string

The (demo) contact identifier

Example:
76ee374d-cd38-4cde-9fa3-4eaa26e67a06
name
string

The (demo) contact full name

Example:
John Doe
otp
string

The one-time password that will be accepted for sign-in purposes (required only if demo contact is enabled)

Example:
123456
manage_credentials
Object

Defines whether contacts will be able to manage their authentication details

add_new
boolean

Defiens whether contact will be able to add new authentication details

Example:
true
update_existing
boolean

Defiens whether contact will be able to update existing authentication details

Example:
false
delete_existing
boolean

Defiens whether contact will be able to delete existing authentication details

Example:
false
platforms
Array

The application platform identifiers (e.g. operating platform, version, cloud name)

Unique items: YES
Object
platform
string

The platform on which the application will be published

Enumeration:
APPLE
GOOGLE
WEB
platform_id
string

The platform identifier on which such application is published (applicable for native mobile applications)

Example:
1762e052-4805-73eb-36f2-e77d6dc883e8
cloud_name
string

The cloud name on which such application is published (applicable for browser based applications)

version
string

The application version

Example:
1.1
information
Object

The application “about” settings (e.g. terms & conditions, FAQs)

content
Array

The application content information

Object
type
string

The content type

Enumeration:
ABOUT

About

TERMS_CONDITIONS

Terms & Conditions

PRIVACY_POLICY

Privacy Policy

FAQS

Frequently-Asked Questions

url
string

The detail URL endpoint (URL or Content is required)

Example:
https?/crm.com
rich_content
string

The detail rich content (URL or Content is required)

Example:
Terms & Conditions
contact_us
Object

The application “contact us” details

email_address
string

The contact email address

Example:
info@crm.com
phone
Object
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
number
string

The phone number

Example:
99123456
type
string
Enumeration:
LANDLINE
MOBILE
FAX
website
string

The contact website (URL endpoint)

Example:
https://crm.com
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
Example 1
GET https://sandbox.crm.com/backoffice/v2/applications/bd909bd2-2397-8af8-b256-87e496620209 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "bd909bd2-2397-8af8-b256-87e496620209",
    "name": "Brew Coffee App",
    "description": "Best coffee app",
    "type": "WEB",
    "appearance": {
        "colors": [
            {
                "type": "LANDING_TEXT",
                "value": "#eb4034"
            }
        ],
        "fonts": [
            {
                "type": "TEXT",
                "font": "Gilroy"
            }
        ],
        "dark_mode": true,
        "homepage_layout": "LAYOUT3"
    },
    "features": {
        "contact": {
            "contact": {
                "code_representation": "BARCODE",
                "existing_contact": "false",
                "profile": [
                    {
                        "type": "NAMEDAY",
                        "is_supported": "true"
                    }
                ],
                "people": {
                    "is_supported": "false"
                }
            },
            "business_network": {
                "is_supported": true,
                "multitenancy": {
                    "is_supported": "true"
                }
            },
            "crm": {
                "is_supported": true,
                "service_requests": {
                    "is_supported": true,
                    "supported_queues": [
                        {
                            "id": "848f9c93-e95f-4188-55fb-bb51326f66d5",
                            "name": "Customer Support"
                        }
                    ]
                }
            },
            "finance": {
                "is_supported": true,
                "wallet_top_up": "true",
                "redeem_pass": {
                    "is_supported": "false",
                    "pass_attributes": [
                        {
                            "type": "CODE"
                        }
                    ]
                }
            },
            "order": {
                "is_supported": true,
                "pick_up": true,
                "delivery": true,
                "direct_sale": true,
                "model": "SINGLE_BUSINESS",
                "preferred_organisation": "true",
                "order_countries": [
                    {
                        "country": "CYP"
                    }
                ],
                "order_catalogs": [
                    {
                        "id": "676055d9-fe79-6836-8a50-c2d3764e9919",
                        "name": "Network Products"
                    }
                ],
                "use_wallet_funds": {
                    "is_supported": "true",
                    "specific_funds_amount": "true",
                    "cover_full_basket": "true"
                }
            },
            "reward": {
                "is_supported": "true",
                "tiering": "true",
                "preferred_organisation": "true",
                "refer_friend": {
                    "is_supported": "true",
                    "refer_methods": [
                        "SMS"
                    ]
                },
                "otp_spend": {
                    "is_supported": "true",
                    "spend_attributes": [
                        {
                            "type": "AMOUNT"
                        }
                    ]
                },
                "self_submit_purchases": {
                    "is_supported": "true",
                    "self_submit_methods": [
                        "TRX_CODE"
                    ]
                }
            },
            "marketing": {
                "is_supported": true,
                "embedded_links": [
                    {
                        "title": "New and upcoming events",
                        "url": "https://www.guababechbar.com/news&events",
                        "creatives": [
                            {
                                "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                                "usage_type": "MARKETING",
                                "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"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            "mobile_pass": {
                "is_supported": "false"
            }
        },
        "merchant": {
            "reward": {
                "is_supported": true,
                "purchase": {
                    "is_supported": "true",
                    "allow_spend": "false",
                    "restrict_fully_covered": "true"
                }
            }
        }
    },
    "authentication": {
        "email_password": true,
        "email_otp": "true",
        "sms_otp": true,
        "facebook": {
            "is_supported": "true",
            "app_id": "dsf-w-f-esf-23f-w-eff2f",
            "app_secret": "qqsdf-23-we-wer-3ew-qq"
        },
        "google": {
            "is_supported": "true",
            "app_id": "dsf-w-f-esf-23f-w-eff2f",
            "app_secret": "qqsdf-23-we-wer-3ew-qq"
        },
        "demo_contact": {
            "is_supported": "true",
            "contact": {
                "id": "76ee374d-cd38-4cde-9fa3-4eaa26e67a06",
                "name": "John Doe"
            },
            "otp": "123456"
        }
    },
    "platforms": [
        {
            "platform": "WEB",
            "platform_id": "1762e052-4805-73eb-36f2-e77d6dc883e8",
            "cloud_name": "",
            "version": "1.1"
        }
    ],
    "information": {
        "content": [
            {
                "type": "FAQS",
                "url": "https?/crm.com",
                "rich_content": "Terms & Conditions"
            }
        ],
        "contact_us": {
            "email_address": "info@crm.com",
            "phone": {
                "country_code": "CYP",
                "number": "99123456",
                "type": "LANDLINE"
            },
            "website": "https://crm.com"
        }
    },
    "creatives": [
        {
            "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
            "usage_type": "GOOGLE_LOGO_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"
                }
            ]
        }
    ]
}
Media Group
POST /applications/{id}/media_groups
Applications Media Groups
POST /applications/{id}/media_groups

Link an application with one or more media groups

Path variables

id
string GUID required

The application (identifier) that media groups will be set

Example:
6A24D2B5E44F44B28451FE021FCAD51E

Notes

MEDIA UPLOAD

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

  1. Create new Media Group
  2. Create Application 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

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
POST https://sandbox.crm.com/backoffice/v2/applications/6A24D2B5E44F44B28451FE021FCAD51E/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 
Content Translations
PUT /applications/{id}/translations
GET /applications/{id}/translations
PUT /applications/{id}/translations/actions
Update Application Translations
PUT /applications/{id}/translations

Update the content translations for an existing application

Path variables

id
string GUID required

The application (identifier) of which content translations will be updated

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

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
language_code
string required
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array nullable

The content translations for the specified language

Object
key
string required

The content (attribute) key

Example:
name
value
string required

The content (attribute) translated value

Example:
10% cashback return

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
PUT https://sandbox.crm.com/backoffice/v2/applications/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

[
    {
        "language_code": "EN",
        "translations": [
            {
                "key": "name",
                "value": "10% cashback return"
            }
        ]
    }
]

HTTP/1.1 204 No Content 
Get Application Translations
GET /applications/{id}/translations

Retrieve the content translations for an existing application

Path variables

id
string GUID required

The application (identifier) of which content translations will be retrieved

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Request parameters

language_code
string optional

Filter based on language

Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN

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
language_code
string
Min length: 2
Max length: 2
Pattern: 2-letter ISO 639-1 language code.
Example:
EN
translations
Array

The content translations for the specified language

Object
key
string

The content (attribute) key

Example:
name
value
string

The content (attribute) translated value

Example:
10% cashback return
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/applications/a42dd7c4-e755-92fb-963b-5f658a59908e/translations HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "language_code": "EN",
            "translations": [
                {
                    "key": "name",
                    "value": "10% cashback return"
                }
            ]
        }
    ]
}
Perform Application Translation Actions
PUT /applications/{id}/translations/actions

Perform content translation actions on an application (e.g. export an application’s translations)

Path variables

id
string GUID required

The application (identifier) of which content translation actions will be performed

Example:
a42dd7c4-e755-92fb-963b-5f658a59908e

Notes

IMPORT CONTENT TRANSLATIONS FLOW

Importing content translations should be made based on the following API order

  1. Upload File Signature
  2. Import Translations
EXPORT CONTENT TRANSLATIONS FLOW

Exporting content translations into different file should be made using the following API order

  1. Export Translations

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 action that will be applied

Enumeration:
IMPORT
EXPORT
file
Object required

The file (identifier) that will be used for importing translations (required only for import action)

id
string GUID required nullable

The file (identifier) that will be used for importing translations (required only for import action)

Example:
1e347d4d-ab96-6957-fdb6-35e72b3d9185
mime
string required nullable

The file (mime type) that will be used for exporting translations (required only for export action)

Example:
json

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
Example 2
PUT https://sandbox.crm.com/backoffice/v2/applications/a42dd7c4-e755-92fb-963b-5f658a59908e/translations/actions HTTP/1.1 

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

{
    "action": "IMPORT",
    "file": {
        "id": "1e347d4d-ab96-6957-fdb6-35e72b3d9185"
    }
}

HTTP/1.1 204 No Content 
PUT https://sandbox.crm.com/backoffice/v2/applications/a42dd7c4-e755-92fb-963b-5f658a59908e/translations/actions HTTP/1.1 

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

{
    "action": "EXPORT",
    "file": {
        "mime": "json"
    }
}

HTTP/1.1 204 No Content 
Business Activities

List of basic activities of the signed up Business

GET /business_activities
List Business Activities
GET /business_activities

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

Notes

Business Activities can be assigned against organisations only

Request parameters

name
string optional

Filter based on business activity name (behaves as a like)

Example:
Bar & Grill

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 business activity identifier

Example:
c101c49a-5d47-8264-c82d-5eee9fe1236f
name
string

The business activity name

Example:
Information Services
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/business_activities HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "c101c49a-5d47-8264-c82d-5eee9fe1236f",
            "name": "Information Services"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}

Copyright notice informs the public regarding the platform’s copyright ownership. Such notice can be configured only on the Cloud Operator level and will be applied throughout the software.

GET /copyright_notice
PUT /copyright_notice
GET /copyright_notice

Returns the copyright notice of the software

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
copyright_text
string

The copyright text

Example:
CRM.COM Software 2005-2021
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/copyright_notice HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "copyright_text": "CRM.COM Software 2005-2021"
}
PUT /copyright_notice

Update the copyright notice

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

The actual copyright text

Example:
CRM.COM Software 2005-2021

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
7cc1b26a-459f-4b47-a09f-6b121ae947da
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/copyright_notice HTTP/1.1 

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

{
    "copyright_text": "CRM.COM Software 2005-2021"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "7cc1b26a-459f-4b47-a09f-6b121ae947da"
}
Currencies

Each Business within CRM.COM must have a base currecy and optionalyl a list of supported currecies in case of multi-currency businesses. The base currency is used when setting up the product catalogue (i.e. prices and promotions) as well as reward offerns. In all of these cases, the Business must set the values in the base currrency. Then, optionally, prices can also be specified in any other currency that is supported. Contacts signing up to the Business can have accounts in any of the supported currencies.

POST /currencies
PUT /currencies/{id}
DELETE /currencies/{id}
GET /currencies
GET /currencies/{id}/rates
Add Currency
POST /currencies

Add a new supported currency for a business, using ISO 4217 currency codes.

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

The currency code (based on ISO 4217)

Example:
EUR
rate
number required nullable

The conversaion rate of the currency in regards to the base currency (not required for default currency)

Default:
1
Example:
1.234

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The currency identifier

Example:
b449cd6a-d077-1bf0-66f5-d4944c465e20
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/currencies HTTP/1.1 

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

{
    "code": "EUR",
    "rate": 1.234
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "b449cd6a-d077-1bf0-66f5-d4944c465e20"
}
Update Currency
PUT /currencies/{id}

Update an existing currency. When updating a supported business currecy, only its exchange rate over the base currncy can be updated. The new exchange rate will be in immediate effect.

Path variables

id
string GUID required

The currency (identifer) that will be updated

Example:
edf4a34c-4932-4941-9957-aeb5b55873b6

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
rate
number required nullable

The conversion rate of the currency in regards to the base currency

Example:
1.2345

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The currency identifier

Example:
b449cd6a-d077-1bf0-66f5-d4944c465e20
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/currencies/edf4a34c-4932-4941-9957-aeb5b55873b6 HTTP/1.1 

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

{
    "rate": 1.2345
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "b449cd6a-d077-1bf0-66f5-d4944c465e20"
}
Delete Currency
DELETE /currencies/{id}

Delete an existing currency from the supported ones. A supported currency can be removed only as long as there are no Active/Suspended accounts in that currency

Path variables

id
string GUID required

The currency (identifer) that will be removed from the supported ones

Example:
b449cd6a-d077-1bf0-66f5-d4944c465e20

Notes

BASE CURRENCY

Base currency cannot be removed

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/currencies/b449cd6a-d077-1bf0-66f5-d4944c465e20 HTTP/1.1 

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

HTTP/1.1 204 No Content 
Get Currencies
GET /currencies

Retrieve a list of currencies based on search criteria (e.g. only the EURO based currency) that are supported (not all ISO 4217 supported currencies)

Request parameters

code
string optional

Filter based on currency code (based on ISO 4217)

Example:
EUR
is_default
boolean optional

Filter based on whether the currency is the base (default) one or not

Example:
true
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
country
string optional

The Country of agreement. Use this pramters to retrieve the supported currencies for a specific Country of agreement. If for that country there are no supported currencies, then the business’s supported currencies are returned.

Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP

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 currency identifer

Example:
b449cd6a-d077-1bf0-66f5-d4944c465e20
code
string

The currency code

Example:
EUR
rate
number

The conversion rate of the currency in regards to the base currency (not applicable for the base, default, currency)

Example:
1.234
is_default
boolean

Defines whether the currency is the base (default)

Example:
true
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/currencies HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "b449cd6a-d077-1bf0-66f5-d4944c465e20",
            "code": "EUR",
            "is_default": true
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Currency Rates History
GET /currencies/{id}/rates

Retrieve a currency’s rate history. Whenever a new exchange rate is set, then the previous one is logged in the currency’s rates history.

Path variables

id
string GUID required

The currency (identifer) that rate details will be retrieved

Example:
b449cd6a-d077-1bf0-66f5-d4944c465e20

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

Information about the currencty conversion rate history

Object
id
string GUID

The conversion rate identifier

Example:
1647eda8-5dbb-4be4-32d1-2bbdecb8390f
rate
number

The conversion rate with the base currency

Example:
1.234
from_date
string epoch

The date from which the rate is effective

Example:
1588171696
to_date
string epoch

The date up to which the rate is effective

Example:
1588171696
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/currencies/b449cd6a-d077-1bf0-66f5-d4944c465e20/rates HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "1647eda8-5dbb-4be4-32d1-2bbdecb8390f",
            "rate": 1.234,
            "from_date": "1588171696",
            "to_date": "1588171696"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Custom Fields

Custom Fields allow storing and managing additional information for various entities, such as contacts. Each custom field is related to a single entity and can be edited or viewed from the UI or through Web APIs. Once a custom field is set up for an entity, then all instances of that entity can be assigned a value for the Custom Field.

POST /custom_fields
PUT /custom_fields/{id}
DELETE /custom_fields/{id}
GET /custom_fields
GET /custom_fields/{id}/
Create Custom Field
POST /custom_fields

Creates a new custom field

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

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

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

Request body

Object
key
string required

The custom field key (for integrations and API purposes)

Example:
back_office
label
string required

The custom field label (for display purposes)

Example:
Back Office
entity
string required

The type of the event

Enumeration:
CONTACTS
ORDERS
ORGANISATIONS
DEVICES
SERVICE_REQUESTS
PAYMENTS
REFUNDS
TOP_UPS
LEADS
ACTIVITIES
PASSES
description
string nullable

The custom field description

Example:
The account's back office code
tooltip
string nullable

The custom field tooltip

Example:
lorem ipsum
type
string required

The custom field’s UI field type

Enumeration:
SINGLE_LINE
MULTIPLE_LINES
SELECTION
CHECKBOX
RADIO_BUTTONS
TIMESTAMP
DATE
NUMBER
AMOUNT
CONTENT
NUMBERING_SCHEME
content
string required nullable

The custom field module (applicable only if type = module)

Enumeration:
USERS
visible
boolean required

Defines whether the custom field will be avaialble in the user interface or not

Example:
true
options
Array nullable

Apllicable options for custom fields (required for selections, checkboxes and radio buttons)

Object
key
string required

The option key (for integrations and API purposes)

Example:
option_1
text
string required

The option text (for display purposes)

Example:
my option 1
default
boolean nullable

Defines whethet the option will be the default one or not

Example:
true
order
integer required

Defines the order that will be used for displaying purposes

Example:
1
restrictions
Object nullable

Defines the restrictions that will be applied on a custom field’s content (if applicable)

max_characters
integer nullable

The maximum allowed number of alphanumeric characters that the custom field can support

Example:
1024
min_number
number nullable

The minimum allowed number that the custom field can support

Example:
2
max_number
number nullable

The maximum allowed number that the custom field can support

Example:
100
decimals_number
integer nullable

The maximum allowed number of decimals that the custom field can support

Example:
2
digits_number
integer nullable

The minimum number of digits that the custom field can support

Default:
5
Example:
10
prefix
string nullable

The prefix that the custom field can support

Example:
MJ
suffix
string nullable

The suffix that the custom field can support

Example:
GS
check_digit
boolean nullable

Defines whether check digit (based on Luhn algorithm) will be generated (applicable for numbering scheme custom fields)

Default:
false
Example:
true

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The custom field identifier

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a
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/custom_fields HTTP/1.1 

Content-Type: application/json

{
    "key": "back_office",
    "label": "Back Office",
    "entity": "PASSES",
    "description": "The account's back office code",
    "tooltip": "lorem ipsum",
    "type": "NUMBER",
    "content": "USERS",
    "visible": true,
    "options": [
        {
            "key": "option_1",
             "text": "my option 1",
            "default": true,
            "order": 1
        }
    ],
    "webhook": {
        "url_endpoint": "https://crm.com/validations",
        "url_auth": "NO_AUTH",
        "username": "johndoe",
        "password": "crm.com",
        "api_key": "qwert-12345-qwewerwer-123234234-werwerwr",
        "trigger_event": "ON_FORM_SAVE"
    },
    "restrictions": {
        "max_characters": 1024,
        "min_number": 2,
        "max_number": 100,
        "decimals_number": 2,
        "digits_number": 10,
        "prefix": "MJ",
        "suffix": "GS",
        "check_digit": "true"
    }
}
Update Custom Field
PUT /custom_fields/{id}

Updates an existing custom field

Path variables

id
string GUID required

The custom field (identifer) that will be updated

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a

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

The custom field label (for display purposes)

Example:
Back Office
description
string nullable

The custom field description

Example:
The account's back office code
tooltip
string nullable

The custom field tooltip

Example:
Accounts Back Office Code
visible
boolean nullable

Defines whether the custom field will be avaialble in the user interface or not

Example:
true
order
integer nullable

The custom field’s order sequence (used on which order custom fields will be displayed)

Example:
2
options
Array nullable

Apllicable options for custom fields (required for selections, checkboxes and radio buttons)

Object
key
string required

The option key (for integrations and API purposes)

Example:
option_1
text
string required

The option text (for display purposes)

Example:
my option 1
default
boolean nullable

Defines whethet the option will be the default one or not

Example:
true
order
integer required

Defines the order that will be used for displaying purposes

Example:
1
restrictions
Object nullable

Defines the restrictions that will be applied on a custom field’s content (if applicable)

max_characters
integer nullable

The maximum allowed number of alphanumeric characters that the custom field can support

Example:
1024
min_number
number nullable

The minimum allowed number that the custom field can support

Example:
2
max_number
number nullable

The maximum allowed number that the custom field can support

Example:
100
decimals_number
integer nullable

The maximum allowed number of decimals that the custom field can support

Example:
2
digits_number
integer nullable

The minimum number of digits that the custom field can support

Default:
5
Example:
10
prefix
string nullable

The prefix that the custom field can support

Example:
MJ
suffix
string nullable

The suffix that the custom field can support

Example:
GS
check_digit
boolean nullable

Defines whether check digit (based on Luhn algorithm) will be generated (applicable for numbering scheme custom fields)

Default:
false
Example:
true

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The custom field identifier

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a
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/custom_fields/f68fad29-4a1b-3a1e-5cfa-6540a5b1609a HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "label": "Back Office",
    "description": "The account's back office code",
    "tooltip": "Accounts Back Office Code",
    "visible": true,
    "options": [
        {
            "key": "option_1",
            "text": "my option 1",
            "default": true,
            "order_number": 1
        }
    ],
    "webhook": {
        "url_endpoint": "https://crm.com/validations",
        "url_auth": "NO_AUTH",
        "username": "johndoe",
        "password": "crm.com",
        "api_key": "qwert-12345-qwewerwer-123234234-werwerwr",
        "trigger_event": "ON_FIELD_FOCUS_CHANGE"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "f68fad29-4a1b-3a1e-5cfa-6540a5b1609a"
}
Delete Custom Field
DELETE /custom_fields/{id}

Deletes a custom field

Path variables

id
string GUID required

The custom field (identifier) that will be deleted

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a

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/custom_fields/f68fad29-4a1b-3a1e-5cfa-6540a5b1609a HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 204 No Content 
List Custom Fields
GET /custom_fields

Retrieve a list of custom fields based on search criteria (e.g. all lead custom fields)

Request parameters

entity
string required

Filter based on the entity of which custom fields will be retrieved

Enumeration:
CONTACTS
ORDERS
ORGANISATIONS
DEVICES
SERVICE_REQUESTS
PAYMENTS
REFUNDS
TOP_UPS
LEADS
ACTIVITIES
PASSES
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 custom field identifier

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a
key
string

The custom field (unique) key

Example:
back_office
label
string

The custom field’s label

Example:
Back Office
description
string

The custom field’s description

Example:
The account's back office code
tooltip
string

The custom field’s tooltip

Example:
External system account reference number
visible
boolean

Defines whether the custom field is visible in the UI or not

Example:
true
type
string

The custom field’s UI field type

Enumeration:
SINGLE_LINE
MULTIPLE_LINES
SELECTION
CHECKBOX
RADIO_BUTTONS
TIMESTAMP
DATE
NUMBER
AMOUNT
CONTENT
NUMBERING_SCHEME
content
string

The custom field module (applicable only if type = module)

Enumeration:
USERS
entity
string

The type of the event

Enumeration:
CONTACTS
ORDERS
ORGANISATIONS
DEVICES
SERVICE_REQUESTS
PAYMENTS
REFUNDS
TOP_UPS
LEADS
ACTIVITIES
PASSES
order
integer

The custom field’s order sequence (used on which order custom fields will be displayed)

Example:
1
options
Array

The available options that a user can select when the custom field is selection, checkbox or radio button based

Object
key
string

The field option key

Example:
option_1
text
string

The field option text

Example:
Silver
default
boolean

Defines whether the field option is the default one

Example:
true
order
integer

The field option order number

Example:
1
restrictions
Object

Defines the restrictions that will be applied on a custom field’s content (if applicable)

max_characters
integer

The maximum allowed number of characters that the custom field can support

Example:
1024
min_number
number

The minimum allowed number that the custom field can support

Example:
2
max_number
number

The maximum allowed number that the custom field can support

Example:
100
decimals_number
integer

The maximum allowed number of decimals that the custom field can support

Example:
2
digits_number
string

The minimum number of digitsthat the custom field can support

prefix
string

The prefix that the custom field can support

Example:
MJ
suffix
string

The suffix that the custom field can support

Example:
GS
check_digit
boolean

Defines whether check digit (based on Luhn algorithm) will be generated (applicable for numbering scheme custom fields)

Example:
false
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/custom_fields HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "f68fad29-4a1b-3a1e-5cfa-6540a5b1609a",
            "key": "back_office",
            "label": "Back Office",
            "description": "The account's back office code",
            "tooltip": "External system account reference number",
            "visible": true,
            "type": "DATE",
            "content": "USERS",
            "entity": "REFUNDS",
            "order": 1,
            "options": [
                {
                    "key": "option_1",
                    "text": "my option 1",
                    "default": true,
                    "order_number": 1
                }
            ],
            "restrictions": {
                "max_characters": 1024,
                "min_number": 2,
                "max_number": 100,
                "number_decimals": 2
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Custom Field
GET /custom_fields/{id}/

Retrieve detailed information for a custom field

Path variables

id
string GUID required

The custom field (identifier) that will be retrieved

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a

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
Array
Object
id
string GUID

The custom field identifier

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a
key
string

The custom field (unique) key

Example:
back_office
label
string

The custom field’s label

Example:
Back Office
description
string

The custom field’s description

Example:
The account's back office code
tooltip
string

The custom field’s tooltip

Example:
External system account reference number
visible
boolean

Defines whether the custom field is visible in the UI or not

Example:
true
type
string

The custom field’s UI field type

Enumeration:
SINGLE_LINE
MULTIPLE_LINES
SELECTION
CHECKBOX
RADIO_BUTTONS
TIMESTAMP
DATE
NUMBER
AMOUNT
CONTENT
NUMBERING_SCHEME
entity
string

The type of the event

Enumeration:
CONTACTS
ORDERS
ORGANISATIONS
DEVICES
SERVICE_REQUESTS
PAYMENTS
REFUNDS
TOP_UPS
LEADS
ACTIVITIES
PASSES
order
integer

The custom field’s order sequence (used on which order custom fields will be displayed)

Example:
1
content
string

The custom field module (applicable only if type = module)

Enumeration:
USERS
options
Array

The available options that a user can select when the custom field is selection, checkbox or radio button based

Object
key
string

The field option key

Example:
option_1
text
string

The field option text

Example:
Silver
default
boolean

Defines whether the field option is the default one

Example:
true
order
integer

The field option order number

Example:
1
restrictions
Object

Defines the restrictions that will be applied on a custom field’s content (if applicable)

max_characters
integer

The maximum allowed number of characters that the custom field can support

Example:
1024
min_number
number

The minimum allowed number that the custom field can support

Example:
2
max_number
number

The maximum allowed number that the custom field can support

Example:
100
decimals_number
integer

The maximum allowed number of decimals that the custom field can support

Example:
2
digits_number
string

The minimum number of digitsthat the custom field can support

prefix
string

The prefix that the custom field can support

Example:
MJ
suffix
string

The suffix that the custom field can support

Example:
GS
check_digit
boolean

Defines whether check digit (based on Luhn algorithm) will be generated (applicable for numbering scheme custom fields)

Example:
false
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/custom_fields/f68fad29-4a1b-3a1e-5cfa-6540a5b1609a/ HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

[
    {
        "id": "f68fad29-4a1b-3a1e-5cfa-6540a5b1609a",
        "key": "back_office",
        "label": "Back Office",
        "description": "The account's back office code",
        "tooltip": "External system account reference number",
        "visible": true,
        "type": "CHECKBOXES",
        "entity": "TOP_UPS",
        "order": 1,
        "content": "USERS",
        "options": [
            {
                "key": "option_1",
                "text": "my option 1",
                "default": true,
                "order_number": 1
            }
        ],
        "webhook": {
            "url_endpoint": "https://crm.com/validations",
            "url_auth": "NO_AUTH",
            "username": "johndoe",
            "password": "crm.com",
            "api_key": "qwert-12345-qwewerwer-123234234-werwerwr",
            "trigger_event": "ON_FIELD_FOCUS_CHANGE"
        },
        "restrictions": {
            "max_characters": 1024,
            "min_number": 2,
            "max_number": 100,
            "number_decimals": 2
        }
    }
]
Custom Forms

Custom Forms are stand-alone external form integrations that can cover custom flows of a definitive purpose associated with CRM.COM.

POST /custom_forms
PUT /custom_forms/{id}
DELETE /custom_forms/{id}
GET /custom_forms
GET /custom_forms/{id}
Create Custom Form
POST /custom_forms

Creates a new custom form

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 custom form name

Example:
Register Customers
description
string nullable

The custom form description

Example:
Custom form flow
url_endpoint
string required

The URL endpoint where the form is hosted

Example:
http://crm.com/integrations/register-contact
signature
string required

Authentication signature that will verify that the form requests are trusted

Example:
46145c04-d4a4-827f-2863-49b2823fcf64
component
Object required

Details about the UI details that should be applied for this custom form

icon
string

The icon to be used

Example:
mdi mdi-plus
name
string

The name to be displayed

Default:
if not specified. defaults to the custom form name
Example:
Register Contact
type
string

Defines whether the custom form should be loaded as modal or embedded data page

Enumeration:
MODAL
EMBEDDED
location
string

Defines where the custom form should exist (e.g. navigation menu, within a page)

Enumeration:
CONTACTS_SUMMARY
CONTACTS_DATAPAGE
state
string required

The custom form state

Enumeration:
ACTIVE
INACTIVE

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The custom form identifier

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a
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/custom_forms HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Register Customers",
    "description": "Custom form flow",
    "url_endpoint": "http://crm.com/integrations/register-contact",
    "signature": "46145c04-d4a4-827f-2863-49b2823fcf64",
    "component": {
        "icon": "mdi mdi-plus",
        "name": "Register Contact",
        "type": "EMBEDDED",
        "location": "CONTACTS_DATAPAGE"
    },
    "state": "ACTIVE"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "f68fad29-4a1b-3a1e-5cfa-6540a5b1609a"
}
Update Custom Form
PUT /custom_forms/{id}

Updates an existing custom form

Path variables

id
string GUID required

The custom form (identifier) to be updated

Example:
f6913302-f341-6a8b-8b22-adc4e006e0a6

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 custom form name

Example:
Register Customers
description
string nullable

The custom form description

Example:
Custom form flow
url_endpoint
string nullable

The URL endpoint where the form is hosted

Example:
http://crm.com/integrations/register-contact
signature
string nullable

Authentication signature that will verify that the form requests are trusted

Example:
46145c04-d4a4-827f-2863-49b2823fcf64
component
Object nullable

Details about the UI details that should be applied for this custom form

icon
string

The icon to be used

Example:
mdi mdi-plus
name
string

The name to be displayed

Default:
if not specified. defaults to the custom form name
Example:
Register Contact
type
string

Defines whether the custom form should be loaded as modal or embedded data page

Enumeration:
MODAL
EMBEDDED
location
string

Defines where the custom form should exist (e.g. navigation menu, within a page)

Enumeration:
CONTACTS_SUMMARY
CONTACTS_DATAPAGE
state
string

The custom form state

Enumeration:
ACTIVE
INACTIVE

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The custom form identifier

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a
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/custom_forms/f6913302-f341-6a8b-8b22-adc4e006e0a6 HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Register Customers",
    "description": "Custom form flow",
    "url_endpoint": "http://crm.com/integrations/register-contact",
    "signature": "46145c04-d4a4-827f-2863-49b2823fcf64",
    "component": {
        "icon": "mdi mdi-plus",
        "name": "Register Contact",
        "type": "MODAL",
        "location": "CONTACTS_DATAPAGE"
    },
    "state": "INACTIVE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "f68fad29-4a1b-3a1e-5cfa-6540a5b1609a"
}
Delete Custom Form
DELETE /custom_forms/{id}

Deletes an existing custom form

Path variables

id
string GUID required

The custom form (identifier) to be deleted

Example:
f6913302-f341-6a8b-8b22-adc4e006e0a6

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/custom_forms/f6913302-f341-6a8b-8b22-adc4e006e0a6 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 204 No Content 
List Custom Forms
GET /custom_forms

Retrieve a list of custom forms based on search criteria (e.g. all active custom forms)

Request parameters

name
string optional

Filters based on custom form name

Example:
register
state
string optional

Filters based on custom form state

Enumeration:
ACTIVE
INACTIVE
location
string optional

Filter based on custom form location

Enumeration:
CONTACTS_SUMMARY
CONTACTS_DATAPAGE
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 custom form identifier

Example:
30176eac-2ce3-0ea9-9418-7bd65aff8c56
name
string

The custom form name

Example:
Register
description
string

The custom form description

Example:
Custom Registration Form
url_endpoint
string

The URL endpoint where such custom form is hosted

Example:
http://crm.com/integrations/register
state
string

The custom form state

Enumeration:
ACTIVE
INACTIVE
component
Object

Details about the UI details that should be applied for this custom form

icon
string

The icon to be used

Example:
mdi mdi-plus
name
string

The name to be displayed

Example:
Register Contact
type
string

Defines whether the custom form should be loaded as modal or embedded data page

Enumeration:
MODAL
EMBEDDED
location
string

Defines where the custom form should exist (e.g. navigation menu, within a page)

Enumeration:
CONTACTS_SUMMARY
CONTACTS_DATAPAGE
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/custom_forms HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "30176eac-2ce3-0ea9-9418-7bd65aff8c56",
            "name": "Register",
            "description": "Custom Registration Form",
            "url_endpoint": "http://crm.com/integrations/register",
            "state": "ACTIVE",
            "component": {
                "icon": "mdi mdi-plus",
                "name": "Register Contact",
                "type": "MODAL",
                "location": "CONTACTS_DATAPAGE"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Custom Form
GET /custom_forms/{id}

Retrieve detailed information for a custom field

Path variables

id
string GUID required

The custom form (identifier) to be retrieved

Example:
4af1ee3a-a0f6-8a87-3d24-08a7d56c9ab9

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 custom form identifier

Example:
30176eac-2ce3-0ea9-9418-7bd65aff8c56
name
string

The custom form name

Example:
Register
description
string

The custom form description

Example:
Custom Registration Form
url_endpoint
string

The URL endpoint where the custom form is hosted

Example:
http://crm.com/integrations/register
signature
string

Authentication signature that will verify that the form requests are trusted

Example:
46145c04-d4a4-827f-2863-49b2823fcf64
component
Object

Details about the UI details that should be applied for this custom form

icon
string

The icon to be used

Example:
mdi mdi-plus
name
string

The name to be displayed

Example:
Register Contact
type
string

Defines whether the custom form should be loaded as modal or embedded data page

Enumeration:
MODAL
EMBEDDED
location
string

Defines where the custom form should exist (e.g. navigation menu, within a page)

Enumeration:
CONTACTS_SUMMARY
CONTACTS_DATAPAGE
state
string

The custom form state

Enumeration:
ACTIVE
INACTIVE
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/custom_forms/4af1ee3a-a0f6-8a87-3d24-08a7d56c9ab9 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "30176eac-2ce3-0ea9-9418-7bd65aff8c56",
    "name": "Register",
    "description": "Custom Registration Form",
    "url_endpoint": "http://crm.com/integrations/register",
    "signature": "46145c04-d4a4-827f-2863-49b2823fcf64",
    "component": {
        "icon": "mdi mdi-plus",
        "name": "Register Contact",
        "type": "EMBEDDED",
        "location": "CONTACTS_DATAPAGE"
    },
    "state": "ACTIVE"
}
Filters (Content Views)
POST /filters
PUT /filters/{id}
DELETE /filters/{id}
GET /filters
GET /filters/{id}
Create Filter
POST /filters

Create a new filter for a specific module (e.g. contacts, service requests)

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 filter name

Example:
Active Discount Offers
module
string

The module for which the filter will be applied

Enumeration:
ACTIVITIES
API_KEYS
AUTOMATIONS
CE_CLASSIFICATIONS
SERVICE_REQUESTS
REWARD_OFFERS
REWARD_SCHEMES
TAPS
USERS
WEBHOOKS
ORDERS
PRODUCT_CATALOG
CONTACTS
PROMOTIONS
REWARD_EVENTS
accessibility
Object required

Defines which organisations can be access and use it

type
string required

Defines which organisations can access and use it

Enumeration:
PRIVATE

Available only for the user that created it

MY_ORGANISATION

Available for all users under the same organisation

Default:
PRIVATE
properties
Array required
Object
property
string required

The attribute which will be considered as a filter

Example:
purchase.amount
operator
string required

The comparison operator between the property and the related value

Enumeration:
IS
IS_NOT
ON
BEFORE
AFTER
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
IS_EMPTY
IS_NOT_EMPTY
STARTS_WITH
DOES_NOT_START_WITH
ENDS_WITH
DOES_NOT_END_WITH
LIKE
NOT_LIKE
EQUAL
NOT_EQUAL
LESS_THAN_OR_EQUAL
MORE_THAN_OR_EQUAL
Default:
IS
min_value
string required

The (primary) value that will be compared to the property

Example:
5.00
max_value
string

The (secondary) value that will be compared to the property, applicable for range comparisons

Example:
10
value_list
Array

The record (identifier) that will be compared to the propery (applicable when filtering based on specific records, such as specific contacts, offers, products)

Example:
[
    "1ccf5401-e4b1-d173-2301-4c639b62c26f"
]
string GUID
Example:
1ccf5401-e4b1-d173-2301-4c639b62c26f
type
string required

The type of the propery attribute

Enumeration:
STRING
NUMBER
INTEGER
DATE
Examples

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The filter identifier

Example:
ADD1E31269B76D7A65ACCE45B2E68DFD
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/filter HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Active Discount Offers",
    "module": "OFFERS",
    "accessibility": {
        "type": "PRIVATE"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "ADD1E31269B76D7A65ACCE45B2E68DFD"
}
Update Filter
PUT /filters/{id}

Update an existing filter

Path variables

id
string GUID required

The filter (identifier) that will be updated

Example:
49bad38a-efab-86cb-e501-e2c141099e50

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 filter name

Example:
Active Reward Offers
accessibility
Object nullable

Defines which organisations can be access and use it

type
string required

Defines which organisations can access and use it

Enumeration:
PRIVATE

Available only for the user that created it

MY_ORGANISATION

Available for all users under the same organisation

Default:
PRIVATE
properties
Array nullable
Object
property
string required

The attribute which will be considered as a filter

Example:
purchase.amount
operator
string required

The comparison operator between the property and the related value

Enumeration:
IS
IS_NOT
ON
BEFORE
AFTER
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
IS_EMPTY
IS_NOT_EMPTY
STARTS_WITH
DOES_NOT_START_WITH
ENDS_WITH
DOES_NOT_END_WITH
LIKE
NOT_LIKE
EQUAL
NOT_EQUAL
LESS_THAN_OR_EQUAL
MORE_THAN_OR_EQUAL
Default:
IS
min_value
string required

The (primary) value that will be compared to the property

Example:
5.00
max_value
string

The (secondary) value that will be compared to the property, applicable for range comparisons

Example:
10
value_list
Array

The record (identifier) that will be compared to the propery (applicable when filtering based on specific records, such as specific contacts, offers, products)

Example:
[
    "1ccf5401-e4b1-d173-2301-4c639b62c26f"
]
string GUID
Example:
1ccf5401-e4b1-d173-2301-4c639b62c26f
type
string required

The type of the propery attribute

Enumeration:
STRING
NUMBER
INTEGER
DATE

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The filter identifier

Example:
ADD1E31269B76D7A65ACCE45B2E68DFD
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/filters/49bad38a-efab-86cb-e501-e2c141099e50 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Active Discount Offers"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "ADD1E31269B76D7A65ACCE45B2E68DFD"
}
Delete Filter
DELETE /filters/{id}

Delete an existing filter

Path variables

id
string GUID required

The filter (identifier) that will be deleted

Example:
49bad38a-efab-86cb-e501-e2c141099e50

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/filters/49bad38a-efab-86cb-e501-e2c141099e50 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 204 No Content 
List Filters
GET /filters

Retrieve a list of filters based on search criteria (e.g. all service request filters)

Request parameters

module
string optional

Narrow down filter results based on module

Enumeration:
ACTIVITIES
API_KEYS
AUTOMATIONS
CE_CLASSIFICATIONS
SERVICE_REQUESTS
REWARD_OFFERS
REWARD_SCHEMES
TAPS
USERS
WEBHOOKS
ORDERS
PRODUCT_CATALOG
CONTACTS
PROMOTIONS
REWARD_EVENTS
include_conditions
boolean optional

Defines whether conditions should be returned as well

Example:
false
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 filter identifier

Example:
49bad38a-efab-86cb-e501-e2c141099e50
name
string

The filter name

Example:
Active Discount Offers
owner
Object
id
string GUID

The user’s identifier

Example:
a12b282f-e6ce-e618-0a72-becb3ad78033
name
string

The user’s full name

Example:
John Smith
username
string

The user’s credential username

Example:
johnsmith@crm.com
module
string

The module for which the filter will be applied

Enumeration:
ACTIVITIES
API_KEYS
AUTOMATIONS
CE_CLASSIFICATIONS
SERVICE_REQUESTS
REWARD_OFFERS
REWARD_SCHEMES
TAPS
USERS
WEBHOOKS
ORDERS
PRODUCT_CATALOG
CONTACTS
PROMOTIONS
REWARD_EVENTS
accessibility
Object

Defines how the segment can be accessed from business network

type
string

Defines which organisations can access and use it

Enumeration:
PRIVATE

Available only for the user that created it

MY_ORGANISATION

Available for all users under the same organisation

properties
Array
Object
property
string required

The attribute which will be considered as a filter

Example:
purchase.amount
operator
string required

The comparison operator between the property and the related value

Enumeration:
IS
IS_NOT
ON
BEFORE
AFTER
BETWEEN
MORE_THAN
LESS_THAN
CONTAINS
DOES_NOT_CONTAIN
IS_EMPTY
IS_NOT_EMPTY
STARTS_WITH
DOES_NOT_START_WITH
ENDS_WITH
DOES_NOT_END_WITH
LIKE
NOT_LIKE
EQUAL
NOT_EQUAL
LESS_THAN_OR_EQUAL
MORE_THAN_OR_EQUAL
Default:
IS
min_value
string required

The (primary) value that will be compared to the property

Example:
5.00
max_value
string

The (secondary) value that will be compared to the property, applicable for range comparisons

Example:
10
value_list
Array

The record (identifier) that will be compared to the propery (applicable when filtering based on specific records, such as specific contacts, offers, products)

Example:
[
    "1ccf5401-e4b1-d173-2301-4c639b62c26f"
]
string GUID
Example:
1ccf5401-e4b1-d173-2301-4c639b62c26f
type
string required

The type of the propery attribute

Enumeration:
STRING
NUMBER
INTEGER
DATE
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/filters HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "49bad38a-efab-86cb-e501-e2c141099e50",
            "name": "Active Discount Offers",
            "module": "OFFERS"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Filter
GET /filters/{id}

Retrieve detailed information for a filter

Path variables

id
string GUID required

The filter (identifier) which attributes will be retrieved

Example:
514aefa7-ec78-3229-e70e-9935c84fa0b9

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 filter identifier

Example:
49bad38a-efab-86cb-e501-e2c141099e50
name
string

The filter name

Example:
Active Discount Offers
accessibility
Object

Defines how the segment can be accessed from business network

type
string

Defines which organisations can access and use it

Enumeration:
PRIVATE

Available only for the user that created it

MY_ORGANISATION

Available for all users under the same organisation

properties
Array

The filtering conditions that will be applied

Object
property
string

The attribute which will be considered as a filter

Example:
purchase.amount
operator
string

The comparison operator between the property and the related value

Example:
MORE_THAN
min_value
string

The (primary) value that will be compared to the property

Example:
5.00
max_value
string

The (secondary) value that will be compared to the property, applicable for range comparisons

Example:
10
value_list
Array

The record (identifier) that will be compared to the propery (applicable when filtering based on specific records, such as specific contacts, offers, products)

Example:
[
    "1ccf5401-e4b1-d173-2301-4c639b62c26f"
]
string GUID
Example:
1ccf5401-e4b1-d173-2301-4c639b62c26f
type
string

The type of the propery attribute

Enumeration:
STRING
NUMBER
INTEGER
DATE
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/filters/514aefa7-ec78-3229-e70e-9935c84fa0b9 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "49bad38a-efab-86cb-e501-e2c141099e50",
    "name": "Active Discount Offers",
    "accessibility": {
        "type": "ACROSS_NETWORK"
    }
}
User Filters
POST /users/{id}/filters
GET /users/{id}/filters
Save Filter (User)
POST /users/{id}/filters

Saves the latest filter applied on a summary page by the user for a specific module

Path variables

id
string GUID required

The user (identifier) for which the filter will be set

Example:
03397197-6e67-ab75-ae69-76d3d66e06fb

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
module
string required

The module for which the filter will be applied

Enumeration:
ACTIVITIES
API_KEYS
AUTOMATIONS
CE_CLASSIFICATIONS
SERVICE_REQUESTS
REWARD_OFFERS
REWARD_SCHEMES
TAPS
USERS
WEBHOOKS
ORDERS
PRODUCT_CATALOG
CONTACTS
PROMOTIONS
REWARD_EVENTS
filter_id
string GUID required

The filter (identifier) that will be set as the default of the related module

Example:
9a3c41c6-3450-bb0a-10d2-acbfd836a385

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The filter identifier

Example:
a4896470-09c4-bd61-7502-4c4bc54fb6d6
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/users/03397197-6e67-ab75-ae69-76d3d66e06fb/filters HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "module": "TAPS",
    "filter_id": "9a3c41c6-3450-bb0a-10d2-acbfd836a385"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "a4896470-09c4-bd61-7502-4c4bc54fb6d6"
}
Get Filter (User)
GET /users/{id}/filters

Retrieves the latest filters applied on a summary page by the user for specific modules

Path variables

id
string GUID required

The user (identifier) for which the filter will be retrieved

Example:
03397197-6e67-ab75-ae69-76d3d66e06fb

Request parameters

module
string optional

Filter based on module

Enumeration:
ACTIVITIES
API_KEYS
AUTOMATIONS
CE_CLASSIFICATIONS
SERVICE_REQUESTS
REWARD_OFFERS
REWARD_SCHEMES
TAPS
USERS
WEBHOOKS
ORDERS
PRODUCT_CATALOG
CONTACTS
PROMOTIONS
REWARD_EVENTS

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
module
string

The module for which the filter will be applied

Enumeration:
ACTIVITIES
API_KEYS
AUTOMATIONS
CE_CLASSIFICATIONS
SERVICE_REQUESTS
REWARD_OFFERS
REWARD_SCHEMES
TAPS
USERS
WEBHOOKS
ORDERS
PRODUCT_CATALOG
CONTACTS
PROMOTIONS
REWARD_EVENTS
filter
Object

Details about the filter that was previously applied by the user

id
string GUID

The filter identier

Example:
26fb9432-75ca-628e-50ef-3c7be9466bc5
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/users/03397197-6e67-ab75-ae69-76d3d66e06fb/filters HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "module": "REWARD_OFFERS",
    "filter": {
        "id": "26fb9432-75ca-628e-50ef-3c7be9466bc5"
    }
}
Industries and Industry Sectors
Industries
POST /industries
PUT /industries/{id}
DELETE /industry/{id}
GET /industries
GET /industries/{id}
Create Industries
POST /industries

Create a new industry

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 name of the industry to be created

Example:
TRAVEL

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The industry identifier

Example:
289be4e0-4d54-6bec-3517-bd27bc67c1ac
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/industries HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "TRAVEL"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "289be4e0-4d54-6bec-3517-bd27bc67c1ac"
}
Update Industries
PUT /industries/{id}

Update an existing industry

Path variables

id
string GUID required

The industry (identifier) that will be updated

Example:
c18fb5e3-3ecb-c5ed-016c-16fa584a5203

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 industry to be updated

Example:
Marketing

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The industry identifier

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/industries/c18fb5e3-3ecb-c5ed-016c-16fa584a5203 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Marketing"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Delete Industry
DELETE /industry/{id}

Delete an existing industry

Path variables

id
string GUID required

The industry (identifier) that will be deleted

Example:
c18fb5e3-3ecb-c5ed-016c-16fa584a5203

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/industry/c18fb5e3-3ecb-c5ed-016c-16fa584a5203 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 204 No Content 
List Industries
GET /industries

Retrieve a list of industries based on search criteria (e.g. all “education” industries)

Request parameters

name
string optional

Filter based on industry name

Example:
EDUCATION
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

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 industry identifier

Example:
d7c39ece-0fa5-d94f-1830-c8278c9d290f
name
string

The industry name

Example:
Travel
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/industries HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "d7c39ece-0fa5-d94f-1830-c8278c9d290f",
            "name": "Travel"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Industry
GET /industries/{id}

Retrieve detailed information for an industry

Path variables

id
string GUID required

The industry (identifier) that will be retrieved

Example:
d7c39ece-0fa5-d94f-1830-c8278c9d290f

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 industry identifier

Example:
d7c39ece-0fa5-d94f-1830-c8278c9d290f
name
string

The industry name

Example:
Travel
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/industries/d7c39ece-0fa5-d94f-1830-c8278c9d290f HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "d7c39ece-0fa5-d94f-1830-c8278c9d290f",
    "name": "Travel"
}
Industry Sectors
POST /industry_sectors
PUT /industry_sectors/{id}
DELETE /industry_sectors/{id}
GET /industry_sectors
GET /industry_sectors/{id}
Create Industry Sectors
POST /industry_sectors

Create industry sectors against specific industries

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 industry sector name

Example:
TRAVEL AGENTS
industries
Array required

Details about industries that are associated with the industry sector

Object
industry_id
string GUID required

The industry (identifier) related to the industry sector

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The industry sector identifier

Example:
d6e7e8ce-5516-4153-9e94-63f5ff54511b
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/industry_sectors HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "TRAVEL AGENTS",
    "industries": [
        {
            "industry_id": "4AD9C84FA60F9FE407140E20F707726A"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "d6e7e8ce-5516-4153-9e94-63f5ff54511b"
}
Update Industry Sectors
PUT /industry_sectors/{id}

Update an existing industry sector

Path variables

id
string GUID required

The industry sector (identifier) that will be updated

Example:
d7c39ece-0fa5-d94f-1830-c8278c9d290f

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 industry sector name

Example:
Science
industries
Array nullable

Details about industries that are associated with the industry sector

Object
industry_id
string GUID required

The industry (identifier)

Example:
fbc0db4d-a7f5-ac5b-da88-c64e9d07c3de

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The industry sector identifier

Example:
d7c39ece-0fa5-d94f-1830-c8278c9d290f
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/industry_sectors/d7c39ece-0fa5-d94f-1830-c8278c9d290f HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Science",
    "industries": [
        {
            "industry_id": "fbc0db4d-a7f5-ac5b-da88-c64e9d07c3de"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "d7c39ece-0fa5-d94f-1830-c8278c9d290f"
}
Delete Industry Sector
DELETE /industry_sectors/{id}

Delete an existing industry sector

Path variables

id
string GUID required

The industry sector (identifier) that will be deleted

Example:
d6e7e8ce-5516-4153-9e94-63f5ff54511b

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/industry_sectors/d6e7e8ce-5516-4153-9e94-63f5ff54511b HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 204 No Content 
List Industry Sectors
GET /industry_sectors

Retrieve a list of industry sectors based on search criteria (e.g. all “restaurants” industry sectors)

Request parameters

name
string optional

Filter based on industry sector name

Example:
RESTAURANTS
industry_name
string optional

Filter based on industry name (where industry sector is associated with)

Example:
EDUCATION
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

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 industry sector identifier

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The industry sector name

Example:
Science
industries
Array

Details about industries that are associated with the industry sector

Object
id
string GUID

The industry identifier

Example:
d6e7e8ce-5516-4153-9e94-63f5ff54511b
name
string

The industry name

Example:
Computer
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/industry_sectors HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "name": "Science",
            "industries": [
                {
                    "id": "d6e7e8ce-5516-4153-9e94-63f5ff54511b",
                    "name": "Computer"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Industry Sector
GET /industry_sectors/{id}

Retrieve detailed information for an industry sector

Path variables

id
string GUID required

The industry sector (identifier) that will be retrieved

Example:
f47e682a-5910-4714-9030-44469e2a6f85

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 industry sector identifier

Example:
f47e682a-5910-4714-9030-44469e2a6f85
name
string

The industry sector name

Example:
Science
industries
Array

Details about industries that are associated with the industry sector

Object
id
string GUID

The industry identifier

Example:
84b4495e-5e5e-b11f-7a86-2487aa7bd206
name
string

The industry name

Example:
Computer
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/industry_sectors/f47e682a-5910-4714-9030-44469e2a6f85 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "f47e682a-5910-4714-9030-44469e2a6f85",
    "name": "Science",
    "industries": [
        {
            "id": "84b4495e-5e5e-b11f-7a86-2487aa7bd206",
            "name": "Computer"
        }
    ]
}
Landing Pages

Set up of a web page which serves as the entry point for a website or a particular section of a website.

POST /landing_pages
PUT /landing_pages/{id}
DELETE /landing_pages/{id}/
GET /landing_pages
GET /landing_pages/{id}
Create Landing Page
POST /landing_pages

Create a new landing page

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

Object
name
string required

The landing page name

Example:
Enrolment form for Mobile pass cards
description
string nullable

The landing page description

Example:
Enrolment landing page for mobile pass cards.
type
string required

The landing page enum

Enumeration:
REGISTER

Used for contact registration

PURCHASE_PASS

Used for purchasing a gift pass

mobile_pass
boolean required

Defines whether a mobile pass provision is allowed or not

Default:
false
Example:
true
pass_plan_id
string

The pass plan id for which passes will be created, only required when ‘type’ = PURCHASE_PASS (i.e. the landing page is used for purchasing a gift pass)

Example:
5f1316d2-dfce-42f0-b7bf-c543b8df7702
form
Object required
header
string nullable

The text in the header

Example:
This is a header
title
string required

The title to be dispayed on the landing page

Example:
Enrolment form
description
string nullable

The description on the landing page

Example:
Please enter detail to enrol for mobile pass cards.
footer
string nullable

The footer text

Example:
Please sign up
button
string nullable

The text to be displayed on the button

Example:
Submit
success
string required

The success message to be displayed on the success response page.

Example:
Congratulations!
fail
string required

The failure message to be displayed on the failure response page.

Example:
Failed.
logo_img_position
string nullable

Defines whether the logo image will be positioned

Enumeration:
LEFT
CENTER
RIGHT
colors
Array nullable

The landing page components coloring

Object
type
string required

The landing page component that the color will be applied

Enumeration:
BACKGROUND
HEADER
BUTTON
TEXT
FOOTER
HEADER_TEXT
FOOTER_TEXT
BUTTON_TEXT
value
string required

The color code (hex code value)

Example:
FSR4ER
opacity
Array nullable

The landing page images opacity

Object
image
string required

The image type.

Enumeration:
HEADER
BACKGROUND
value
integer required

The opacity percentage

fields
Array required

Details pertaining to the enrollment form fields

Object
property
string required

The property to be added as a field

Example:
contact.email
label
string required

The label defined to the field

Example:
email
priority
string int required

The priority in which the fields are displayed on the row or the section

Example:
1 , 2 , 3

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The GUID of the landing page created

Example:
HGJSDYGFUY87686GFJHFASD
Example 1
POST https://sandbox.crm.com/backoffice/v2/landing_pages HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "name": "Enrolment form for Mobile pass cards",
    "description": "Enrolment landing page for mobile pass cards.",
    "type": "REGISTER",
    "mobile_pass": true,
    "pass_plan_id": "5f1316d2-dfce-42f0-b7bf-c543b8df7702",
    "form": {
        "header": "This is a header",
        "title": "Enrolment form",
        "description": "Please enter detail to enrol for mobile pass cards.",
        "footer": "Please sign up",
        "button": "Submit",
        "success": "Congratulations!",
        "fail": "Failed.",
        "logo_img_position": "RIGHT",
        "colors": [
            {
                "type": "BUTTON",
                "value": "FSR4ER"
            }
        ],
        "opacity": [
            {
                "image": "HEADER",
                "value": 1
            }
        ],
        "fields": [
            {
                "property": "contact.email",
                "label": "email",
                "priority": "1 , 2 , 3"
            }
        ]
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "HGJSDYGFUY87686GFJHFASD"
}
Update Landing Page
PUT /landing_pages/{id}

Updates an existing landing page

Path variables

id
string GUID required

The landing page (identifier) to be updated

Example:
a974a078-1fcb-9f60-782f-5989e4881f24

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

Object
name
string nullable

The landing page name

Example:
Enrolment form for Mobile pass cards
description
string nullable

The landing page description

Example:
Enrolment landing page for mobile pass cards.
state
string nullable

The landing page state

Enumeration:
ACTIVE
INACTIVE
mobile_pass
boolean nullable

Defines whether a mobile pass provision is allowed or not

Default:
false
Example:
true
pass_plan_id
string

The pass plan id for which passes will be created, only required when ‘type’ = PURCHASE_PASS (i.e. the landing page is used for purchasing a gift pass)

Example:
5f1316d2-dfce-42f0-b7bf-c543b8df7702
form
Object nullable
header
string nullable

The text in the header

Example:
This is a header
title
string required

The title to be dispayed on the landing page

Example:
Enrolment form
description
string nullable

The description on the landing page

Example:
Please enter detail to enrol for mobile pass cards.
footer
string nullable

The footer text

Example:
Please sign up
button
string nullable

The text to be displayed on the button

Example:
Submit
success
string required

The success message to be displayed on the success response page.

Example:
Congratulations!
fail
string required

The failure message to be displayed on the failure response page.

Example:
Failed.
logo_img_position
string nullable

Defines whether the logo image will be positioned

Enumeration:
LEFT
CENTER
RIGHT
colors
Array nullable

The landing page components coloring

Object
type
string required

The landing page component that the color will be applied

Enumeration:
BACKGROUND
HEADER
BUTTON
TEXT
FOOTER
HEADER_TEXT
FOOTER_TEXT
BUTTON_TEXT
value
string required

The color code (hex code value)

Example:
FSR4ER
opacity
Array nullable

The landing page images opacity

Object
image
string required

The image type.

Enumeration:
HEADER
BACKGROUND
value
integer required

The opacity percentage

fields
Array required

Details pertaining to the enrollment form fields

Object
property
string required

The property to be added as a field

Example:
contact.email
label
string required

The label defined to the field

Example:
email
priority
string int required

The priority in which the fields are displayed on the row or the section

Example:
1 , 2 , 3

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The landing page identifier

Example:
a974a078-1fcb-9f60-782f-5989e4881f24
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
PUT https://sandbox.crm.com/backoffice/v2/landing_pages/a974a078-1fcb-9f60-782f-5989e4881f24 HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "name": "Enrolment form for Mobile pass cards",
    "description": "Enrolment landing page for mobile pass cards.",
    "state": "ACTIVE",
    "mobile_pass": true,
    "pass_plan_id": "5f1316d2-dfce-42f0-b7bf-c543b8df7702",
    "form": {
        "header": "This is a header",
        "title": "Enrolment form",
        "description": "Please enter detail to enrol for mobile pass cards.",
        "footer": "Please sign up",
        "button": "Submit",
        "success": "Congratulations!",
        "fail": "Failed.",
        "logo_img_position": "LEFT",
        "colors": [
            {
                "type": "BACKGROUND",
                "value": "FSR4ER"
            }
        ],
        "opacity": [
            {
                "image": "BACKGROUND",
                "value": 1
            }
        ],
        "fields": [
            {
                "property": "contact.email",
                "label": "email",
                "priority": "1 , 2 , 3"
            }
        ]
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a974a078-1fcb-9f60-782f-5989e4881f24"
}
Delete Landing Page
DELETE /landing_pages/{id}/

Delete an existing landing page

Path variables

id
string GUID required

The landing page (identifier) that will be deleted

Example:
d2ce805b-e2f1-d853-c68f-d157fef21a79

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

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/landing_pages/d2ce805b-e2f1-d853-c68f-d157fef21a79/ HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

HTTP/1.1 204 No Content 
List Landing Pages
GET /landing_pages

Retrieve a list of landing pages based on search criteria (e.g. all active landing pages)

Request parameters

search_value
string optional

Search for landing pages based on their name or description

Example:
Register Page
state
string optional

Filter based on landing page state

Enumeration:
ACTIVE
INACTIVE
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 landing pages identifier

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The landing pages name

Example:
Enrolment form for Mobile pass cards
description
string

The landing page description

Example:
Enrolment landing page for mobile pass cards.
state
string

The landing page state

Enumeration:
ACTIVE
INACTIVE
link
string

the link associated to the landing page

Example:
https://abc.com
type
string

The landing page enum

Enumeration:
REGISTER

Used for contact registration

PURCHASE_PASS

Used for purchasing a gift pass

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/landing_pages HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4AD9C84FA60F9FE407140E20F707726A",
            "name": "Enrolment form for Mobile pass cards",
            "description": "Enrolment landing page for mobile pass cards.",
            "state": "INACTIVE",
            "link": "https://abc.com",
            "type": "REGISTER"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Landing Page
GET /landing_pages/{id}

Retrieve detailed information for a landing page

Path variables

id
string GUID required

The mobile pass (identifier) to be retrieved

Example:
7e63eda8-5881-b078-6dfb-c658a6f71676

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

Responses

200 OK

The request has succeeded

Body
Object
name
string

The name of the landing page.

Example:
My loyalty pass enrolment form
description
string

The description of the landing page

Example:
Enrolment landing page for mobile pass cards.
type
string

The landing page enum

Enumeration:
REGISTER

Used for contact registration

PURCHASE_PASS

Used for purchasing a gift pass

link
string

The link associated to the landing page

Example:
https://abc.com
mobile_pass
boolean

Defines whether a mobile pass provision is allowed or not

Example:
true
pass_plan_id
string

The pass plan id for which passes will be created, only set when ‘type’ = PURCHASE_PASS (i.e. the landing page is used for purchasing a gift pass)

Example:
5f1316d2-dfce-42f0-b7bf-c543b8df7702
state
string

The landing page state

Enumeration:
ACTIVE
INACTIVE
form
Object
header
string

The text in the header

Example:
This is a header
title
string

The title to be dispayed on the landing page

Example:
Enrolment form
description
string

The text in the description

Example:
test
footer
string

The footer text

Example:
Please sign up
button
string

The text to be displayed on the button

Example:
Submit
success
string

The success message to be displayed on the success response page

Example:
Congratulations!
fail
string

The failure message to be displayed on the failure response page

Example:
Failed.
logo_img_position
string

Defines whether the logo image will be positioned

Enumeration:
LEFT
CENTER
RIGHT
colors
Array

The landing page components coloring

Object
type
string required

The landing page component that the color will be applied

Enumeration:
BACKGROUND
HEADER
BUTTON
TEXT
FOOTER
HEADER_TEXT
FOOTER_TEXT
BUTTON_TEXT
value
string required

The color code (hex code value)

Example:
FSR4ER
opacity
Array

The landing page images opacity

Object
image
string required

The image type.

Enumeration:
HEADER
BACKGROUND
value
integer required

The opacity percentage

fields
Array

Details pertaining to the enrollment form fields

Object
property
string

The property to be added as a field

Example:
contact.email
label
string

The label defined to the field

Example:
email
priority
string int

The priority in which the fields are displayed on the row or the section

Example:
1 , 2 , 3
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
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
GET https://sandbox.crm.com/backoffice/v2/landing_pages/7e63eda8-5881-b078-6dfb-c658a6f71676 HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "My loyalty pass enrolment form",
    "description": "Enrolment landing page for mobile pass cards.",
    "type": "PURCHASE_PASS",
    "link": "https://abc.com",
    "mobile_pass": true,
    "pass_plan_id": "5f1316d2-dfce-42f0-b7bf-c543b8df7702",
    "state": "INACTIVE",
    "form": {
        "header": "This is a header",
        "title": "Enrolment form",
        "description": "test",
        "footer": "Please sign up",
        "button": "Submit",
        "success": "Congratulations!",
        "fail": "Failed.",
        "logo_img_position": "LEFT",
        "colors": [
            {
                "type": "FOOTER",
                "value": "FSR4ER"
            }
        ],
        "opacity": [
            {
                "image": "BACKGROUND",
                "value": 1
            }
        ],
        "fields": [
            {
                "property": "contact.email",
                "label": "email",
                "priority": "1 , 2 , 3"
            }
        ],
        "creatives": [
            {
                "id": "3caf8388-b9c6-6679-1e9b-94a6fda92a41",
                "usage_type": "LANDING_PAGE_BACKGROUND_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"
                    }
                ]
            }
        ]
    }
}
Media Group
POST /landing_pages/{id}/media_groups
Landing Pages Media Groups
POST /landing_pages/{id}/media_groups

Link a landing page with one or more media groups

Path variables

id
string GUID required

The landing page (identifier) that media groups will be set

Example:
3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb

Notes

MEDIA UPLOAD

Uploading media for a landing page requires the execution of the following APIs

  1. Create new Media Group
  2. Create Landing Pages 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/landing_pages/3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb/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 
Mobile Passes

Mobile Passes are the collective term for the non payment cards, such as coupons, loyalty cards, subscription cards, rewards and anything that is not a payment card. These mobile pass cards will be set up by the CRM.com user and shall be linked to contacts that ‘enroll’ into this card scheme.

POST /mobile_passes
PUT /mobile_passes/{id}
DELETE /mobile_passes/{id}
GET /mobile_passes
GET /mobile_passes/{id}
Create Mobile Pass
POST /mobile_passes

Create a new mobile pass

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

Object
name
string required

The mobile pass name

Example:
My loyalty pass
program_name
string nullable

The name of the program that applies to this pass card (required for Google)

Example:
My loyalty pass
description
string nullable

The mobile pass description

Example:
This card is for reward purposes.
fields
Array required

Details regarding the fields added to the pass

Object
platform
string

The wallet platform to which this field relates to.

Enumeration:
APPLE
GOOGLE
label
string

The label defined to the field

Example:
Points
location
string

Whether the field is at a row or a section

Enumeration:
ROW
SECTION
WEB_LINK
location_number
string int required

The row or section number

Example:
1 , 2 , 3
priority
string int required

The priority in which the fields are displayed on the row or the section

Example:
1 , 2 , 3
property
string

The property in that field

Example:
wallet.points , https://abc.com
side
string

Whether the field is on the front or the back

Enumeration:
FRONT
BACK
property_value
string

The value of the property (applicable only for platform APPLE and property portal_url)

Example:
https//releaseportal.crm.com
text_alignment
string

The placement of the text.

Enumeration:
LEFT
CENTER
RIGHT
type
string

The nature of the field

Enumeration:
WEB
CALENDAR
LOCATION
PHONE
EMAIL
PORTAL_URL
attributes
Array required

The attributes relating to the pass

Object
parameter
string required

The parameter type

Enumeration:
COLOUR
FONT
type
string required

The attribute type

Enumeration:
BACKGROUND

the background colour.

TEXT

the text colour.

LABEL

the label colour.

value
string required

The attribute value

Example:
FA76VC1
barcode
Object required
type
string required

The type of barcode to be displayed on the pass

Enumeration:
PDF_417
QR_CODE
NONE
AZTEC
CODE_128
content
string lexicon required

The content to be stored as the barcode. Defaulted to contacts.id as lexicon

Enumeration:
contact.id
contact.loyalty_number
contact.code

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The mobile pass identifier

Example:
19bc382b-fdf6-57a4-803e-425cf1530fa6
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/mobile_passes HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "name": "My loyalty pass",
    "description": "This card is for reward purposes.",
    "fields": [
        {
            "platform": "GOOGLE",
            "label": "Points",
            "location": "ROW",
            "location_number": "1 , 2 , 3",
            "priority": "1 , 2 , 3",
            "property": "wallet.points , https://abc.com",
            "side": "BACK",
            "property_value": "https//releaseportal.crm.com",
            "text_alignment": "CENTER",
            "type": "CALENDAR"
        }
    ],
    "attributes": [
        {
            "parameter": "FONT",
            "type": "LABEL",
            "value": "FA76VC1"
        }
    ],
    "barcode": {
        "type": "AZTEC",
        "content": "contact.loyalty_number"
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "19bc382b-fdf6-57a4-803e-425cf1530fa6"
}
Update Mobile Pass
PUT /mobile_passes/{id}

Update an existing mobile pass

Path variables

id
string GUID required

The mobile pass (identifier) to be updated

Example:
7fb8da7b-6a67-04d4-167b-a979c68e49e3

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

Object
name
string nullable

The name of the pass card

Example:
My loyalty pass
program_name
string required nullable

The name of the program that applies to this pass card (required for Google)

Example:
My loyalty program
description
string nullable

The description of the pass card

Example:
This card is for reward purposes.
state
string nullable

The landing page state

Enumeration:
ACTIVE
INACTIVE
fields
Array nullable

Details regarding the fields added to the pass

Object
id
string GUID

The field (identifier) that will be updated

Example:
26c8ad53-bb05-f62e-88c6-ff64face3087
platform
string

The wallet platform to which this field relates to.

Enumeration:
APPLE
GOOGLE
label
string

The label defined to the field

Example:
Points
location
string

Whether the field is at a row or a section

Enumeration:
ROW
SECTION
WEB_LINK
location_number
string int required

The row or section number

Example:
1 , 2 , 3
priority
string int required

The priority in which the fields are displayed on the row or the section

Example:
1 , 2 , 3
property
string

The property in that field

Example:
wallet.points , https://abc.com
side
string

Whether the field is on the front or the back

Enumeration:
FRONT
BACK
property_value
string

The value of the property (applicable only for platform APPLE and property portal_url)

Example:
https//releaseportal.crm.com
text_alignment
string

The placement of the text.

Enumeration:
LEFT
CENTER
RIGHT
type
string

The nature of the field

Enumeration:
WEB
CALENDAR
LOCATION
PHONE
EMAIL
PORTAL_URL
attributes
Array nullable

The attributes relating to the pass

Object
id
string GUID required

The attribute identifier

Example:
d875bee3-0975-5301-ff56-0d4c5fb027cf
parameter
string required

The parameter type

Enumeration:
COLOUR
FONT
type
string required

The attribute type

Enumeration:
BACKGROUND

the background colour.

TEXT

the text colour.

LABEL

the label colour.

value
string required

The attribute value

Example:
FA76VC1
barcode
Object nullable
type
string required

The type of barcode to be displayed on the pass

Enumeration:
PDF_417
QR_CODE
NONE
AZTEC
CODE_128
content
string lexicon required

The content to be stored as the barcode. Defaulted to contacts.id as lexicon

Enumeration:
contact.id
contact.loyalty_number
contact.code

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The mobile pass card identifier

Example:
7fb8da7b-6a67-04d4-167b-a979c68e49e3
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/mobile_passes/7fb8da7b-6a67-04d4-167b-a979c68e49e3 HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "name": "My loyalty pass",
    "program_name": "My loyalty program",
    "description": "This card is for reward purposes.",
    "state": "ACTIVE",
    "fields": [
        {
            "id": "26c8ad53-bb05-f62e-88c6-ff64face3087",
            "platform": "GOOGLE",
            "label": "Points",
            "location": "SECTION",
            "location_number": "1 , 2 , 3",
            "priority": "1 , 2 , 3",
            "property": "wallet.points , https://abc.com",
            "side": "FRONT",
            "property_value": "https//releaseportal.crm.com",
            "text_alignment": "RIGHT",
            "type": "LOCATION"
        }
    ],
    "attributes": [
        {
            "id": "d875bee3-0975-5301-ff56-0d4c5fb027cf",
            "parameter": "FONT",
            "type": "LABEL",
            "value": "FA76VC1"
        }
    ],
    "barcode": {
        "type": "CODE_128",
        "content": "contact.loyalty_number"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "7fb8da7b-6a67-04d4-167b-a979c68e49e3"
}
Delete Mobile Pass
DELETE /mobile_passes/{id}

Update an existing mobile pass

Path variables

id
string GUID required

The mobile pass (identifier) to be deleted

Example:
7fb8da7b-6a67-04d4-167b-a979c68e49e3

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Responses

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/mobile_passes/7fb8da7b-6a67-04d4-167b-a979c68e49e3 HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 204 No Content 
List Mobile Passes
GET /mobile_passes

Retrieve a list of mobile passes based on search criteria (e.g. all mobile passes)

Request parameters

search
string optional

Filters based on mobile pass name (behave as like)

Example:
CRM Mobile Pass
state
string optional

Filter based on mobile pass state

Enumeration:
ACTIVE
INACTIVE
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 required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The mobile pass identifier

Example:
927d5e79-15b8-8e6e-9e12-cff545ae2db0
name
string

The mobile pass name

Example:
CRM Mobile Pass
state
string

The landing page state

Enumeration:
ACTIVE
INACTIVE
description
string

The mobile pass description

Example:
CRM Mobile Pass Card
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/mobile_passes HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "927d5e79-15b8-8e6e-9e12-cff545ae2db0",
            "name": "CRM Mobile Pass",
            "state": "INACTIVE",
            "description": "CRM Mobile Pass Card"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Mobile Pass
GET /mobile_passes/{id}

Retrieve detailed information for a mobile pass

Path variables

id
string GUID required

The mobile pass (identifier) to be retrieved

Example:
7fb8da7b-6a67-04d4-167b-a979c68e49e3

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

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The mobile pass identifier

Example:
7fb8da7b-6a67-04d4-167b-a979c68e49e3
name
string

The name of the mobile pass

Example:
My loyalty pass
description
string

The descri-ption of the mobile pass

Example:
This card is for reward purposes.
state
string

The landing page state

Enumeration:
ACTIVE
INACTIVE
fields
Array

Details regarding the fields added to the pass

Object
id
string GUID

The field (identifier) that will be updated

Example:
26c8ad53-bb05-f62e-88c6-ff64face3087
platform
string

The wallet platform to which this field relates to.

Enumeration:
APPLE
GOOGLE
label
string

The label defined to the field

Example:
Points
location
string

Whether the field is at a row or a section

Enumeration:
ROW
SECTION
WEB_LINK
location_number
string int required

The row or section number

Example:
1 , 2 , 3
priority
string int required

The priority in which the fields are displayed on the row or the section

Example:
1 , 2 , 3
property
string

The property in that field

Example:
wallet.points , https://abc.com
side
string

Whether the field is on the front or the back

Enumeration:
FRONT
BACK
property_value
string

The value of the property (applicable only for platform APPLE and property portal_url)

Example:
https//releaseportal.crm.com
text_alignment
string

The placement of the text.

Enumeration:
LEFT
CENTER
RIGHT
type
string

The nature of the field

Enumeration:
WEB
CALENDAR
LOCATION
PHONE
EMAIL
PORTAL_URL
attributes
Array

The attributes relating to the pass

Object
id
string GUID required

The attribute identifier

Example:
d875bee3-0975-5301-ff56-0d4c5fb027cf
parameter
string required

The parameter type

Enumeration:
COLOUR
FONT
type
string required

The attribute type

Enumeration:
BACKGROUND

the background colour.

TEXT

the text colour.

LABEL

the label colour.

value
string required

The attribute value

Example:
FA76VC1
barcode
Object
type
string required

The type of barcode to be displayed on the pass

Enumeration:
PDF_417
QR_CODE
NONE
AZTEC
CODE_128
content
string lexicon required

The content to be stored as the barcode. Defaulted to contacts.id as lexicon

Enumeration:
contact.id
contact.loyalty_number
contact.code
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
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/mobile_passes/7fb8da7b-6a67-04d4-167b-a979c68e49e3 HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "7fb8da7b-6a67-04d4-167b-a979c68e49e3",
    "name": "My loyalty pass",
    "description": "This card is for reward purposes.",
    "state": "INACTIVE",
    "fields": [
        {
            "id": "26c8ad53-bb05-f62e-88c6-ff64face3087",
            "platform": "GOOGLE",
            "label": "Points",
            "location": "SECTION",
            "location_number": "1 , 2 , 3",
            "priority": "1 , 2 , 3",
            "property": "wallet.points , https://abc.com",
            "side": "FRONT",
            "property_value": "https//releaseportal.crm.com",
            "text_alignment": "LEFT",
            "type": "CALENDAR"
        }
    ],
    "attributes": [
        {
            "id": "d875bee3-0975-5301-ff56-0d4c5fb027cf",
            "parameter": "COLOUR",
            "type": "TEXT",
            "value": "FA76VC1"
        }
    ],
    "barcode": {
        "type": "AZTEC",
        "content": "contact.code"
    },
    "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"
                }
            ]
        }
    ]
}
Media Group
POST /mobile_pass_cards/{id}/media_groups
Mobile Pass Media Groups
POST /mobile_pass_cards/{id}/media_groups

Link a mobile pass with one or more media groups

Path variables

id
string GUID required

The mobile pass (identifier) that media groups will be set

Example:
3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb

Notes

MEDIA UPLOAD

Uploading media for a mobile pass card requires the execution of the following APIs

  1. Create new Media Group
  2. Create Mobile Passes 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/mobile_pass_cards/3f1f9e63-7f40-4e5e-bc42-11a162f7f1fb/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 
Partners

Partners (associates) can be defined at the Service Owner level and assigned to individual Businesses. As a result, the partner logo will appear at the bottom of the menu bar when a business user is logged-in.

POST /partners
PUT /partners/{id}
DELETE /partners/{id}
GET /partners
GET /partners/{id}
POST /partners/{id}/media_groups
Create Partner
POST /partners

Creates a new partner for the service owner

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

Partner name

Example:
Yellow Umbrella Corp.
contact_person
Object nullable

Contact person information

name
string nullable

Contact person name

Example:
John Smith
email
string nullable

Contact person email

Example:
john.smith@yellowumberlla.com
phone
string nullable

Contact person phone number

Example:
22499019
country_code
string nullable

Phone number country code

Example:
CYP
state
string nullable

The partner state

Enumeration:
ACTIVE
INACTIVE

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The unique partner identifier

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a
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/partners HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Yellow Umbrella Corp.",
    "contact_person": {
        "name": "John Smith",
        "email": "john.smith@yellowumberlla.com",
        "phone": "22499019",
        "country_code": "CYP"
    },
    "state": "INACTIVE"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "f68fad29-4a1b-3a1e-5cfa-6540a5b1609a"
}
Update Partner
PUT /partners/{id}

Update an existing partner

Path variables

id
string GUID required

The partner (identifier) that will be updated

Example:
f6913302-f341-6a8b-8b22-adc4e006e0a6

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 partner name

Example:
Yellow Umbrella Corp.
contact_person
Object nullable

Details about contact (person)

name
string nullable

The contact name

Example:
John Smith
email
string nullable

The contact email

Example:
john.smith@yellowumberlla.com
phone
string nullable

The contact phone number

Example:
22499346
country_code
string nullable

The contact phone country code

Example:
CYP
state
string nullable

The partner state

Enumeration:
ACTIVE
INACTIVE

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The partner identifier

Example:
f68fad29-4a1b-3a1e-5cfa-6540a5b1609a
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/partners/f6913302-f341-6a8b-8b22-adc4e006e0a6 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Yellow Umbrella Corp.",
    "contact_person": {
        "name": "John Smith",
        "email": "john.smith@yellowumberlla.com",
        "phone": "22499346",
        "country_code": "CYP"
    },
    "state": "ACTIVE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "f68fad29-4a1b-3a1e-5cfa-6540a5b1609a"
}
Delete Partner
DELETE /partners/{id}

Delete an existing partner

Path variables

id
string GUID required

The partner (identifier) that will be deleted

Example:
f6913302-f341-6a8b-8b22-adc4e006e0a6

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/partners/f6913302-f341-6a8b-8b22-adc4e006e0a6 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 204 No Content 
List Partners
GET /partners

Retrieve a list of partners based on search criteria (e.g. all inactive partners)

Request parameters

name
string optional

Filter based on partner name

Example:
Umbrella
state
string optional

Filter based on state

Enumeration:
ACTIVE
INACTIVE
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 partner identifier

Example:
30176eac-2ce3-0ea9-9418-7bd65aff8c56
name
string

The partner name

Example:
Yellow Umbrella Corp.
contact_person
Object

Details about contact (person)

name
string

The partner contact (person) name

Example:
John Smith
state
string

The partner state

Enumeration:
ACTIVE
INACTIVE
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/partners HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "30176eac-2ce3-0ea9-9418-7bd65aff8c56",
            "name": "Yellow Umbrella Corp.",
            "contact_person": {
                "name": "John Smith"
            },
            "state": "INACTIVE"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Partner
GET /partners/{id}

Retrieve detailed information for a partner

Path variables

id
string GUID required

The partner (identifier) that will be retrieved

Example:
4af1ee3a-a0f6-8a87-3d24-08a7d56c9ab9

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 partner identifier

Example:
30176eac-2ce3-0ea9-9418-7bd65aff8c56
name
string

The partner name

Example:
Yellow Umbrella Corp.
contact_person
Object

Details about contact (person)

name
string

The contact name

Example:
John Smith
email
string

The contact email

Example:
john.smith@yellowumbrella.com
phone
string

The contact phone

Example:
22480900
country_code
string

The contact phone country code

Example:
CYP
state
string

The partner state

Enumeration:
ACTIVE
INACTIVE
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/partners/4af1ee3a-a0f6-8a87-3d24-08a7d56c9ab9 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "30176eac-2ce3-0ea9-9418-7bd65aff8c56",
    "name": "Yellow Umbrella Corp.",
    "contact_person": {
        "name": "John Smith",
        "email": "john.smith@yellowumbrella.com",
        "phone": "22480900",
        "country_code": "CYP"
    },
    "state": "ACTIVE"
}
Partners Media Groups
POST /partners/{id}/media_groups

Link a partner with one or more media groups

Path variables

id
string GUID required

The partner (identifier) that media groups will be set

Example:
sdfsfsdf-32-fwef-wef-wefwef23

Notes

MEDIA UPLOAD

Uploading media for an partner requires the execution of the following APIs

  1. Create new Media Group
  2. Create Partner 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/partners/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 
Service Owner Details

Service Owner details provide details about the service owner branding for the entire back-office experience

PUT /service_owner
GET /service_owner
Update Service Owner Details
PUT /service_owner

Update the service owner details

Notes

PRIVACY & TERMS - SaaS PRICING & BILLING

Privacy Policy and Terms & Conditions agreements are both legally binding contracts to protect your clients and your company (respectively).

SaaS Pricing & Billing details define the pricing strategy of your operations and the organisation that will handle the billing of any business that agrees and signs up to one of the available price plans.

Can be configured only on the Service Owner level and will be applied throughout their 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

Object
terms_service
string nullable

The terms of service URL

Default:
https://www.crm.com/terms-and-conditions/
Example:
https://www.crm.com/terms-and-conditions/
privacy_policy
string nullable

The privacy policy URL

Default:
https://www.crm.com/privacy-policy/
Example:
https://www.crm.com/privacy-policy/
pricing_policy
string nullable

The pricing policy URL

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
7cc1b26a-459f-4b47-a09f-6b121ae947da
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/service_owner HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "terms_service": "https://www.crm.com/terms-and-conditions/",
    "privacy_policy": "https://www.crm.com/privacy-policy/",
    "pricing_policy": "http://crm.com",
    "default_service_id": "fc03cae7-3b78-6f08-64a9-209730a85475",
    "billing_business_id": "d215502e-581b-20ae-26bc-c15aa3a9ef82"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "7cc1b26a-459f-4b47-a09f-6b121ae947da"
}
Get Service Owner Details
GET /service_owner

Returns the service owner details

Notes

PRIVACY & TERMS - SaaS PRICING & BILLING

Privacy Policy and Terms & Conditions agreements are both legally binding contracts to protect your clients and your company (respectively).

SaaS Pricing & Billing details define the pricing strategy of your operations and the organisation that will handle the billing of any business that agrees and signs up to one of the available price plans.

Can be configured only on the Service Owner level and will be applied throughout their business network.

Request parameters

cloud_name
string required

The service owner cloud name

Example:
superpos

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
api_key
string optional

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Responses

200 OK

The request has succeeded

Body
Object
public_key
string

The default (live) public key of the service owner

Example:
sdf3ref32rwerf324r134rw23rfd32r23r23r32r
organisation
Object

Details about service owner organisation

id
string GUID

The organisation identifier

Example:
a47fb812-9d74-392c-ee52-443cc940e014
name
string

The organisation name

Example:
CRM.COM
cloud_name
string

The organisation cloud name

Example:
crmdotcom
terms_service
string

The terms of service URL

Example:
https://www.crm.com/terms-and-conditions/
privacy_policy
string

The privacy policy URL

Example:
https://www.crm.com/privacy-policy/
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
billing_business_id
string

The billing business that will house all contacts and subscriptions that sign up via self sign up.

default_service_id
string

The default service applied to each new contact that signs up and is added as a contact to the billing business.

id
string
pricing_policy
string
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/service_owner?cloud_name=crmdotcom HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "public_key": "sdf3ref32rwerf324r134rw23rfd32r23r23r32r",
    "organisation": {
        "id": "a47fb812-9d74-392c-ee52-443cc940e014",
        "name": "CRM.COM",
        "cloud_name": "crmdotcom"
    },
    "terms_service": "https://www.crm.com/terms-and-conditions/",
    "privacy_policy": "https://www.crm.com/privacy-policy/",
    "creatives": [
        {
            "id": "CA123456789AQWSXZAQWS1236547896541",
            "usage_type": "PROFILEIMAGE",
            "width": 2159,
            "height": 3075,
            "format": "jpg",
            "url": "https://assets.crm.com/image/logo.jpg",
            "public_id": "crm-com/image",
            "media": [
                {
                    "width": 200,
                    "height": 300,
                    "url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
                }
            ]
        }
    ]
}
Tags

Tags are unique identifiers that allow users to label records of an entity. This is to help simplify sorting and accessing records. Users can create and access tags for any of their records— Leads, Contacts, Service Requests etc.

POST /tags
PUT /tags/{id}
DELETE /tags/{id}
GET /tags
GET /tags/{id}
Create Tag
POST /tags

Create a new tag

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 tag name

Example:
Maintenance
description
string required

The tag description

Example:
This tag relates to maintenance issues
entity
string required

The entity that the tag will be associated to

Enumeration:
ACTIVITIES
CONTACTS
LEADS
PRODUCTS
SERVICE_REQUESTS
ORGANISATIONS
colour
string nullable

The tag color (hex code) that will be used for visual purposes

Example:
75FG77
state
string nullable

The tag state

Enumeration:
ACTIVE
INACTIVE

Responses

201 Created

The request has succeded

Body
Object
id
string GUID

The tag identifier

Example:
ec9603d6-dbc3-10ff-a28f-99e855e79f57
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/tags HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Maintenance",
    "description": "This tag relates to maintenance issues",
    "entity": "CONTACTS",
    "colour": "75FG77"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "ec9603d6-dbc3-10ff-a28f-99e855e79f57"
}
Update Tag
PUT /tags/{id}

Update an existing tag

Path variables

id
string GUID required

The tag (identifier) that will be updated

Example:
fd566027-3bb0-46ab-2b34-974b026c545a

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 tag name

Example:
Maintenance
description
string nullable

The tag description

Example:
This tag depicts that some form of maintenance is required
colour
string nullable

The tag color (hex code) that will be used for visual purposes

Example:
#0000FF
state
string nullable

The tag state

Enumeration:
ACTIVE
INACTIVE

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The tag identifier

Example:
fd566027-3bb0-46ab-2b34-974b026c545a
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/tags/fd566027-3bb0-46ab-2b34-974b026c545a HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Maintenance",
    "description": "This tag depicts that some form of maintenance is required",
    "colour": "#0000FF",
    "state": "INACTIVE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "fd566027-3bb0-46ab-2b34-974b026c545a"
}
Delete Tag
DELETE /tags/{id}

Delete an existing tags

Path variables

id
string GUID required

The tag (identifier) that will be deleted

Example:
de89f95d-fd57-3bd5-e460-2545ea0622c1

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/tags/de89f95d-fd57-3bd5-e460-2545ea0622c1 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 204 No Content 
List Tags
GET /tags

Retrieve a list of tags based on search criteria (e.g. all contact tags)

Request parameters

entity
string optional

Filter based on entity

Enumeration:
ACTIVITIES
CONTACTS
LEADS
PRODUCTS
SERVICE_REQUESTS
ORGANISATIONS
state
string optional

Filter based on state

Enumeration:
ACTIVE
INACTIVE
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 required

The public api key required for API calls to identify the organisation

Example:
8c54d563-b991-4b76-8a83-557c08166f95

Responses

200 OK

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The tag identifier

Example:
05ac88a3-f448-8e96-f68f-26948529588e
name
string

The tag name

Example:
Maintenance
description
string

The tag description

Example:
Maintenance activity in progress
entity
string

The entity that the tag will be associated to

Enumeration:
ACTIVITIES
CONTACTS
LEADS
PRODUCTS
SERVICE_REQUESTS
ORGANISATIONS
state
string

The tag state

Enumeration:
ACTIVE
INACTIVE
colour
string

The tag color (hex code) that will be used for visual purposes

Example:
#0000FF
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/tags HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "05ac88a3-f448-8e96-f68f-26948529588e",
            "name": "Maintenance",
            "description": "Maintenance activity in progress",
            "entity": "SERVICE_REQUESTS",
            "state": "ACTIVE",
            "colour": "#0000FF"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Tag
GET /tags/{id}

Retrieve detailed information for a tag

Path variables

id
string GUID required

The tag (identifier) that will be retrived

Example:
93d52b5f-3df1-8b4b-ebac-ff1e0ee43fb1

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 tag identifier

Example:
93d52b5f-3df1-8b4b-ebac-ff1e0ee43fb1
name
string

The tag name

Example:
Maintenance
description
string

The tag description

Example:
Maintenance issues
entity
string

The entity that the tag will be associated to

Enumeration:
ACTIVITIES
CONTACTS
LEADS
PRODUCTS
SERVICE_REQUESTS
ORGANISATIONS
state
string

The tag state

Enumeration:
ACTIVE
INACTIVE
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/tags/93d52b5f-3df1-8b4b-ebac-ff1e0ee43fb1 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "93d52b5f-3df1-8b4b-ebac-ff1e0ee43fb1",
    "name": "Maintenance",
    "description": "Maintenance issues",
    "entity": "ACTIVITIES",
    "state": "ACTIVE",
    "colour": "#0000FF"
}
Time Travel

Time Travel is a simulation feature which imitates the key behavior and characteristics of rewards, billing & subscription configurations. It is a virtual time travelling utility tool which is available only on test environment and facilitates the ability to go back in time and test features, such as settlement, subscription invoicing and states scheduling on a specific time frame.

Upon launching the time travel, all contact and organisation related data (e.g. subscriptions, orders, rewards, financial transactions & customer events) will be staged and new one should be created with a limit of up to five (5) contacts and five (5) organisations (parent organisations). When exiting the time travel, all contacts & organisation and their related records (e.g. financial transactions) will be deleted.

PUT /time_travel/actions
GET /time_travel
Perform Time Travel Actions
PUT /time_travel/actions

Perform actions on the time travel utility tool (e.g. take the system back in time)

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 action to be performed

Enumeration:
START_AFRESH

Start the time travel utility tool by goind back to the origin time

TERMINATE

Terminate the time travel utility tool and return to the current time

TRAVEL_FORWARD

Travel forward in time and simulate system’s behavior

origin_time
integer epoch required nullable

The start time of the time travel utility tool (applicable and required when action is START_AFRESH)

Example:
1643629992
destination_time
integer epoch required nullable

The destination time to which the time travel utility tool is travelling forward. Should be between the “current” destination time and present time (applicable and required when action is TRAVEL_FORWARD)

Example:
1643630252

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
Example 2
Example 3

Start (Restart) the time travel utility tool by goind back to the origin time

PUT https://sandbox.crm.com/backoffice/v2/time_travel/actions HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "action": "START_AFRESH",
    "origin_time": 1643629992
}

HTTP/1.1 204 No Content

Travel forward in time and simulate system’s behavior

PUT https://sandbox.crm.com/backoffice/v2/time_travel/actions HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "action": "TRAVEL_FORWARD",
    "destination_time": 1643630252
}

HTTP/1.1 204 No Content

Terminate the time machine feature and return to the current time

PUT https://sandbox.crm.com/backoffice/v2/time_travel/actions HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "action": "TERMINATE"
}

HTTP/1.1 204 No Content
Get Time Travel
GET /time_travel

Get details of a specific time travel

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
origin_time
integer epoch

The start time of the time travel utility tool

Example:
1643629992
destination_time
integer epoch

The destination time to which the time travel utility tool is travelling forward. Should be between the “current” destination time and present time

Example:
1643630252
is_enabled
boolean

Defines whether time travel is enabled or not

Example:
true
status
string

The current status of time travel utility tool

Enumeration:
IN_PROGRESS

Time travel is in progress

SUCCESS

Time travel has succeeded

FAILURE

Time travel has failed

failure_reason
string

Details about why the time travel utility tool failed

Example:
Incorrect details
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/time_travel HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "origin_time": 1643629992,
    "destination_time": 1643630252,
    "is_enabled": "true",
    "status": "FAILURE",
    "failure_reason": "Incorrect details"
}
Webhooks

Webhooks are event notification methods where an application (or a system) is provided with real time information for a CRM.COM entity without requiring additional integration. Once a webhook for an event is created via automation, CRM.COM will automatically start sending webhook requests to that webhook endpoint every time the automation is triggered, with the necessary details relating to that event.

POST /webhooks
PUT /webhooks/{id}
DELETE /webhooks/{id}
GET /webhooks
GET /webhooks/{id}
GET /webhooks/requests
PUT /webhooks/requests/actions
Create Webhook
POST /webhooks

Create a new webhook

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
name
string required

The webhook name

Example:
CRMdotCOM Delivery
method
string required

The webhook method type

Enumeration:
POST
PUT
url_endpoint
string required

The webhook url endpoint

Example:
https://crm.com/delivery
authentication
Object required

Details about webhook authentication

type
string required

Defines how the webhook will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
Default:
NO_AUTH
username
string nullable

The username that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
johndoe
password
string nullable

The password that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
crm.com
api_key
string nullable

The api key that will auth the webhook requests (applicable if url_auth = API_KEY)

Example:
qwert-12345-qwewerwer-123234234-werwerwr
retries
Object nullable

Details about webhook retries

count
integer required

The total number of retries

Example:
2
after
integer required

The wait period between retries (in seconds)

Example:
4

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The webhook identifier

Example:
9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5
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/webhooks HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "CRMdotCOM Delivery",
    "method": "PUT",
    "url_endpoint": "https://crm.com/delivery",
    "authentication": {
        "type": "NO_AUTH"
    },
    "retries": {
        "count": 2,
        "after": 4
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5"
}
Update Webhook
PUT /webhooks/{id}

Update an existing webhook

Path variables

id
string GUID required

The webhook (identifier) that will be updated

Example:
9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
name
string nullable

The webhook name

Example:
CRMdotCOM Delivery
url_endpoint
string nullable

The webhook url endpoint

Example:
https://crm.com/delivery
authentication
Object nullable

Details about webhook authentication

type
string required

Defines how the webhook will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
Default:
NO_AUTH
username
string nullable

The username that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
johndoe
password
string nullable

The password that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
crm.com
api_key
string nullable

The api key that will auth the webhook requests (applicable if url_auth = API_KEY)

Example:
qwert-12345-qwewerwer-123234234-werwerwr
retries
Object nullable

Details about webhook retries

count
integer required

The total number of retries

Example:
2
after
integer required

The wait period between retries (in seconds)

Example:
4

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The webhook identifier

Example:
9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5
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/webhooks/9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "CRMdotCOM Delivery",
    "url_endpoint": "https://crm.com/delivery",
    "authentication": {
        "type": "NO_AUTH"
    },
    "retries": {
        "count": 2,
        "after": 4
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5"
}
Delete Webhook
DELETE /webhooks/{id}

Delete an existing webhook

Path variables

id
string GUID required

The webhook (identifier) that will be deleted

Example:
9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5

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

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/webhooks/9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5 HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 204 No Content 
List Webhooks
GET /webhooks

Retrieve a list of webhooks based on search criteria (e.g. all webhooks with failed requests)

Request parameters

search_value
string optional

Filter based on search value (case insensitive) across webhook name and url endpoint

Example:
https://crm.com/delivery
name
string optional

Filter based on the name

Example:
CRMdotCOM Delivery
url_endpoint
string optional

Filter based on the url endpoint

Example:
https://crm.com/delivery
automation_entity
string optional

Filter based on related automation entity

Example:
ORDERS
automation_event
string optional

Filter based on related automation event

Example:
NEW_PURCHASE
has_failed_requests
boolean optional

Filter based on whether webhook has at least one failed request

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 200

The request has succeeded

Body
Object
content
Array
Object
id
string GUID

The webhook identifier

Example:
9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5
name
string

The webhook name

Example:
Registration Name
method
string

The webhook method type

Enumeration:
POST
PUT
url_endpoint
string

The webhook url endpoint

Example:
https;//crm.com/delivery
authentication
Object

Details about webhook authentication

type
string

Defines how the webhook will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
Default:
NO_AUTH
retries
Object

Details about webhook retries

count
integer

The total number of retries

Example:
2
after
integer

The wait period between retries (in seconds)

Example:
4
request_metrics
Object

Details (overall metrics) about webhook requests

pending
integer

The number of pending requests

Example:
3
successful
integer

The number of successful requests

Example:
2
failed
integer

The number of failed requests

Example:
1
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 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/webhooks HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5",
            "name": "Registration Name",
            "method": "PUT",
            "url_endpoint": "https;//crm.com/delivery",
            "authentication": {
                "type": "NO_AUTH"
            },
            "retries": {
                "count": 2,
                "after": 4
            },
            "request_metrics": {
                "pending": 3,
                "successful": 2,
                "failed": 1
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Webhook
GET /webhooks/{id}

Retrieve detailed information for a webhook

Path variables

id
string GUID required

The webhooks (identifier) that will be retrieved

Example:
9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5

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 webhook identifier

Example:
99f19d3b-9542-5927-85ff-bd3b272c68e5
name
string

The webhook name

Example:
push webhook to external system
method
string

The webhook method type

Enumeration:
POST
PUT
url_endpoint
string

The webhook url endpoint

Example:
crm.com
authentication
Object

Details about webhook authentication

type
string

Defines how the webhook will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
Default:
NO_AUTH
username
string

The username that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
johndoe
password
string

The password that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)

Example:
crm.com
api_key
string

The api key that will auth the webhook requests (applicable if url_auth = API_KEY)

Example:
qwert-12345-qwewerwer-123234234-werwerwr
retries
Object

Details about webhook retries

count
integer

The total number of retries

Example:
2
after
integer

The wait period between retries (in seconds)

Example:
4
request_metrics
Object

Details (overall metrics) about webhook requests

pending
integer

The number of pending requests

Example:
3
successful
integer

The number of successful requests

Example:
2
failed
integer

The number of failed requests

Example:
1
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/webhooks/9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "99f19d3b-9542-5927-85ff-bd3b272c68e5",
    "name": "push webhook to external system",
    "method": "POST",
    "url_endpoint": "crm.com",
    "authentication": {
        "type": "API_KEY",
        "api_key": "qwert-12345-qwewerwer-123234234-werwerwr"
    },
    "retries": {
        "count": 2,
        "after": 4
    },
    "request_metrics": {
        "pending": 3,
        "successful": 2,
        "failed": 1
    }
}
List Webhook Requests
GET /webhooks/requests

Retrieve a list of webhook requests based on search criteria (e.g. all failied webhook requests)

Request parameters

search_value
string optional

Filter based on search value (case insensitive) across webhook name and url endpoint

Example:
https://crm.com/delivery
webhooks
array of string optional

Filter based on webhook (identifier)

Collection format: csv
Unique items: YES
url_endpoint
string optional

Filter based on url endpoint

Example:
https://crm.com/delivery
state
string optional

Filter based on request state

Enumeration:
PENDING
SUCCESS
FAILED
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 webhook request identifier

Example:
9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5
state
string

The state of the webhook request

Enumeration:
PENDING
SUCCESS
FAILED
retries
integer

The total number of request retries

Example:
3
date
integer epoch

The date that webhook request was made

Example:
1596093272
request
Object

Details about webhook request attributes

url_endpoint
string

The url endpoint

Example:
https;//crm.com/delivery
auth
string

Defines how the webhook will be protected

Enumeration:
NO_AUTH
USERNAME_PASSWORD
API_KEY
Default:
NO_AUTH
body
string

The request body that was sent

Example:
POST /crm.com/delivery HTTP/1.1 Host: staging.crm.com Content-Type: application/json api_key: 123456789012-1234-1234-1234-123456789012 Content-Type: text/plain { "contact_id": "123456789012-ABCD-ABCD-ABCD-123456789012", "amount": 20.45 }
response
string

The response that was received

Example:
{ "status": { "code": "COM.CRM.EXCEPTION.INVALIDTOKENEXCEPTION", "description": "The specific token is not valid.", "message": "The token is invalid, please obtain a new one." } }
webhook
Object

Details about webhook

id
string GUID

The webhook identifier

Example:
c0a3953b-237a-52da-aa5d-74408f21b12d
name
string

The webhook name

Example:
CRMdotCOM Delivery
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
entity
Object

Details about related entity that request is created for

type
string

The entity type that the webhook request is created for

Examples:
CONTACTORDERREWARDOFFER
reference
string

The entity’s reference name/code/number

Example:
ORD1234ER
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/webhook_requests HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "9152cc24-f41d-2890-bbb5-fcb1c2cf5bd5",
            "state": "SUCCESS",
            "retries": 3,
            "date": 1596093272,
            "request": {
                "url_endpoint": "https;//crm.com/delivery",
                "auth": "NO_AUTH",
                "body": "POST /crm.com/delivery HTTP/1.1 Host: staging.crm.com Content-Type: application/json api_key: 123456789012-1234-1234-1234-123456789012 Content-Type: text/plain  {     \"contact_id\": \"123456789012-ABCD-ABCD-ABCD-123456789012\",     \"amount\": 20.45 }",
                "response": "{     \"status\": {         \"code\": \"COM.CRM.EXCEPTION.INVALIDTOKENEXCEPTION\",         \"description\": \"The specific token is not valid.\",         \"message\": \"The token is invalid, please obtain a new one.\"     } }"
            },
            "webhook": {
                "id": "c0a3953b-237a-52da-aa5d-74408f21b12d",
                "name": "CRMdotCOM Delivery"
            },
            "automation": {
                "id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
                "name": "Request approval on newly activated offers"
            },
            "entity": {
                "type": "CONTACT",
                "reference": "ORD1234ER"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Webhook Requests Actions
PUT /webhooks/requests/actions

Perform actions on existing webhook requests (e.g. resend a number of failed requests)

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

The action that will be applied

Enumeration:
RESEND

Resend failed webhook requests

requests
Array required nullable

Defines a list all failed webhook requests that should be resend (applicable for resend action)

string GUID
Example:
9e840572-9eca-be97-113f-a3428770bc31

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
PUT https://sandbox.crm.com/backoffice/v2/webhooks/requests/actions HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "action": "RESEND",
    "requests": [
        {
            "id": "9e840572-9eca-be97-113f-a3428770bc31"
        }
    ]
}

HTTP/1.1 204 No Content 
Product Catalogue
GET /products/settings
PUT /products/settings
Get Product Settings
GET /products/settings

Get the generic product settings

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

Successful Request

Body
Object
name_settings
Object

The product name settings

allow_duplicate_names
boolean

Defines whether products with duplicated names can be supported or not

Example:
true
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/products/settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name_settings": {
        "allow_duplicate_names": "true"
    }
}
Set Product Settings
PUT /products/settings

Update the generic product settings

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_settings
Object

The product name settings

allow_duplicate_names
boolean

Defines whether products with duplicated names can be supported or not

Default:
false
Example:
true

Responses

200 OK

Successful Request

Body
Object
id
string

Unique idetifier of product settings

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/settings HTTP/1.1 

Content-Type: application/json

{
    "name_settings": {
        "allow_duplicate_names": "true"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Component Sets

Use Component Sets to group together various products of different types, brands, families etc. Component sets are avaiable duing the Ordering process so contacts can select ne or more products within the same set.

POST /component_sets
GET /component_sets/
GET /component_sets/{id}
PUT /component_sets/{id}
DELETE /component_sets/{id}
Create Component Set
POST /component_sets

Create a component set consisting of products

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 component set unique name

Example:
Milk & Alternatives
display_name
string required

The component set display name

Example:
Milks
descripion
string nullable

The component set description

Example:
Milk and dairy substitute options
products
Array required

List of products in the component set

Min items: 1
Unique items: YES
Object
id
string GUID required

Product unique id

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392
order
integer

The order of the product within the component set

Example:
3

Responses

201 Created
Body
Object
id
string

The unique id of the component set created

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392
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/component_sets HTTP/1.1 

Content-Type: application/json

{
    "name": "Milk & Alternatives",
    "display_name": "Milks",
    "descripion": "Milk and dairy substitute options",
    "products": [
        {
            "id": "a2b88272-c9e4-418d-83d3-8e7561b4e392",
            "order": 3
        }
    ]
}
List Component Sets
GET /component_sets/

Retrieve a list of available component sets

Request parameters

search_value
string optional

Search for component set based on name, display name and description

Example:
Blends
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
id
string GUID

The component set unique identifier

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392
name
string

The component set name

Example:
Sugar Options
display_name
string

The component set dislay_name

Example:
milks001
description
string

The component set description

Example:
Sugar & alternative options
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/component_sets/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "a2b88272-c9e4-418d-83d3-8e7561b4e392",
            "name": "Sugar Options",
            "display_name": "milks001",
            "description": "Sugar & alternative options"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Component Set
GET /component_sets/{id}

Retrieve details of a single component set along with the products it contains

Path variables

id
string GUID required

The component set unique identifier to be retrieved

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392

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 component set unique identifier

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392
name
string

The component set name

Example:
Blends for Cappuccino
display_name
string

The component set display name

Example:
Blends
description
string

The component set description

Example:
Coffee Blends
products
Array

Array of products belonging to the component set

Object
id
string GUID

Product unique id

Example:
3d935540-6d17-432a-9d37-3895eb46b6bf
sku
string

Product sku

Example:
BLENDS-1908
name
string

Product name

Example:
Single Origin
order
integer

The order of the product within the component set

Example:
1
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/component_sets/a2b88272-c9e4-418d-83d3-8e7561b4e392 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a2b88272-c9e4-418d-83d3-8e7561b4e392",
    "name": "Blends for Cappuccino",
    "display_name": "Blends",
    "description": "Coffee Blends",
    "products": [
        {
            "id": "3d935540-6d17-432a-9d37-3895eb46b6bf",
            "sku": "BLENDS-1908",
            "name": "Single Origin",
            "order": 1
        }
    ]
}
Update Component Set
PUT /component_sets/{id}

Update a component set

Path variables

id
string GUID required

The component set identifier that will be updated

Example:
283ec6c8-db3d-07e2-be54-6e4baeca6196

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 component set unique name

Example:
Milk & Alternatives
display_name
string

The component set display name

Example:
milks001
descripion
string

The component set description

Example:
Milk & alternative dairy options
products
Array required

Lis to fProducts included in the Component set

Min items: 1
Unique items: YES
Object
id
string GUID

The unique id of the product

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392
order
integer

The order of the product within the component set

Example:
3

Responses

200 OK
Body
Object
id
string GUID

The component set identifier

Example:
283ec6c8-db3d-07e2-be54-6e4baeca6196
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/component_sets/283ec6c8-db3d-07e2-be54-6e4baeca6196 HTTP/1.1 

Content-Type: application/json

{
    "name": "Milk & Alternatives",
    "display_name": "milks001",
    "descripion": "Milk & alternative dairy options",
    "products": [
        {
            "id": "a2b88272-c9e4-418d-83d3-8e7561b4e392",
            "order": 3
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "283ec6c8-db3d-07e2-be54-6e4baeca6196"
}
Delete Component Set
DELETE /component_sets/{id}

Delete an existing component set

Path variables

id
string GUID required

The component set identifier to be deleted

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392

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/component_sets/a2b88272-c9e4-418d-83d3-8e7561b4e392 HTTP/1.1 

HTTP/1.1 204 No Content 
Dependencies

Dependencies between products can be used in Subscriptions to indicate which service(s) or traceable physical good(s) are required in order for another service to be delivered to the contact properly. For example, a service requires a device to be activated.

POST /products/dependency_rules
GET /products/dependency_rules
GET /products/dependency_rules/{id}
PUT /products/dependency_rules/{id}
DELETE /dependency_rules/{id}
Create Dependency Rule
POST /products/dependency_rules

Creates a new product dependency rule. A Dependency rule is set up for a product or a product type. Multiple rules can be set up per product/product type, as long as they have a unique configuration.

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

Unique name for the Dependency rule.

Example:
PVR required services
description
string

Dependency rule description

Example:
TV Service requiring a decoder
item_type
string required

Specific product or all products of a specific type have a dependency on other product(s)

Enumeration:
PRODUCT
TYPE
Default:
PRODUCT
Example:
PRODUCT
item_id
string required

The unique identifier of the product or the product type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
type
string required

Dependency rule type. A product requires another product or cannot coexist (on the same subscription) with another product

Enumeration:
REQUIRES

Required services/physical goods must exist on the subscription to deliver the rule’s service

CANNOT_COEXIST

Service cannot co-exist on a subscription with the specified services/physical goods

Default:
REQUIRES
Example:
REQUIRES
operator
string required

Defines if the specified item has a dependency to all (all must exist on a subscription) or at least one of the product dependencies

Enumeration:
ALL

All specified products must (or cannot) exist on the subscription

ANY

At least one of the specified products must exist

Default:
ALL
Example:
ANY
dependencies
Array required

List of Product or Product types to which the specified item has a dependency to

Min items: 1
Unique items: YES
Object
item_type
string required

Dependency on a product or products of a specific type

Enumeration:
PRODUCT
TYPE
Default:
PRODUCT
Example:
PRODUCT
item_id
string required

Unique identifier of the product or product type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

201 Created
Body
Object
id
string

The unique identifier of the product dependency rule

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/dependency_rules HTTP/1.1 

Content-Type: application/json

{
    "name": "PVR required services",
    "description": "TV Service requiring a decoder",
    "item_type": "PRODUCT",
    "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "type": "REQUIRES",
    "operator": "ANY",
    "dependencies": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Dependency Rules
GET /products/dependency_rules

Returns a list of all product dependency rules

Request parameters

search_value
string optional

Search by name of the rule or name of product or product type name

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
id
string

Dependency rule unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

Dependency rule name

Example:
PVR requirements
description
string

Dependency rule description

Example:
PVR Services required services
operator
string

Indicates whether the ule is applied when all or at elast one of the product condtions are met

Enumeration:
ALL

All product conditions mus tbe met

ANY

At least one of the product conditions must be met

type
string

Type of dependency

Enumeration:
REQUIRES

Product requires another product

CANNOT_COEXIST

Prouct cannot coexist with another one.

Example:
REQUIRES
item_type
string

Dependency set up for a Product or a Product Type

Enumeration:
PRODUCT
TYPE
Example:
TYPE
item_name
string

The name of the product or the product type for which the dependency rule is set up

Example:
TV Services
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/products/dependency_rules HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "PVR requirements",
            "description": "PVR Services required services",
            "operator": "ANY",
            "type": "REQUIRES",
            "item_type": "TYPE",
            "item_name": "TV Services"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Dependency Rule
GET /products/dependency_rules/{id}

Returns a single product dependency rule

Path variables

id
string required

Dependency rule identifier

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 OK
Body
Object
name
string

Dependency rule name

Example:
PVR requirements
description
string

Dependency rule description

Example:
TV service requirung HD Decoder
item_type
string

Dependency of a Product or product of a specific Type.

Enumeration:
PRODUCT
TYPE
Example:
PRODUCT
item_id
string

Unique identifier of the Product or Product Type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
item_name
string

Product or Product Type name

Example:
TV Services
type
string

Dependency type

Enumeration:
REQUIRES
CANNOT_COEXIST
Example:
REQUIRES
operator
string

Indicates if the item specified has a dependency on at least one or all of the specified dependencies

Enumeration:
ANY
ALL
Example:
ANY
dependencies
Array

List of products or products types on which the item has a dependecy to

Object
item_type
string

Dependency on another product or products of a specfic type

Enumeration:
PRODUCT
TYPE
Example:
PRODUCT
item_id
string

Unique identifier of the Product or Product Type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
item_name
string

Product or Product Type name

Example:
HD Decoder
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/products/dependency_rules/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "PVR requirements",
    "description": "TV service requirung HD Decoder",
    "item_type": "PRODUCT",
    "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "item_name": "TV Services",
    "type": "REQUIRES",
    "operator": "ANY",
    "dependencies": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "item_name": "HD Decoder"
        }
    ]
}
Update Dependency Rule
PUT /products/dependency_rules/{id}

Updates an existing product dependency rule

Path variables

id
string required

Dependency rule identifier

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

Request body

Object
name
string

Depedency rule name that has to be unique across all rules

Example:
PVR requirements
description
string

Dependency rule description

Example:
PVR Service requiring a decoder
item_type
string required

Specific product or all products of a specific type have a dependency on other product(s)

Enumeration:
PRODUCT
TYPE
Example:
PRODUCT
item_id
string

The unique identifier of the product or the product type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
type
string
Enumeration:
REQUIRES
CANNOT_COEXIST
Example:
REQUIRES
operator
string

Dependency rule type. A product requires another product or cannot coexist (on the same subscription) with another product

Enumeration:
ALL
ANY
Example:
ALL
dependencies
Array required

Defines if the specified item has a dependnecy to all or at least one of the product dependencies

Min items: 1
Unique items: YES
Object
item_type
string

Dependency on a product or products of a specific type

Enumeration:
PRODUCT
TYPE
Example:
TYPE
item_id
string

Unique identifier of the product or product type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
id
string

The unique identifier of the product dependency rule

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/dependency_rules/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "name": "PVR requirements",
    "description": "PVR Service requiring a decoder",
    "item_type": "PRODUCT",
    "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "type": "REQUIRES",
    "operator": "ALL",
    "dependencies": [
        {
            "item_type": "TYPE",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Dependency Rule
DELETE /dependency_rules/{id}

Deletes a product dependency rule

Path variables

id
string required

Dependency rule identifier

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

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/dependency_rules/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 204 No Content 
Product Brands

Classify Products based on their Brands. A product can be assigned a single Brand

POST /products/brands
GET /products/brands/
GET /products/brands/{id}
PUT /products/brands/{id}
DELETE /products/brands/{id}
Create Product Brand
POST /products/brands

Create a new product brand

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

Brand name. Has to be unique across brands

Example:
Orange
description
string

Brand description

Example:
Orange services

Responses

201 Created
Body
Object
id
string

The unique identifier of the newlly created product brand

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/brands HTTP/1.1 

Content-Type: application/json

{
    "name": "Orange",
    "description": "Orange services"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Product Brands
GET /products/brands/

List product brands

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 for a brand based on its name and description

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

Brand unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

Brand name

Example:
Orange
description
string

Brand decription

Example:
Orange services
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/products/brands/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Orange",
            "description": "Orange services"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Product Brand
GET /products/brands/{id}

Get a single product brand

Path variables

id
string required

Brand unique idnetifier

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 OK
Body
Object
id
string

Brand uniue identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

Brand name

Example:
Orange
description
string

Brand description

Example:
Orange software 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/v2/products/brands/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
    "name": "Orange",
    "description": "Orange software products"
}
Update Product Brand
PUT /products/brands/{id}

Update product brand

Path variables

id
string required

Brand uniue identifier

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

Request body

Object
name
string

Brand name

Example:
Orange
description
string

Brand description

Example:
Orange services

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated product brand

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
Example 1
PUT https://sandbox.crm.com/backoffice/v2/products/brands/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "name": "Orange",
    "description": "Orange services"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Product Brand
DELETE /products/brands/{id}

Delete a product brand

Path variables

id
string required

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/products/brands/{id} HTTP/1.1 

HTTP/1.1 204 No Content 
Product Categories

Categorise Products based on one or more Categories. Categories is a tree-structure entity.

POST /products/categories
GET /products/categories
PUT /products/categories/{id}
DELETE /products/categories/{id}
Create Product Category
POST /products/categories

Create a sngle Prodct category which can either be a parent node or a leaf node in a category’s tree structure.

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 product category name which is unique

Example:
Milk Options Cappuccino
display_name
string

The product category display name

Example:
Milk Options
code
string

The product category code

Example:
milks001
descripion
string

The product category decription

Example:
Milk Options for Cappuccino
parent_id
string

The product category parent id. Required for leaf nodes. If not specified then the category is a parent category.

Example:
345809f-ed91-erff-b912-5bd6064d901e
available_in_order_menus
boolean required

Define whether product category visible in front-end systems like mobile apps

Default:
false
Example:
false

Responses

201 Created
Body
Object
id
string

Product Category unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/categories HTTP/1.1 

Content-Type: application/json

{
    "name": "Milk Options Cappuccino",
    "display_name": "Milk Options",
    "code": "milks001",
    "descripion": "Milk Options for Cappuccino",
    "parent_id": "345809f-ed91-erff-b912-5bd6064d901e",
    "available_in_order_menus": "false"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Product Categories
GET /products/categories

Return a list of product categories

Request parameters

parent_id
string optional

If specified, then all categories under the parent node will be returned. If not specified, then all root nodes of the tree are returned.

return_all
boolean optional

Returns all categories of the tree if set to True, ignoring parent_id and include_chid_nodes parameters

Default:
false
search_value
string optional

Search for a category based on name, dislay name and description

available_in_order_menus
boolean optional

Filter product categories on whether to include in the order menu or not

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
Body
Object
content
Array
Object
id
string

The identifier of the product category

Example:
4fhht9f-ed91-erff-b912-5bd6064d901e
name
string

The product category name which is unique

Example:
Milk Options Cappuccino
display_name
string

The product category display name

Example:
Milk Options
code
string

The product category code

Example:
milks001
description
string

The product category decription

Example:
Milk Options for Cappuccino
child_nodes
integer

Number of child nodes of this category

Example:
2
parent
Object

The product category parent

id
string

The product category parent id

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

The product category parent name

Example:
Coffee Milk options
available_in_order_menus
boolean

Define whether product category visible in front-end systems like mob apps

Example:
false
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/products/categories HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4fhht9f-ed91-erff-b912-5bd6064d901e",
            "name": "Milk Options Cappuccino",
            "display_name": "Milk Options",
            "code": "milks001",
            "description": "Milk Options for Cappuccino",
            "child_nodes": 2,
            "parent": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Coffee Milk options"
            },
            "available_in_order_menus": "false"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Product Category
PUT /products/categories/{id}

Updates an existing product category.

Path variables

id
string required

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 product category name which is unique within a parent category’s path

Example:
Milk Options Cappuccino
display_name
string

The product category display name

Example:
Milk Options
code
string

The product category code

Example:
milks001
description
string

The product category decription

Example:
Milk Options for Cappuccino
parent_id
string

The product category parent id

Example:
345809f-ed91-erff-b912-5bd6064d901e
available_in_order_menus
boolean required

If set to True, the category is available when listing products in the Ordering flow

Default:
false
Example:
false
Examples

Responses

200 OK
Body
Object
id
string

Product category unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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
PUT https://sandbox.crm.com/backoffice/v2/products/categories/{id} HTTP/1.1 

Content-Type: application/json

{
    "name": "Milk Options Cappuccino",
    "display_name": "Milk Options",
    "code": "milks001",
    "description": "Milk Options for Cappuccino",
    "parent_id": "345809f-ed91-erff-b912-5bd6064d901e",
    "available_in_order_menus": "false"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Product Category
DELETE /products/categories/{id}

Delete a product category

Path variables

id
string required

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/products/categories/{id} HTTP/1.1 

HTTP/1.1 204 No Content 
Product Families

Group Products based on a family i.e. products that have a common set of characteristics. A prouct can have a single family

POST /products/families
GET /products/families/
GET /product_families/{id}
PUT /products/families/{id}
DELETE /products/families/{id}
Create Product Family
POST /products/families

Creates a new Product Family. A single Product Family can be created per Web API call.

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 product family name which is unique

Example:
Cold Drinks Delivery
display_name
string nullable

The product family dislay name

Example:
Cold Drinks
descripion
string nullable

The product family description

Example:
Cold Drinks for Delivery
accessibility
Object required

Defines which organisations can be access and use it

type
string required

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array nullable

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Unique items: YES
string GUID
Example:
341fc467-c925-2f70-da87-162c4947eb45

Responses

201 Created
Body
Object
id
string

The unique identifier of the new product family

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/families HTTP/1.1 

Content-Type: application/json

{
    "name": "Cold Drinks Delivery",
    "display_name": "Cold Drinks",
    "descripion": "Cold Drinks for Delivery",
    "accessibility": {
        "type": "BUSINESS",
        "organisations": [
            "CAD1E31269B76D7A65ACCE45B2E68DFD"
        ]
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
List Product Families
GET /products/families/

Returns a list of Product Families

Request parameters

search_value
string optional

Search for product family based on name, dislay name and description

Example:
Drinks
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
id
string GUID

The product family identifier

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392
name
string

The product family name

Example:
Cold Drinks Delivery
display_name
string

The product family display name

Example:
Cold Drinks
description
string

The product family description

Example:
Cold Drinks for Delivery
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/products/families/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "a2b88272-c9e4-418d-83d3-8e7561b4e392",
            "name": "Cold Drinks Delivery",
            "display_name": "Cold Drinks",
            "description": "Cold Drinks for Delivery"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Product Family
GET /product_families/{id}

Return a single product family

Path variables

id
string GUID required

The product family (identifier) that will be retrieved

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392

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 product family identifier

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392
name
string

The product family name

Example:
Cold Drinks Delivery
display_name
string

The product family display name

Example:
Cold Drinks
description
string

The product family description

Example:
Cold Drinks for Delivery
accessibility
Object

Defines how the segment can be accessed from business network

type
string

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Object
id
string GUID

The organisation identifier

Example:
feedcd4b-8470-04b3-73bf-9ce9a4340822
name
string

The organisation name

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/product_families/a2b88272-c9e4-418d-83d3-8e7561b4e392 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a2b88272-c9e4-418d-83d3-8e7561b4e392",
    "name": "Cold Drinks Delivery",
    "display_name": "Cold Drinks",
    "description": "Cold Drinks for Delivery",
    "accessibility": {
        "type": "ACROSS_NETWORK",
        "organisations": [
            {
                "id": "feedcd4b-8470-04b3-73bf-9ce9a4340822",
                "name": "CRM"
            }
        ]
    }
}
Update Product Family
PUT /products/families/{id}

Update a product family

Path variables

id
string GUID required

The product family (identifier) that will be updated

Example:
283ec6c8-db3d-07e2-be54-6e4baeca6196

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 product family name which is unique

Example:
Cold Drinks Delivery
display_name
string nullable

The product family display name

Example:
Cold Drinks
descripion
string nullable

The product family description

Example:
Cold Drinks for Delivery
accessibility
Object nullable

Defines which organisations can be access and use it

type
string required

Defines which organisations can access and use it

Enumeration:
BUSINESS
ACROSS_NETWORK
SPECIFIC_ORG
organisations
Array nullable

The organisations (Merchants, Service Providers) that can access and use it (applicable only if type = SPECIFIC)

Unique items: YES
string GUID
Example:
341fc467-c925-2f70-da87-162c4947eb45

Responses

200 OK
Body
Object
id
string GUID

The product family identifier

Example:
283ec6c8-db3d-07e2-be54-6e4baeca6196
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/products/families/283ec6c8-db3d-07e2-be54-6e4baeca6196 HTTP/1.1 

Content-Type: application/json

{
    "name": "Cold Drinks Delivery",
    "display_name": "Cold Drinks",
    "descripion": "Cold Drinks for Delivery",
    "accessibility": {
        "type": "ACROSS_NETWORK",
        "organisations": [
            "CAD1E31269B76D7A65ACCE45B2E68DFD"
        ]
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "283ec6c8-db3d-07e2-be54-6e4baeca6196"
}
Delete Product Family
DELETE /products/families/{id}

Delete an existing product family

Path variables

id
string GUID required

The product family (identifier) that will be deleted

Example:
a2b88272-c9e4-418d-83d3-8e7561b4e392

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/products/families/a2b88272-c9e4-418d-83d3-8e7561b4e392 HTTP/1.1 

HTTP/1.1 204 No Content 
Product Synchronisation

Product Synchronisation utility settings

GET /products/synchronisation_settings
PUT /product_synchronisation_settings
Get Product Synchronisation Settings
GET /products/synchronisation_settings

Retrieve the setting of the product synchronisation process

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
auto_generated_config
boolean

Defines whether synced product brands, families and categories will be automatically created into CRM (applicable only if such attributes do not exist)

Example:
true
append_categories
boolean

Defines whether existing product categories will be removed or not from the synced product. If attribute is false, then the existing categories will be removed and new ones will be set - otherwise, the existing ones will not be removed and new ones will be added as well

Example:
false
overwrite_name
boolean

Defines whether existing product name will be overwritten or not. If attribute is false, then the existing name will be replaced by the synced one - otherwise, the existing one will not be updated

Example:
false
product_brand
Object

The product brand that will be automatically set on a product (applicable only if the synced product does not have a brand attribute during synchronization)

id
string GUID

The brand identifier

Example:
82b3cb3e-9c43-0552-d322-a2f27d592e22
name
string

The brand name

Example:
CRM
product_family
Object

The product family that will be automatically set on a product (applicable only if the synced product does not have a family attribute during synchronization)

id
string GUID

The family identifier

Example:
82b3cb3e-9c43-0552-d322-a2f27d592e22
name
string

The family name

Example:
Software
product_category
Object

The product category that will be automatically set on a product (applicable only if the synced product does not have a category attribute during synchronization)

id
string GUID

The category identifier

Example:
82b3cb3e-9c43-0552-d322-a2f27d592e22
name
string

The category name

Example:
Rewards
product_type
Object

The product type that will be automatically set on a product (applicable only if the synced product does not have a type attribute during synchronization)

id
string GUID

The type identifier

Example:
82b3cb3e-9c43-0552-d322-a2f27d592e22
name
string

The type name

Example:
Cloud
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://stagingapi.crm.com/backoffice/v1/product_synchronisation_settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "auto_generated_config": true,
    "product_brand": {
        "id": "",
        "name": ""
    },
    "product_family": {
        "id": "",
        "name": ""
    },
    "product_category": {
        "id": "",
        "name": ""
    },
    "product_type": {
        "id": "",
        "name": ""
    }
}
Update Product Sychronisation Settings
PUT /product_synchronisation_settings

Update the settings of the product synchronisation process

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
product_brand_id
string GUID nullable

The product brand that will be automatically set on a product (applicable only if the synced product does not have a brand attribute during synchronization)

Example:
63be57cb-41e7-3562-f2ff-1c551d491a5b
product_family_id
string GUID nullable

The product family that will be automatically set on a product (applicable only if the synced product does not have a family attribute during synchronization)

Example:
63be57cb-41e7-3562-f2ff-1c551d491a5b
product_category_id
string GUID nullable

The product category that will be automatically set on a product (applicable only if the synced product does not have a category attribute during synchronization)

Example:
63be57cb-41e7-3562-f2ff-1c551d491a5b
product_type_id
string GUID nullable

The product type that will be automatically set on a product (applicable only if the synced product does not have a type attribute during synchronization)

Example:
63be57cb-41e7-3562-f2ff-1c551d491a5b
auto_generated_config
boolean nullable

Defines whether synced product brands, families and categories will be automatically created into CRM (applicable only if such attributes do not exist)

Default:
false
Example:
true
append_categories
boolean nullable

Defines whether existing product categories will be removed or not from the synced product. If attribute is false, then the existing categories will be removed and new ones will be set - otherwise, the existing ones will not be removed and new ones will be added as well

Default:
false
Example:
true
overwrite_name
boolean nullable

Defines whether existing product name will be overwritten or not. If attribute is false, then the existing name will be replaced by the synced one - otherwise, the existing one will not be updated

Default:
false
Example:
true

Responses

200 OK
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://stagingapi.crm.com/backoffice/v1/product_synchronisation_settings HTTP/1.1 

Content-Type: application/json

{
    "auto_generated_config": true,
    "product_brand_id": "",
    "product_family_id": "",
    "product_category_id": "",
    "product_type_id": ""
}
Product Types

Product Types are used to group together products based on their basic CRM.COM related charecteristic such as their classification and composition. A Product’s behaviour is based on its product’s characteristics.

POST /products/types
PUT /product_types/{id}
DELETE /products/types/{id}
GET /products/types/
GET /products/types/{id}
Create Product Type
POST /products/types

Create a new product type. A single Product Type can be created per Web API call

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 name of the product type which is unique

Example:
Decoders
display_name
string

The display name of the product type

Example:
Decoders
description
string

The description of the product type

Example:
Used to set up various Decoder products
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
composition_method
string
Enumeration:
FLAT
FIXED_BUNDLE
FLEXIBLE_BUNDLE
COMPOSITE
Example:
FLAT
is_stockable
boolean

Defines whether products of classification TRACEABLE_PHYSICAL_GOOD or NON_TRACEABLE_PHYSICAL_GOOD are stockable or not

Default:
false
Example:
true
is_modifier
boolean

Defines whether products of classification NON_TRACEABLE_PHYSICAL_GOOD are modifiers of products or not. Only Flat products can be classified as modifiers

Default:
false
Example:
false
negative_balance_allowed
boolean

Defines whether it is allowed for a stockable product’s stock balance to go below zero

Default:
false
Example:
false
is_provisionable
boolean required nullable

Defines whether product of this type are provisionable or not. Applicable for classifications: TRACEABLE_PHYSICAL_GOOD (flat and fixed bundle), TERMED_SERVICE (flat and fixed bundle) and ONE_TIME_SERVICE (flat)

Default:
false
Example:
false
characteristics
Array

List of attributes that can be set on the product. The list includes just the attributes, their values are set on creating the product.

Unique items: YES
Object
id
string required

Unique identifier of the characteristic

Example:
2c0809f-ed91-4b68-b912-5bd6064d901e
mandatory
boolean

Defines whether this attribute will be mandatory to be specified and have a value when creating a new product. Defaults to False

Default:
false
Example:
true
values
Array of string

List of values that will be available for selection when setting up the characteristic on the product of this type

Unique items: YES
Example:
[
    "RED", "WHITE"
]

Responses

201 Created
Body
Object
id
string

The unique indentifier of the newlly created product type

Example:
2c0809f-ed91-4b68-b912-5bd6064d901e
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/products/types HTTP/1.1 

Content-Type: application/json

{
    "name": "Decoders",
    "display_name": "Decoders",
    "description": "Used to set up various Decoder products",
    "classification": "TRACEABLE_PHYSICAL_GOOD",
    "composition_method": "FLAT",
    "is_stockable": true,
    "is_modifier": "false",
    "negative_balance_allowed": "false",
    "is_provisionable": "false",
    "characteristics": [
        {
            "id": "2c0809f-ed91-4b68-b912-5bd6064d901e",
            "mandatory": true,
            "values": [
                ""
            ]
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "2c0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Product Type
PUT /product_types/{id}

Updates an existing product type. A single product type can be updated per Web API call.

Path variables

id
string GUID required

The product type identifier that will be updated

Example:
d76f36ef-824f-a57c-4642-0afb4901d5a1

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 product type which is unique

Example:
Decoders
display_name
string

The display name of the product type

Example:
Decoders
description
string

Product type description

Example:
HD and SD descoders
composition_method
string
Enumeration:
FLAT
FIXED_BUNDLE
FLEXIBLE_BUNDLE
COMPOSITE
Example:
FLAT
is_stockable
boolean

Defines whether products of classification TRACEABLE_PHYSICAL_GOOD or NON_TRACEABLE_PHYSICAL_GOOD are stockable or not

Example:
true
is_modifier
boolean

Defines whether products of classification TRACEABLE_PHYSICAL_GOOD or NON_TRACEABLE_PHYSICAL_GOOD are modifiers of products or not

Example:
false
is_provisionable
boolean required nullable

Defines whether product of this type are provisionable or not. Applicable for classifications: TRACEABLE_PHYSICAL_GOOD (flat and fixed bundle), TERMED_SERVICE (flat and fixed bundle) and ONE_TIME_SERVICE (flat)

Example:
true
negative_balance_allowed
boolean

Applicable for stockable physical goods only. Defines is their balanc ein the warehouse can go below 0.

Example:
true
characteristics
Array

List of characteristics to be set on products of this type.

Object
id
string GUID required

Characteristic unique identifier

Example:
d76f36ef-824f-a57c-4642-0afb4901d5a1
mandatory
boolean

Characteristic is mandatory to be set on products or not

Default:
false
Example:
true
values
Array of string

Available values that can be set on characteristics when selected to be added on a product

Unique items: YES
Example:
[
    "RED", "WHITE"
]

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated product type

Example:
2c0809f-ed91-4b68-b912-5bd6064d901e
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/product_types/d76f36ef-824f-a57c-4642-0afb4901d5a1 HTTP/1.1 

Content-Type: application/json

{
    "name": "Decoders",
    "display_name": "Decoders",
    "description": "HD and SD descoders",
    "composition_method": "FLAT",
    "is_stockable": true,
    "is_modifier": "false",
    "is_provisionable": "true",
    "negative_balance_allowed": true,
    "characteristics": [
        {
            "id": "d76f36ef-824f-a57c-4642-0afb4901d5a1",
            "mandatory": true,
            "values": [
                ""
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "2c0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Product Types
DELETE /products/types/{id}

Deletes a Product Type

Path variables

id
string GUID required

The product type identifier that will be deleted

Example:
d76f36ef-824f-a57c-4642-0afb4901d5a1

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/products/types/d76f36ef-824f-a57c-4642-0afb4901d5a1 HTTP/1.1 

HTTP/1.1 204 No Content 
List Product Types
GET /products/types/

Returns a list of product types

Request parameters

search_value
string optional

Search for product types based on their Name, Display Name or Description

classifications
Collection format: csv
Unique items: YES
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
is_modifier
boolean optional

If specified, then only product types classified as modifiers are returned

Default:
false
Example:
false

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
content
Array
Object
id
string

The identifier of the product type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

The name of the product type

Example:
Decoders
display_name
string

The display name of the product type

Example:
Decoders
description
string

Product type description

Example:
All Decoder products
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
composition_method
string
Enumeration:
FLAT
FIXED_BUNDLE
FLEXIBLE_BUNDLE
COMPOSITE
Example:
FLAT
is_stockable
boolean

Defines whether products of classification TRACEABLE_PHYSICAL_GOOD or NON_TRACEABLE_PHYSICAL_GOOD are stockable or not

Example:
true
is_modifier
boolean

Defines whether products of classification TRACEABLE_PHYSICAL_GOOD or NON_TRACEABLE_PHYSICAL_GOOD are modifiers of products or not

Example:
false
is_provisionable
boolean

Defines whether product of this type are provisionable or not. Applicable for classifications: TRACEABLE_PHYSICAL_GOOD (flat and fixed bundle), TERMED_SERVICE (flat and fixed bundle) and ONE_TIME_SERVICE (flat)

Example:
false
negative_balance_allowed
boolean

Defines whether stockable physical goods’ balance can go below 0 in the warehouse

Example:
false
characteristics
integer

Number of characteristics set for this prodyuct type

Example:
3
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/products/types/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Decoders",
            "display_name": "Decoders",
            "description": "All Decoder products",
            "classification": "TRACEABLE_PHYSICAL_GOOD",
            "composition_method": "FLAT",
            "is_stockable": true,
            "is_modifier": "false",
            "is_provisionable": "false",
            "negative_balance_allowed": "false",
            "characteristics": 3
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Product Type
GET /products/types/{id}

Returns a single Product Type

Path variables

id
string GUID required

The product type identifier that will be retrieved

Example:
d76f36ef-824f-a57c-4642-0afb4901d5a1

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 identifier of the product type

Example:
d76f36ef-824f-a57c-4642-0afb4901d5a1
name
string

The name of the product type

Example:
Decoders
display_name
string

The display name of the product type

Example:
Decoders
description
string

Product type description

Example:
All decoders
classification
string
Enumeration:
TERMED_SERVICE
USAGE_SERVICE
EXPENSE
ONE_TIME_SERVICE
TRACEABLE_PHYSICAL_GOOD
NON_TRACEABLE_PHYSICAL_GOOD
Example:
TRACEABLE_PHYSICAL_GOOD
composition_method
string
Enumeration:
FLAT
FIXED_BUNDLE
FLEXIBLE_BUNDLE
COMPOSITE
Example:
FLAT
is_stockable
boolean

Defines whether products of classification TRACEABLE_PHYSICAL_GOOD or NON_TRACEABLE_PHYSICAL_GOOD are stockable or not

Example:
true
is_modifier
boolean

Defines whether products of classification TRACEABLE_PHYSICAL_GOOD or NON_TRACEABLE_PHYSICAL_GOOD are modifiers of products or not

Example:
false
is_provisionable
boolean

Defines whether product of this type are provisionable or not. Applicable for classifications: TRACEABLE_PHYSICAL_GOOD (flat and fixed bundle), TERMED_SERVICE (flat and fixed bundle) and ONE_TIME_SERVICE (flat)

Example:
false
negative_balance_allowed
boolean

Defines if stockable phsical goods balance can go below 0 in the warehouse

Example:
false
characteristics
Array

List of characteristic that can be set on products of this type.

Object
id
string GUID

Characteristic unique identifier

Example:
d76f36ef-824f-a57c-4642-0afb4901d5a1
key
string

Characteristic key

Example:
colour
values
Array of string

Allowed values that this attribute can have when set on the product

Min items: 1
Unique items: YES
mandatory
boolean

Defines whether this attribute must be set on the product or not

Default:
false
Example:
true
label
string

Attribute’s label

Example:
Colour
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/products/types/d76f36ef-824f-a57c-4642-0afb4901d5a1 HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "d76f36ef-824f-a57c-4642-0afb4901d5a1",
    "name": "Decoders",
    "display_name": "Decoders",
    "description": "All decoders",
    "classification": "TRACEABLE_PHYSICAL_GOOD",
    "composition_method": "FLAT",
    "is_stockable": true,
    "is_modifier": "false",
    "is_provisionable": "false",
    "negative_balance_allowed": "false",
    "characteristics": [
        {
            "id": "d76f36ef-824f-a57c-4642-0afb4901d5a1",
            "key": "colour",
            "values": [
                ""
            ],
            "mandatory": true,
            "label": "Colour"
        }
    ]
}
Product Characteristics

Additional attributes that can be set on product to provide additional information of their nature, behaviour or usage. Characteristics are included in Product types so as to define for which products they are avialable to be set

POST /products/characteristics
GET /products/characteristics/
PUT /products/characteristics/{id}
DELETE /products/characteristics/{id}
Create Characteristics
POST /products/characteristics

Creates a new Characteristic for Products. A single Characteristics can be created per Web API call.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
key
string required

The characteristic’s key which is unique. The key must not include spaces

Example:
colour
label
string required

The characteristic’s label which is unique

Example:
Colour
description
string

The characteristic’s description

Example:
The colour of the product
values
Array required

List of values that are available for this attribute. An attribute can have from one to multiple values (at least one must be specified)

Min items: 1
Unique items: YES
Object
name
string required

The name of the attribute value. The name must be unique across the rest of the variant attribute’s values.

Example:
RED

Responses

201 Created
Body
Object
id
string

The unique identifier of the new Characteristic

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/products/characteristics HTTP/1.1 

Content-Type: application/json

{
    "key": "colour",
    "label": "Colour",
    "description": "The colour of the product",
    "values": [
        {
            "name": "RED"
        }
    ]
}
List Characteristics
GET /products/characteristics/

Returns a list of Characteristics that can be set in Products

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 for variants based on key, label and description

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
content
Array
Object
id
string

The unique identifier of the characteristic

Example:
3dc0809f-ed91-4b68-b912-5bd6064d901e
key
string

The characteristic’s key which is unique

Example:
colour
label
string

The characteristic’s label i.e. how it is displayed in the UI

Example:
Colour
description
string

The variant characteristic’s description

Example:
The colour of the product
values
Array

List of values that are available for this attribute. An attribute can have from one to multiple values.

Unique items: YES
Object
id
string

The unique identifier of the attribute value

Example:
2dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

The name of the attribute value as this will be displayed

Example:
Red
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/products/characteristics/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "3dc0809f-ed91-4b68-b912-5bd6064d901e",
            "key": "colour",
            "label": "Colour",
            "description": "The colour of the product",
            "values": [
                {
                    "id": "2dc0809f-ed91-4b68-b912-5bd6064d901e",
                    "name": "Red"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Characteristic
PUT /products/characteristics/{id}

Updates an existing Characteristic. A single Characteristic can be updated per Web API call.

Path variables

id
string required

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
key
string

The characteristic’s key which is unique. The key must not include spaces

Example:
colour
label
string

The characteristic’s label which is unique

Example:
Colour
description
string

The characteristic’s description

Example:
The colour of the product
values
Array required

List of values that are available for this attribute. An attribute can have from one to multiple values. At least one must be specified.

Min items: 1
Unique items: YES
Object
name
string required

The name of the attribute value. The name must be unique across the rest of the variant attribute’s values.

Example:
Red

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated Characteristic

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/characteristics/{id} HTTP/1.1 

Content-Type: application/json

{
    "key": "colour",
    "label": "Colour",
    "description": "The colour of the product",
    "values": [
        {
            "name": "Red"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Characteristic
DELETE /products/characteristics/{id}

Deletes an existing Characteristic. A single characteristic can be deleted per Web API call.

Path variables

id
string required

Characteristic unique identifier

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

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/products/characteristics/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

HTTP/1.1 204 No Content 
Tier Rules

Tier path rules group together termed services so as to facilitate service changes. If a termed service is in a tiered path, then it can only be changed into another service within the same path. If service is not included in any path, then it can be changed into any other service again, not in any path.

POST /products/tier_paths
GET /products/tier_paths/
GET /products/tier_paths/{id}
PUT /products/tier_paths/{id}
DELETE /products/tier_paths/{id}
Create Tier Path
POST /products/tier_paths

Creates a new tier path that includes a list of termed services. A path must have at least two services

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

Tier path name

Example:
Packages
description
string

Tier path description

Example:
Packages tiering path
tiers
Array required

The tier path for a list of service products.

Min items: 2
Object
id
string required

The unique identifier of a product. The product must be classified as a termed service

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
level
integer required

The tier level of the product within the path. Each level is unique

Example:
1

Responses

201 Created
Body
Object
id
string

The unique identifier of the newlly created tier path

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/tier_paths HTTP/1.1 

Content-Type: application/json

{
    "name": "Packages",
    "description": "Packages tiering path",
    "tiers": [
        {
            "product_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "level": 1
        }
    ]
}
List Tier Paths
GET /products/tier_paths/

Returns a list of product tier paths

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 for product types based on their Name or Description

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

Tier path uniue identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

Tier path name

Example:
Packages
description
string

Tier path description

Example:
Packages changes
services
integer

Number of services included in the Tier path

Example:
5
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/products/tier_paths/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Packages",
            "description": "Packages changes",
            "services": 5
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Tier Path
GET /products/tier_paths/{id}

Returns a single product tier path

Path variables

id
string required

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
name
string

Tier path name

Example:
Packages
description
string

Tier path description

Example:
Packages changes
tiers
Array

List of tered services included in the tier path.

Min items: 2
Unique items: YES
Object
product
Object

Termed service product included in the tier path

id
string

Product identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
sku
string

Product SKU

Example:
GLD
name
string

Product name

Example:
Gold
level
integer

Service’s level wihin the path

Example:
1
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/products/tier_paths/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "Packages", 
    "description": "Packages changes",
    "tiers": [
        {
            "product": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "GLD",
                "name": "Gold"
            },
            "level": 1
        }
    ]
}
Update Tier Path
PUT /products/tier_paths/{id}

Updates an existing tier path

Path variables

id
string required

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

Tier path name

Example:
Packages
description
string

Tier path description

Example:
Packages changes
tiers
Array required

List of termed services included in the Tier path

Min items: 2
Unique items: YES
Object
id
string required

The unique identifier of a product. The product must be classified as a tiered service

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
level
integer required

The tier level of the product within the path

Example:
2

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated tier path

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/products/tier_paths/{id} HTTP/1.1 

Content-Type: application/json

{
    "name": "Packages",
    "description": "Packages changes",
    "tiers": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "level": 2
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Tier Path
DELETE /products/tier_paths/{id}

Deletes a tier path

Path variables

id
string required

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/products/tier_paths/{id} HTTP/1.1 

HTTP/1.1 204 No Content 
Rewards

A reward scheme is a reward plan made by the business to target specific market groups (e.g. families, students) and through dedicated reward offers to provide awards based on their behavior.

There are two types of schemes

  • Open Loop Schemes where contacts can be auto-signed up (e.g. on registration) or self-signed up
  • Closed Loop Schemes where contacts can be signed up in a controlled manner (request to join), usually based on a specific email domains. Closed loop sign ups are controlled based on unique codes that are automatically generated and communicated only to the targeted market group (e.g. contacts that have a “crm(dot)com” email address)

Reward Offers are incentives for awarding contacts a cashback amount that can be redeemed to an open balance. Each offer defines a goal that contacts should reach in order to earn an award, along with the conditions that the award can be redeemed.

The reward offers are grouped into the following goals; where each offer goal has distinct types of offer types affecting how a contact can be awarded

  • Reward Achievement handles awarding contacts when they reach an accomplishment of pushing past a goal post (e.g. Facebook like)
    • Lottery awards a specific market group (contact segmentation) by picking a winner on a lottery basis (event: time). Enhancements for lottery
    • Thank You Gift does an ad-hoc award to a specific market group (contact segmentation) (event: time)
    • Achievement awards contact’s accomplishments of pushing past a goal post
    • Reach a Tier awards contacts for advancing to the next tier (event: advance to next tier)
    • Subscription Maturity awards contacts for being loyal subscribers, i.e. uninterrupted subscriptions based on subscription activation date, ignoring disconnection (event: time lapsed based on subscription activation date)
  • Increase Spend handles awarding contacts based on their purchases (e.g. product bundle, venue based)
    • Monetary Discount awards contacts on their overall purchase value (e.g. 1% cashback, 50% birthday discount) (event: purchase)
    • Products Discount awards contacts based on a group of purchased products (event: purchase)
  • Improve Memberships handles awarding contacts based on their incentive to promote/support the organisation (e.g. sign up)
    • Sign up awards new contacts (event: account registration)
    • Referral awards existing contacts who have referred new contacts (event: referral event & -optional- purchase from the referred contact/account)
    • Profile Completeness awards contacts that provided their personal data (e.g. email address, date of birth) (event: contact update)
  • Increase Visits handles awarding contacts based on the date/time of their purchases (e.g. time based)
    • Happy Hour awards contacts’ purchases based on specific locations/time (event: purchase)
GET /rewards/settings
PUT /rewards/settings
Get Reward Settings
GET /rewards/settings

Retrieve the reward settings for an organisation

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
resolution
Object

Defines from which reward offers contacts will be awarded

resolution_method
string

Defines which reward offers will be provided

Enumeration:
ALL_MATCHED_OFFERS
BEST_OFFER_ACROSS_SCHEMES
BEST_OFFER_FROM_EACH_SCHEME
only_best_discount
boolean

Defines only if the best instant discount offer will be provided. Applicable only if the resolution method = ALL_MATCHED_OFFERs

Example:
true
restrict_awards
boolean

Defines whether awards will be restricted (not provided) when wallet (commerce) balance is spent

Example:
false
reward_redeem
Object

Defines how contacts can redeem their awards

method
string

The redeem method that will be applied

Enumeration:
AUTOMATIC
ON_SPEND
payout
Object

The payout reconciliation that will be appled for redeemed amounts

is_enabled
boolean

Defines whether payout reconciliation is enabled or not

Example:
true
method
string

Defines how redeemed amount will be payout to the contact

Enumeration:
CONTACT
PAYMENT_GATEWAY
Default:
CONTACT
type
Object

Details about the related type

id
string GUID

The type identifier

Example:
c01ecd1b-ff1e-35c2-7236-59ae20339c78
name
string

The type name

Example:
Internal Transaction
integration
Object

Details about the integration

id
string GUID

The integration identifier

Example:
81ed6bcd-39ec-214c-5124-9e5ac6cb5dc4
name
string

The integration name

Example:
UniFi
min_amount
number

Defines the minimum amount that should be met in order to post a payout (minimum amount = available wallet balance + redeem amount from current purchase)

Example:
1.11
reward_tiers
Object

Defines how reward tiering will be calculated based on contact purchase behavior

enable_tier
boolean

Defines whether reward tiers are supported or not

Example:
true
conversion_rate
integer

Defines the conversion rate between real currency and value units

Example:
1000
tier_evaluation
string

Defines the unit of time that tiering will be applied

Enumeration:
SIGN_UP_DATE
TIME_INTERVAL
tier_interval
integer

Defines the interval based on which contact will be advanced/downgraded to a tier

Example:
12
initial_month
string

The date when contacts will be tiered for the first time

Enumeration:
JANUARY
FEBRUARY
MARCH
APRIL
MAY
JUNE
JULY
AUGUST
SEPTEMBER
OCTOBER
NOVEMBER
DECEMBER
auto_advance
boolean

Defines whether contacts can advance to the next tier as soon as the next tier’s value units are reached

Example:
false
tiers
Array

Information about the reward tiers

Object
id
string GUID

The tier identifier

Example:
TIER001234543212345678UJIKY76HJR
name
string

The tier name

Example:
Gold
description
string

The tier description

Example:
Gold Customers
color
string

The tier color (used for marketing purposes)

Example:
#d4af37
value_units
integer

The tier value units (inclusive)

Example:
150000
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
offer_restrictions
Object

Defines which reward offers types can be setup within a buiness network

enable_restrictions
boolean

Defines whether reward offer restrictions is enabled or not

Example:
true
offer_types
Array

Defines the offer types that will be allowed to be created

Unique items: YES
string

The offer type (each goal is related with a type)

Enumeration:
LOTTERY
ACHIEVEMENT
GIFT
DISCOUNT
BUNDLE
SIGNUP
REFER
PROFILE
HAPPYHOUR
REACH_TIER
SUBSCRIPTION_MATURITY
redeem_methods
Array

Defines which redeem methods are allowed

Unique items: YES
string

Defines which redeem methods are allowed

Enumeration:
DEFERRED
INSTANT
purchase_matching
Object

Defines how purchase events will be matched (against a transaction processor or as stand-alone purchases)

mode
string

The mode that will be applied on purchase matching resolution

Enumeration:
NORMAL_MODE
TP_MODE
explicit_mode
Array

List of all organisations that will have different match mode

Object
organisation
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
purchased_products_matching
Object

Defines how purchased products will be matched (identified): against performed by organisation or not

is_enabled
boolean

Defines whether purchased product matching is enabled or not

Example:
false
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/rewards/settings HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "resolution": {
        "resolution_method": "ALL_MATCHED_OFFERS",
        "only_best_discount": "true",
        "restrict_awards": "false"
    },
    "reward_tiers": {
        "enable_tier": "true",
        "conversion_rate": 1000,
        "tier_evaluation": "TIME_INTERVAL",
        "tier_interval": 12,
        "initial_month": "OCTOBER",
        "auto_advance": "false",
        "tiers": [
            {
                "id": "TIER001234543212345678UJIKY76HJR",
                "name": "Gold",
                "description": "Gold Customers",
                "color": "#d4af37",
                "value_units": 150000,
                "creatives": [
                    {
                        "id": "CA123456789AQWSXZAQWS1236547896541",
                        "usage_type": "PROFILEIMAGE",
                        "width": 2159,
                        "height": 3075,
                        "format": "jpg",
                        "url": "https://assets.crm.com/image/logo.jpg",
                        "public_id": "crm-com/image",
                        "media": [
                            {
                                "width": 200,
                                "height": 300,
                                "url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "offer_restrictions": {
        "enable_restrictions": "true",
        "offer_types": [
            "BUNDLE"
        ],
        "redeem_methods": [
            "INSTANT"
        ]
    },
    "purchase_matching": {
        "mode": "TP_MODE",
        "explicit_mode": [
            {
                "organisation": {
                    "id": "4248fab3-67d5-2eb1-eaf6-079ce18cd2ed",
                    "name": "Bravo Coffee"
                }
            }
        ]
    }
}
Update Reward Settings
PUT /rewards/settings

Update the reward settings

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
resolution
Object nullable

Defines from which reward offers contacts will be awarded

resolution_method
string

Defines which reward offers will be provided

Enumeration:
ALL_MATCHED_OFFERS
BEST_OFFER_ACROSS_SCHEMES
BEST_OFFER_FROM_EACH_SCHEME
only_best_discount
boolean nullable

Defines only if the best instant discount offer will be provided. Applicable only if the resolution method = ALL_MATCHED_OFFERs

Example:
true
restrict_awards
boolean nullable

Defines whether awards will be restricted (not provided) when wallet (commerce) balance is spent

Default:
false
Example:
true
reward_redeem
Object nullable

Defines how contacts can redeem their awards

method
string nullable

The redeem method that will be applied

Enumeration:
AUTOMATIC
ON_SPEND
payout
Object nullable

The payout reconciliation that will be appled for redeemed amounts

is_enabled
boolean
Example:
false
method
string

Defines how redeemed amount will be payout to the contact

Enumeration:
CONTACT
PAYMENT_GATEWAY
Default:
CONTACT
type_id
string GUID

The payout (financial transaction) type that will be used for paying out the redeem amount - if not defined then the default payout type will be used

Example:
c69c38b9-c8a6-2a1c-0944-deaa7dc1ddf1
integration_id
string GUID

The integration through which payouts will be posted (applicable only if method is payment gateway)

Example:
c81c095e-b2a7-8eb8-9d0c-83105e7dda48
min_amount
number

Defines the minimum amount that should be met in order to post a payout (minimum amount = available wallet balance + redeem amount from current purchase)

Example:
1.01
reward_tiers
Object nullable

Defines how reward tiering will be calculated based on contact purchase behavior

enable_tier
boolean required

Defines whether reward tiers are supported

Example:
true
conversion_rate
integer nullable

Defines the conversion rate between real currency and value units

Default:
1000
Example:
1000
tier_evaluation
string nullable

Defines the unit of time that tiering will be applied

Enumeration:
SIGN_UP_DATE
TIME_INTERVAL
tier_interval
integer nullable

Defines the interval based on which customer will be advanced/downgraded to a tier (Applicable only if the tier evaluation is based on time interval)

Default:
12
Example:
12
initial_month
string

The date when contacts will be tiered for the first time

Enumeration:
JANUARY
FEBRUARY
MARCH
APRIL
MAY
JUNE
JULY
AUGUST
SEPTEMBER
OCTOBER
NOVEMBER
DECEMBER
auto_advance
boolean required nullable

Defines whether customers can advance to the next tier as soon as the next tier’s value units are reached

Default:
false
Example:
true
tiers
Array required

Supported reward tiers

Min items: 1
Object
id
string GUID

The tier identifier

Example:
6064cd43-1ab5-08fb-6c47-2c4ad3af03d9
name
string required

The tier name

Example:
Gold
description
string nullable

The tier description

Example:
Gold Customers
color
string required

The tier color (used for marketing purposes)

Example:
#d4af37
value_units
integer required

The tier value units (inclusive)

Example:
150000
media_group_id
string GUID

The tier related media group (identifier)

Example:
3ac1788d-cead-365b-25a5-9d0854c40c1f
offer_restrictions
Object nullable

Defines which reward offers types can be setup within a buiness network

enable_restrictions
boolean required

Defines whether reward offer restrictions is enabled or not

Default:
false
Example:
false
offer_types
Array required

Defines the offer types that will be allowed to be created

Unique items: YES
string

The offer type (each goal is related with a type)

Enumeration:
LOTTERY
ACHIEVEMENT
GIFT
DISCOUNT
BUNDLE
SIGNUP
REFER
PROFILE
HAPPYHOUR
REACH_TIER
SUBSCRIPTION_MATURITY
redeem_methods
Array required

Defines which spend methods are allowed

Unique items: YES
string

Defines which redeem methods are allowed

Enumeration:
DEFERRED
INSTANT
purchase_matching
Object nullable

Defines how purchase events will be matched (against a transaction processor or as stand-alone purchases)

mode
string required

The mode that will be applied on purchase matching resolution

Enumeration:
NORMAL_MODE
TP_MODE
explicit_mode
Array nullable

List of all organisations that will have different match mode

Object
organisation_id
string GUID required

The organisation (identifier) that will have different match mode

Example:
3b21975a-e072-a6cc-c424-63d69ac9ef7e
purchased_products_matching
Object nullable

Defines how purchased products will be matched (identified): against performed by organisation or not

is_enabled
boolean nullable

Defines whether purchased product matching against the performed organisation is enabled or not

Default:
false
Example:
true

Responses

200 200

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
a6984610-f1da-247d-83a9-a63f1c945391
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/rewards/settings HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "resolution": {
        "resolution_method": "ALL_MATCHED_OFFERS",
        "only_best_discount": "true"
    },
    "reward_tiers": {
        "enable_tier": "true",
        "conversion_rate": 1000,
        "tier_evaluation": "SIGN_UP_DATE",
        "tier_interval": 12,
        "initial_month": "MAY",
        "auto_advance": "true",
        "tiers": [
            {
                "id": "6064cd43-1ab5-08fb-6c47-2c4ad3af03d9",
                "name": "Gold",
                "description": "Gold Customers",
                "color": "#d4af37",
                "value_units": 150000,
                "media_group_id": "3ac1788d-cead-365b-25a5-9d0854c40c1f"
            }
        ]
    },
    "offer_restrictions": {
        "enable_restrictions": "false",
        "offer_types": [
            "BUNDLE"
        ],
        "redeem_methods": [
            "INSTANT"
        ]
    },
    "purchase_matching": {
        "mode": "TP_MODE",
        "explicit_mode": [
            {
                "organisation_id": "3b21975a-e072-a6cc-c424-63d69ac9ef7e"
            }
        ]
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a6984610-f1da-247d-83a9-a63f1c945391"
}
Security
GET /security/settings
PUT /security/settings
Get Security Settings
GET /security/settings

Retrieve the security settings for an organisation

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
password_policies
Object

Details about password policy for users

expiration
Object

Details about password expiration

is_enabled
boolean

Defines whether user passwords will be expired or not

Example:
true
period
integer

Defines in how long password will be expired (in days)

Example:
15
notification
integer

Defines in how long users will be notified for upcoming expired passwords (in days)

Example:
12
strong_password
Object

Settings about strong password

is_contact_enabled
boolean

Defines whether strong password will be required for contacts or not

Example:
true
is_user_enabled
boolean

Defines whether strong password will be enhanced for users or not

Example:
true
user_policy
Object

The explicit strong password policy for users

length
integer

The minimum length that a password should have

Example:
12
concurrent_sessions
Object

Details about concurrent sessions for contacts and users

is_enabled
boolean

Defines whether concurrent session policy will be applied

Example:
true
user_sessions
integer

Max allowed user concurrent sessions

Example:
3
two_factor_settings
Object

Details about two factor authentication

is_user_required
boolean

Defines whether two factor authentication will be required for users or not

Example:
false
sso_settings
Object

Details about OIDC settings

is_enabled
boolean

Defines whether OIDC is enabled or not

Example:
true
configuration_document_url
string

The OIDC settings (e.g. oAuth redirection URL, scope) that will be used as part of the OIDC flow

Example:
azure.crm.com
application_id
string

The application (identifier) as configured in the OIDC provider

Example:
d6f9e2e8-2a57-4c54-4ee3-b0d8db840fde
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/security/settings HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "password_policies": {
        "expiration": {
            "is_enabled": true,
            "period": 15
        }
    },
    "concurrent_sessions": {
        "is_enabled": "true",
        "contact_sessions": 3,
        "user_sessions": 3
    }
}
Update Security Settings
PUT /security/settings

Update the security settings (e.g. password policy)

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
password_policies
Object nullable

Details about password policy for users

expiration
Object nullable

Details about password expiration

is_enabled
boolean required

Defines whether user passwords will be expired or not

Example:
true
period
integer required

Defines in how long password will be expired (in days)

Min: 14
Max: 730
Default:
90
Example:
15
notification
integer

Defines in how long users will be notified for upcoming expired passwords (in days)

Default:
15
Example:
11
strong_password
Object nullable

Settings about strong password

is_contact_enabled
boolean required

Defines whether strong password will be required for contacts or not

Example:
false
is_user_enabled
boolean required

Defines whether strong password will be enhanced for users or not

Example:
true
user_policy
Object nullable

The explicit strong password policy for users

length
integer required

The minimum length that a password should have

Example:
12
concurrent_sessions
Object nullable

Details about concurrent sessions for contacts and users

is_enabled
boolean required

Defines whether concurrent session policy will be applied

Default:
true
Example:
true
user_sessions
integer nullable

Max allowed user concurrent sessions

Default:
3
Example:
3
two_factor_settings
Object nullable

Details about two factor authentication

is_user_required
boolean required

Defines whether two factor authentication will be required for users or not

Example:
true
sso_settings
Object nullable

Details about OIDC settings

is_enabled
boolean required

Defines whether OIDC is enabled or not

Default:
false
Example:
true
configuration_document_url
string nullable

The OIDC settings (e.g. oAuth redirection URL, scope) that will be used as part of the OIDC flow

Example:
azure.crm.com
application_id
string required nullable

The application (identifier) as configured in the OIDC provider (required if OIDC is enabled)

Example:
d6f9e2e8-2a57-4c54-4ee3-b0d8db840fde

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The organisation identifier

Example:
fc286176-12f8-cb96-bd00-fb4d4fa80680
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/security/settings HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "password_policies": {
        "expiration": {
            "is_enabled": "true",
            "period": 15
        }
    },
    "concurrent_sessions": {
        "is_enabled": "true",
        "contact_sessions": 3,
        "user_sessions": 3
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "fc286176-12f8-cb96-bd00-fb4d4fa80680"
}
API Keys
POST /organisations/{id}/api_keys
PUT /organisations/{org_id}/api_keys/{key_id}
DELETE /organisations/{org_id}/api_keys/{key_id}
GET /organisations/{org_id}/api_keys
GET /organisations/{org_id}/api_keys/{key_id}
POST /organisations/{org_id}/api_keys/{key_id}
Create API Key
POST /organisations/{id}/api_keys

Create an active API Key for a specific organisation

Path variables

id
string GUID required

The organisation (identifier) where an API Key will be created

Example:
f55af35a-29ee-37ba-3be8-036194b46e36

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 api key name

Example:
Registration Portal
type
string required

Defines the type of the api key

Enumeration:
PUBLIC
SECRET

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The api key identifier

Example:
148c2997-8f91-9d6a-7ee8-5d8db4ca7373
key
string

The non-encrypted secret key that will be used for subsuquent API authentication

Example:
123465789
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/f55af35a-29ee-37ba-3be8-036194b46e36/api_keys HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "name": "Registration Portal",
    "type": "SECRET"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "148c2997-8f91-9d6a-7ee8-5d8db4ca7373",
    "key": "123465789"
}
Update API Key
PUT /organisations/{org_id}/api_keys/{key_id}

Update a single api key of a specific organisation

Path variables

org_id
string GUID required

The organisation (identifier) whose api key will be updated

Example:
f55af35a-29ee-37ba-3be8-036194b46e36
key_id
string GUID required

The api key (identifier) that will be updated

Example:
bdbe6526-10ce-f4e2-6f38-623b0a7fef80

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 api key name

Example:
Registration Portal
is_active
boolean nullable

Defines whether the api key will be active or not

Example:
false

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The api key identifier

Example:
bdbe6526-10ce-f4e2-6f38-623b0a7fef80
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 /organisations/CAD1E31269B76D7A65ACCE45B2E68DFD/apikeys/SEC1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Content-Type: application/json

{
    "name": "Registration Portal",
    "is_active": "false"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "API1E31269B76D7A65ACCE45B2E68DFD"
}
Delete API Key
DELETE /organisations/{org_id}/api_keys/{key_id}

Delete a specific api key from a specific organisation

Path variables

org_id
string GUID required

The organisation (identifier) from which api key will be deleted

Example:
e9c727d9-b3da-a916-1b04-97f57e02d4da
key_id
string GUID required

The api key (identifier) that will be deleted

Example:
bdbe6526-10ce-f4e2-6f38-623b0a7fef80

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/v1/organisations/CAD1E31269B76D7A65ACCE45B2E68DFD/apikeys/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 
List API Keys
GET /organisations/{org_id}/api_keys

Retrieve a list of api keys based on search criteria (e.g. all expired api keys)

Path variables

org_id
string GUID required

The organisation (identifier) whose api keys will be retrieved

Example:
f55af35a-29ee-37ba-3be8-036194b46e36

Request parameters

name
string optional

Filter based on the name

Example:
Registration Key
type
string optional

Filter based on the api key type

Enumeration:
PUBLIC
SECRET
is_active
boolean optional

Filters based on whether API Keys are active or not

Example:
true
is_default
boolean optional

Filters the default API Key

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 succeeded

Body
Object
content
Array
Object
id
string GUID

The api key identifier

Example:
bdbe6526-10ce-f4e2-6f38-623b0a7fef80
name
string

The api key name

Example:
Registration Name
type
string

Defines the type of the api key

Enumeration:
PUBLIC
SECRET
is_active
boolean

Defines whether the api (public or secret) key is active or not

Example:
true
public_key
string

The public api key’s value

Example:
API1E31269B76D
obfuscated
string

The secret api key obfuscated value

Example:
********MG12
encrypted
string

The secret api key encrypted value

Example:
qwertyasd123
active_end
integer epoch

Defines the date up until the secret api key will be active

Example:
1580292120
is_default
boolean

Defines if the api key is the default one (applicable only for public API keys)

Example:
false
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/v1/organisations/CAD1E31269B76D7A65ACCE45B2E68DFD/apikeys HTTP/1.1 

authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "API1E31269B76D7A65ACCE45B2E68DFD",
            "name": "Registration Name",
            "type": "PUBLIC",
            "is_active": "true",
            "public_key": "API1E31269B76D",
            "obfuscated": "********MG12",
            "encrypted": "qwertyasd123",
            "active_end": 1580292120,
            "is_default": "false"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get API Key
GET /organisations/{org_id}/api_keys/{key_id}

Retrieve detailed information for an api key

Path variables

org_id
string GUID required

The organisation (identifier) whose api keys will be retrieved

Example:
f55af35a-29ee-37ba-3be8-036194b46e36
key_id
string GUID required

The api key (identifier) that will be retrieved

Example:
bdbe6526-10ce-f4e2-6f38-623b0a7fef80

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 api key identifier

Example:
bdbe6526-10ce-f4e2-6f38-623b0a7fef80
name
string

The api key name

Example:
Registration Key
type
string

Defines the type of the api key

Enumeration:
PUBLIC
SECRET
is_active
boolean

Defines whether the api key is active or not

Example:
true
public_key
string

The public api key value

Example:
API1E31269B76D
obfuscated
string

The secret api key obfuscated value

Example:
********ML71
encrypted
string

The secret api key encrypted value

Example:
qwerty1234a8
active_end
integer epoch

Defines the date up until the secret api key will be active

Example:
1580292120
is_default
boolean

Defines if the api key is the default one (applicable only for public API keys)

Example:
true
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
Example 2

Retrieve details for a public API Key

GET https://sandbox.crm.com/backoffice/v2/organisations/f55af35a-29ee-37ba-3be8-036194b46e36/api_keys/bdbe6526-10ce-f4e2-6f38-623b0a7fef80 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "bdbe6526-10ce-f4e2-6f38-623b0a7fef80",
    "name": "Registration Key",
    "type": "PUBLIC",
    "is_active": true,
    "public_key": "API1E31269B76D",
    "is_default": true
}

Retrieve details for a secret API Key

GET https://sandbox.crm.com/backoffice/v2/organisations/f55af35a-29ee-37ba-3be8-036194b46e36/api_keys/bdbe6526-10ce-f4e2-6f38-623b0a7fef80 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "bdbe6526-10ce-f4e2-6f38-623b0a7fef80",
    "name": "Registration Key",
    "type": "SECRET",
    "is_active": true,
    "obfuscated": "********ML71",
    "encrypted": "qwerty1234a8",
    "active_end": 1580292120,
    "is_default": false
}
API Key Actions
POST /organisations/{org_id}/api_keys/{key_id}

Perform actions on an existing api key (e.g. roll secret api key)

Path variables

org_id
string GUID required

The organisation (identifier) of which api key will be updated

Example:
f55af35a-29ee-37ba-3be8-036194b46e36
key_id
string GUID required

The api key (identifier) that actions will be applied

Example:
bdbe6526-10ce-f4e2-6f38-623b0a7fef80

Notes

ROLL API KEYS

Only secret keys can be rolled. The previous key will be revoked (and no longer can be used until expired), while a new one will be generated based on GUID standard methods.

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 action that will be applied on the api key

Enumeration:
ROLL
expiry_date
integer epoch nullable

Defines up until the api key will be valid (applicable only for secret api key and on roll action)

Example:
1582034284

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The api key identifier

Example:
a6126f78-f880-7bd8-ebcd-7e5397b59c80
key
string

The non-encrypted api key value that will be used for subsuquent API authentication

Example:
123456789
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/f55af35a-29ee-37ba-3be8-036194b46e36/api_keys/bdbe6526-10ce-f4e2-6f38-623b0a7fef80 HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "action": "ROLL",
    "expiry_date": 1582034284
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a6126f78-f880-7bd8-ebcd-7e5397b59c80",
    "key": "123456789"
}
Teams
POST /teams
PUT /teams/{id}
DELETE /teams/{id}
GET /teams
GET /teams/{id}
Create Team
POST /teams

Create a new team

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 team name

Example:
Admin
description
string nullable

The team description

Example:
Admin Team

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The team identifier

Example:
609de9a4-8220-be54-63ca-a7044b1326e0
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/teams HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Admin",
    "description": "Admin Team"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "609de9a4-8220-be54-63ca-a7044b1326e0"
}
Update Team
PUT /teams/{id}

Update an existing team

Path variables

id
string GUID required

The team (identifer) that will be updated

Example:
dfdeb9f9-003d-fca7-c548-0a88676bb9cf

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 team name

Example:
Admin
description
string nullable

The team description

Example:
Admin Team

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The team identifier

Example:
609de9a4-8220-be54-63ca-a7044b1326e0
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/teams/dfdeb9f9-003d-fca7-c548-0a88676bb9cf HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Admin",
    "description": "Admin Team"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "609de9a4-8220-be54-63ca-a7044b1326e0"
}
Delete Team
DELETE /teams/{id}

Delete an existing team

Path variables

id
string GUID required

The team (identifer) that will be deleted

Example:
dfdeb9f9-003d-fca7-c548-0a88676bb9cf

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/teams/dfdeb9f9-003d-fca7-c548-0a88676bb9cf HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 204 No Content 
List Teams
GET /teams

Retrieve a list of teams based on search criteria (e.g. all “admin” teams)

Request parameters

name
string optional

Filters based on the team name

Example:
Admin
include_user_count
boolean optional

Defines whether the number of users per team will be retrieved

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 succeeded

Body
Object
content
Array
Object
id
string GUID

The team identifier

Example:
a9dca18e-1d60-8d5b-cf46-848d9fa91dd6
name
string

The team name

Example:
Admin
description
string

The team description

Example:
Admin Team
users_count
integer

The number of users that belong to the team

Example:
112
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/teams?include_user_count=true HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "a9dca18e-1d60-8d5b-cf46-848d9fa91dd6",
            "name": "Admin",
            "description": "Admin Team",
            "users_count": 112
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Team
GET /teams/{id}

Retrieve detailed information for a team

Path variables

id
string GUID required

The team (identifer) that will be retrieved

Example:
d64e7544-aba8-d6de-f8d0-54e02b1daba3

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 team identifier

Example:
6646193b-9177-1d1a-aca9-7c16ee67e786
name
string

The team name

Example:
Admin
description
string

The team description

Example:
Admin Team Description
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/teams/d64e7544-aba8-d6de-f8d0-54e02b1daba3 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "6646193b-9177-1d1a-aca9-7c16ee67e786",
    "name": "Admin",
    "description": "Admin Team Description"
}
User Roles
POST /users/roles
PUT /users/roles/{id}
DELETE /users/roles/{id}
GET /users/roles
GET /users/roles/{id}
Create User Role
POST /users/roles

Create a new user role

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 user role name

Example:
Rewards Manager
description
string nullable

The user role description

Example:
Provide full access to rewards module
is_owner
boolean nullable

Defines whether the role will be used as the owner role on new sign ups

Example:
false
is_default
boolean nullable

Defines whether the role can be used across all child business network

Example:
false
permissions
Array required

The user role permissions

Min items: 1
Unique items: YES
string
Examples:
CONTACT_READCONTACT_WRITE

Responses

201 Created

The request has succeeded

Body
Object
id
string GUID

The user role identifier

Example:
01bdde91-ba65-dcb1-02c2-131c641ea8da
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/users/roles HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Rewards Manager",
    "description": "Provide full access to rewards module",
    "is_owner": "false",
    "is_default": "false",
    "permissions": [
        "CONTACT_READ"
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "01bdde91-ba65-dcb1-02c2-131c641ea8da"
}
Update User Role
PUT /users/roles/{id}

Update an existing user role

Path variables

id
string GUID required

The user role (identifer) that will be updated

Example:
9ea0181c-73be-c44e-9ef2-a0b26c585423

Notes

ADMIN USER ROLE

Admin (owner) user role is the first user role that is created in an organisation and is assigned to the user that registered such organisation. Admin (owner) user role has full access and cannot be updated.

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 user role name

Example:
Rewards Manager
description
string nullable

The user role description

Example:
Provide full access to rewards module
is_owner
boolean nullable

Defines whether the role will be used as the owner role on new sign ups

Example:
false
is_default
string nullable

Defines whether the role can be used across all child business network

Example:
false
permissions
Array nullable

The user role permissions

Min items: 1
Unique items: YES
string
Examples:
CONTACT_READCONTACT_WRITE

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The user role identifier

Example:
9ea0181c-73be-c44e-9ef2-a0b26c585423
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/users/roles/9ea0181c-73be-c44e-9ef2-a0b26c585423 HTTP/1.1 

Content-Type: application/json
api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

{
    "name": "Rewards Manager",
    "description": "Provide full access to rewards module",
    "is_owner": "false",
    "is_default": "false",
    "permissions": [
        "CONTACT_WRITE"
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9ea0181c-73be-c44e-9ef2-a0b26c585423"
}
Delete User Role
DELETE /users/roles/{id}

Delete an existing user role

Path variables

id
string GUID required

The user role (identifer) that will be deleted

Example:
9ea0181c-73be-c44e-9ef2-a0b26c585423

Notes

ADMIN USER ROLE

Admin (owner) user role is the first user role that is created in an organisation and is assigned to the user that registered such organisation. Admin (owner) user role has full access and cannot be deleted.

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/users/roles/9ea0181c-73be-c44e-9ef2-a0b26c585423 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 204 No Content 
List User Roles
GET /users/roles

Retrieve a list of user roles based on search criteria (e.g. all user roles)

Request parameters

name
string optional

Filter based on user role name

Example:
Rewards Manager
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 user role identifier

Example:
9ea0181c-73be-c44e-9ef2-a0b26c585423
name
string

The user role name

Example:
Rewards Manager
description
string

The user role description

Example:
Provides full access on Rewards module
is_owner
boolean

Defines whether the role will be used as the owner role on new sign ups

Example:
true
is_default
boolean

Defines whether the role can be used across all child business network

Example:
true
is_full_access
boolean

Defines whether the role provides full access to all product areas

Example:
false
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/users/roles HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "9ea0181c-73be-c44e-9ef2-a0b26c585423",
            "name": "Rewards Manager",
            "description": "Provides full access on Rewards module",
            "is_owner": false,
            "is_default": true,
            "is_full_access": false
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get User Role
GET /users/roles/{id}

Retrieve detailed infromation for a user role

Path variables

id
string GUID required

The user role (identifer) that will be retrieved

Example:
9ea0181c-73be-c44e-9ef2-a0b26c585423

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 user role identifier

Example:
9ea0181c-73be-c44e-9ef2-a0b26c585423
name
string

The user role name

Example:
Rewards Manager
description
string

The user role description

Example:
Rewards module full access
permissions
Array

The user role permissions

Unique items: YES
Example:
[
    "CONTACT_READ",
    "CONTACT_WRITE"
]
string
Examples:
CONTACT_READCONTACT_WRITE
is_owner
boolean

Defines whether the role will be used as the owner role on new sign ups

Example:
true
is_default
boolean

Defines whether the role can be used across all child business network

Example:
true
is_full_access
boolean

Defines whether the role has full permissions

Example:
false
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/users/roles/9ea0181c-73be-c44e-9ef2-a0b26c585423 HTTP/1.1 

api_key: 4dc0809f-ed91-4b68-b912-5bd6064d901e

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "9ea0181c-73be-c44e-9ef2-a0b26c585423",
    "name": "Rewards Manager",
    "description": "Rewards module full access",
    "permissions": [
        "CONTACT_READ"
    ],
    "is_owner": false,
    "is_default": true,
    "is_full_access": false
}
Service Requests
GET /service_requests/settings
PUT /service_requests/settings
Get Service Request Settings
GET /service_requests/settings

Get the generic settings for Service Requests

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
numbering_schemes
Object

The type of the event

entity
string required

The entity for which the numbering scheme is configured

Enumeration:
INVOICES
CREDIT_NOTES
PAYMENTS
REFUNDS
ORDERS
SERVICE_REQUESTS
Example:
SERVICE_REQUESTS
prefix
string

The prefix of the numbering scheme. Defaults to the first letter(s) of the entity’s name

Example:
SR
starting_number
string

The starting number of the nuberig scheme (excluding prefix). Defaults to 10001

Default:
10001
Example:
0000001
number_of_digits
string

Number of digits (excluding prefix). Defaults to 5

Default:
5
Example:
7
last_number
string

The last number generated for this numbering scheme

Example:
SR000001
priorities_model
Object

Retreives the priority model configured for this organisation

impact
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
urgency
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
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/service_requests/settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "numbering_schemes": {
        "entity": "SERVICE_REQUESTS",
        "prefix": "SR",
        "starting_number": "0000001",
        "number_of_digits": "7",
        "last_number": "SR000001"
    },
    "priorities_model": {
        "impact": "HIGH",
        "urgency": "HIGH"
    }
}
Update Service Request Settings
PUT /service_requests/settings

Update generic service request settings

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
numbering_schemes
Array

Service request numbering scheme settings, service request numbers are automatically generated by the system

Object
entity
string

Entity name

Enumeration:
SERVICE_REQUESTS
Example:
SERVICE_REQUESTS
prefix
string

Service request number prefix

Example:
SR
starting_number
string

Starting number

Example:
00001
number_of_digits
integer

Number of digits for service request number, not including prefix

Example:
5
priorities_model
Object

Set up the service request priorities model based on impact and urgency

urgency
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
impact
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
priority
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH

Responses

200 OK

The request has succeeded

Body
Object
id
string

Service requets settings identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/service_requests/settings HTTP/1.1 

Content-Type: application/json

{
    "numbering_schemes": [
        {
            "entity": "SERVICE_REQUESTS",
            "prefix": "SR",
            "starting_number": "00001",
            "number_of_digits": 5
        }
    ],
    "priorities_model": {
        "urgency": "HIGH",
        "impact": "HIGH",
        "priority": "HIGH"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Queues

Queues define the stages that a Service Request will progress through until it’s closed. Multiple queues can be defined, and one of these must be assigned to each Service Request when it’s created.

POST /service_requests/queues
PUT /service_requests/queues/{id}
GET /service_requests/queues
GET /service_requests/queues/{id}
DELETE /service_requests/queues/{id}
DELETE /service_requests/queues/{id}/stages/{stage_id}
Create Service Request Queue
POST /service_requests/queues

Create a queue and it’s stages to be used for service requests. Optionally define alert times, closure times for the various priorities of the queue and permitted categories.

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

A unique name for the queue

Example:
Billing Issues
state
string

The state of the queue

Enumeration:
ACTIVE

Can be assigned to service requests

INACTIVE

Can’t be used

Example:
ACTIVE
stages
Array

Queue stages information

Object
order
string

The order of the stage within the queue

Example:
4
name
string required

The name of the queue stage

Example:
Corresponding with customer
description
string

Queue stage description

Example:
Agent is in communication with the customer to reslove the issue
colour
string required

The unique hex colour code representing the stage

Example:
#FAC8890
state
string required
Enumeration:
NEW
IN_PROGESS
CLOSED
CANCELLED
alert_times
Array
Object
priority
string

The priority relating to the alert/closure time

Enumeration:
URGENT
HIGH
MEDIUM
LOW
Example:
MEDIUM
time
integer

The unit of time relating to the alert/closure time

Example:
4
unit
string

The unit value relating to the alert/closure time setting

Enumeration:
MINUTES
HOURS
DAYS
WEEKS
MONTHS
Example:
HOUR
closure_times
Array
Object
priority
string

The priority relating to the alert/closure time

Enumeration:
URGENT
HIGH
MEDIUM
LOW
Example:
MEDIUM
time
integer

The unit of time relating to the alert/closure time

Example:
4
unit
string

The unit value relating to the alert/closure time setting

Enumeration:
MINUTES
HOURS
DAYS
WEEKS
MONTHS
Example:
HOUR
priority
Object

The default priority set for all service requests created for this queue

urgency
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
impact
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
categories
Array
Object
id
string

Service Request category id

Example:
b6e03e7c-6ff6-4a7b-934b-2367fe8383e0
Examples

Responses

201 Created
Body
Object
id
string

The unique id of the newly created service request queue

Example:
86f2a0df-7378-4a13-a908-ebc3589b08ba
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/service_requests/queues HTTP/1.1 

Content-Type: application/json

{
    "name": "Billing Issues",
    "state": "ACTIVE",
    "stages": [
        {
            "order": "4",
            "name": "Corresponding with customer",
            "description": "Agent is in communication with the customer to reslove the issue",
            "colour": "#FAC8890",
            "state": "CLOSED"
        }
    ],
    "alert_times": [
        {
            "priority": "MEDIUM",
            "time": 4,
            "unit": "HOUR"
        }
    ],
    "closure_times": [
        {
            "priority": "MEDIUM",
            "time": 4,
            "unit": "HOUR"
        }
    ],
    "priority": {
        "urgency": "HIGH",
        "impact": "HIGH"
    },
    "categories": [
        {
            "id": "b6e03e7c-6ff6-4a7b-934b-2367fe8383e0"
        }
    ]
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "86f2a0df-7378-4a13-a908-ebc3589b08ba"
}
Update Service Request Queue
PUT /service_requests/queues/{id}

Update an existing service request queue and it’s stages, as well as optional settings

Path variables

id
string required

The GUID of the queue to be updated

Example:
86f2a0df-7378-4a13-a908-ebc3589b08ba

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

A unique name for the queue

Example:
Billing Issues
state
string

The state of the queue

Enumeration:
ACTIVE

Can be assigned to a service request

INACTIVE

Can’t be assigned to a service request

Example:
ACTIVE
stages
Array

The queues’s stages

Object
order
string required

The order of the stage within the queue

Example:
3
name
string required

Stage name

Example:
Investigating
description
string

A short description of the stage

Example:
Investigating the problem
colour
string required

The unique hex colour code representing the queue stage

Example:
#2C8EF8
state
string required
Enumeration:
NEW
IN_PROGESS
CLOSED
CANCELLED
alert_times
Array
Object
priority
string

The priority relating to the alert/closure time

Enumeration:
URGENT
HIGH
MEDIUM
LOW
Example:
MEDIUM
time
integer

The unit of time relating to the alert/closure time

Example:
4
unit
string

The unit value relating to the alert/closure time setting

Enumeration:
MINUTES
HOURS
DAYS
WEEKS
MONTHS
Example:
HOUR
closure_times
Array
Object
priority
string

The priority relating to the alert/closure time

Enumeration:
URGENT
HIGH
MEDIUM
LOW
Example:
MEDIUM
time
integer

The unit of time relating to the alert/closure time

Example:
4
unit
string

The unit value relating to the alert/closure time setting

Enumeration:
MINUTES
HOURS
DAYS
WEEKS
MONTHS
Example:
HOUR
priority
Object

The default priority set for all service requests created for this queue f

urgency
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
impact
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
categories
Array
Object
id
string

Service Request category id

Example:
b6e03e7c-6ff6-4a7b-934b-2367fe8383e0
Examples

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated service request queue

Example:
86f2a0df-7378-4a13-a908-ebc3589b08ba
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/service_requests/queues/86f2a0df-7378-4a13-a908-ebc3589b08ba HTTP/1.1 

Content-Type: application/json

{
    "name": "Billing Issues",
    "state": "ACTIVE",
    "stages": [
        {
            "order": "3",
            "name": "Investigating",
            "description": "Investigating the problem",
            "colour": "#2C8EF8",
            "state": "NEW"
        }
    ],
    "alert_times": [
        {
            "priority": "MEDIUM",
            "time": 4,
            "unit": "HOUR"
        }
    ],
    "closure_times": [
        {
            "priority": "MEDIUM",
            "time": 4,
            "unit": "HOUR"
        }
    ],
    "priority": {
        "urgency": "HIGH",
        "impact": "HIGH"
    },
    "categories": [
        {
            "id": "b6e03e7c-6ff6-4a7b-934b-2367fe8383e0"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "86f2a0df-7378-4a13-a908-ebc3589b08ba"
}
List Service Request Queues
GET /service_requests/queues

Retrieve service request queues based on filtering options

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 for a queue using its name

Example:
Bill Queries

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

Retrieved service request queue information

Object
id
string

The GUID of the queue

Example:
86f2a0df-7378-4a13-a908-ebc3589b08ba
name
string

The name of the queue

Example:
Billing Issues
state
string

The state of the queue

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
number_of_stages
integer

Number of stages that the queue is comprised of

Example:
5
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/service_requests/queues HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "86f2a0df-7378-4a13-a908-ebc3589b08ba",
            "name": "Billing Issues",
            "state": "ACTIVE",
            "number_of_stages": 5
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Service Request Queue
GET /service_requests/queues/{id}

Retrieve a service request queue, it’s stages and any other optional settings

Path variables

id
string GUID required

The GUID of the queue whose details will be retrieved

Example:
bf58e2a0-f73b-4ebb-8425-92ff4253d6be

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

The GUID of the retrieved queue

Example:
bf58e2a0-f73b-4ebb-8425-92ff4253d6be
name
string

The queue’s name

Example:
Billing Issues
state
string

The state of the queue

Enumeration:
ACTIVE
INACTIVE
Example:
ACTIVE
stages
Array

The queue’s stages information

Object
id
string GUID

Queue stage id

Example:
86f2a0df-7378-4a13-a908-ebc3589b08ba
order
integer

Stage order within the queue

Example:
5
name
string

Stage name

Example:
Schedule Service
description
string

A short decsription of the stage

Example:
Technical team to schedule the service and notify customer
colour
string

The unique hex colour code of the stage

Example:
#FA89CB
state
string
Enumeration:
NEW
IN_PROGESS
CLOSED
CANCELLED
alert_times
Array
Object
id
string

Id of the alert/closure time setting

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
priority
string

The priority relating to the alert/closure time

Enumeration:
URGENT
HIGH
MEDIUM
LOW
Example:
MEDIUM
time
integer

The unit of time relating to the alert/closure time

Example:
4
unit
string

The unit value relating to the alert/closure time setting

Enumeration:
MINUTES
HOURS
DAYS
WEEKS
MONTHS
Example:
HOUR
closure_times
Array
Object
id
string

Id of the alert/closure time setting

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
priority
string

The priority relating to the alert/closure time

Enumeration:
URGENT
HIGH
MEDIUM
LOW
Example:
MEDIUM
time
integer

The unit of time relating to the alert/closure time

Example:
4
unit
string

The unit value relating to the alert/closure time setting

Enumeration:
MINUTES
HOURS
DAYS
WEEKS
MONTHS
Example:
HOUR
priority
Object

The default priority set for all service requests created for this queue

urgency
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
impact
string
Enumeration:
HIGH
MEDIUM
LOW
Example:
HIGH
categories
Array
Object
id
string

The root service request category id

Example:
b6e03e7c-6ff6-4a7b-934b-2367fe8383e0
name
string

The root category name

Example:
Technical issues
description
string

The root category description

Example:
Technical issues which can be managed remotely or on-site
sub_category
Array
Object
id
string

Sub-cateogry id

Example:
2f4ffc37-9463-4f17-9549-dd3cbc24f7e7
name
string

Sub-category name

Example:
Receiver Installation (on-site visit)
description
string

Sub-category description

Example:
Receiver installation including wiring
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/service_requests/queues/bf58e2a0-f73b-4ebb-8425-92ff4253d6be HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "bf58e2a0-f73b-4ebb-8425-92ff4253d6be",
    "name": "Billing Issues",
    "state": "ACTIVE",
    "stages": [
        {
            "id": "86f2a0df-7378-4a13-a908-ebc3589b08ba",
            "order": 5,
            "name": "Schedule Service",
            "description": "Technical team to schedule the service and notify customer",
            "colour": "#FA89CB",
            "state": "CANCELLED"
        }
    ],
    "alert_times": [
        {
            "id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
            "priority": "MEDIUM",
            "time": 4,
            "unit": "HOUR"
        }
    ],
    "closure_times": [
        {
            "id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
            "priority": "MEDIUM",
            "time": 4,
            "unit": "HOUR"
        }
    ],
    "priority": {
        "urgency": "HIGH",
        "impact": "HIGH"
    },
    "categories": [
        {
            "id": "b6e03e7c-6ff6-4a7b-934b-2367fe8383e0",
            "name": "Technical issues",
            "description": "Technical issues which can be managed remotely or on-site",
            "sub_category": [
                {
                    "id": "2f4ffc37-9463-4f17-9549-dd3cbc24f7e7",
                    "name": "Receiver Installation (on-site visit)",
                    "description": "Receiver installation including wiring"
                }
            ]
        }
    ]
}
Delete Service Request Queue
DELETE /service_requests/queues/{id}

Delete a service request queue. A queue can b deleted as long as there’s no pending Service Request (not completed yet) that uses the queue.

Path variables

id
string required

The GUID of the service request queue to be deleted

Example:
86f2a0df-7378-4a13-a908-ebc3589b08ba

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/service_requests/queues/86f2a0df-7378-4a13-a908-ebc3589b08ba HTTP/1.1 

HTTP/1.1 204 No Content 
Delete Service Request Queue Stage
DELETE /service_requests/queues/{id}/stages/{stage_id}

Delete a stage from a service request queue, and transfer any existing service requests currently in that stage to another stage in the same queue

Path variables

id
string required

The GUID of the queue whose stage will be deleted

Example:
2964aaff-df07-4798-b585-82a813800b3e
stage_id
string required

The GUID of the queue stage to be deleted

Example:
61c943c8-dfeb-4c09-a25c-b054f48bf244

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
stage_id
string

The new stage id to transfer to.

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/service_requests/queues/2964aaff-df07-4798-b585-82a813800b3e/stages/61c943c8-dfeb-4c09-a25c-b054f48bf244 HTTP/1.1 

Content-Type: application/json

{
    "stage_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}

HTTP/1.1 204 No Content 
Categories

Optionally setup categories to provide a business classification for Service Requests, categories can be defined in a hierarchical structure. Service Request can be assigned multiple categories, and can be used for reporting and filtering purposes.

POST /service_requests/categories
PUT /service_requests/categories/{id}
DELETE /service_requests/categories/{id}
GET /service_requests/categories
Create Service Request Category
POST /service_requests/categories

Create a category for service requests to be assigned 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

Request body

Object
name
string required

Name of the category. A Category’s name must be uniue within this category’s path.

Example:
Maintenance
descripion
string

The description of the category

Example:
General maintenance issues
parent_id
string GUID

The id of the parent category

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8

Responses

201 Created
Body
Object
id
string

The unique id of the newly created category

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/service_requests/categories HTTP/1.1 

Content-Type: application/json

{
    "name": "Maintenance",
    "descripion": "General maintenance issues",
    "parent_id": "33f6614d-0c25-4bc6-b360-fa74687956b8"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Service Request Category
PUT /service_requests/categories/{id}

Update an existing category to which service requests can be assigned to.

Path variables

id
string GUID required

The id of the category to be updated

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

Request body

Object
name
string required

Name of category that has to be unique across the cateogry’s path.

Example:
Maintenance
descripion
string

The description of the category

Example:
General maintenance issues
parent_id
string GUID

The id of the parent category

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8

Responses

201 Created
Body
Object
id
string

Id of the successfully updated service request category

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/service_requests/categories/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "name": "Maintenance",
    "descripion": "General maintenance issues",
    "parent_id": "33f6614d-0c25-4bc6-b360-fa74687956b8"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Service Request Categories
DELETE /service_requests/categories/{id}

Delete a service request category. A category cannot be deleted if:

  • It has been assigned to a service request
  • It has child categories, all of its child categories must be deleted first

Path variables

id
string GUID required

The id of the category to be deleted.

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

204 No Content

Successfully deleted

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/sr_categories/JGSFJHGSHGuy7767JHGSHJFG HTTP/1.1 
List Service Request Categories
GET /service_requests/categories

Return a list of all defined service request categories, or based on filtering parameters.

Request parameters

queue_id
string optional

Retrieve service request categories for a specific queue

Example:
93981d3b-68e6-4a01-915a-8690e5ad79aa
parent_id
string optional

Returns all cateogries under this parent category

Example:
9a2b1204-2f81-482f-873e-68b28e1de3e2
return_all
boolean optional

If set to ‘true’, then all categories are returned, regardless of their parent-child relation

Default:
false
search_value
string optional

Search for a category based on name and description

Example:
Maintenance
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
id
string GUID

The id of the category

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
name
string

The name of the category

Example:
Maintenance on location
description
string

The decsription of the category

Example:
General maintenance issues carried out on premises
child_nodes
integer

The number of child nodes (if a category is a parent category)

Example:
2
parent
Object

Details pertaining to the parent of this category (if a child category)

id
string GUID

The id of the parent category

Example:
dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

The name of the parent category

Example:
Maintenance
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/service_requests/categories?queue_id=93981d3b-68e6-4a01-915a-8690e5ad79aa HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
            "name": "Maintenance on location",
            "description": "General maintenance issues carried out on premises",
            "child_nodes": 2,
            "parent": {
                "id": "dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "Maintenance"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Closure Reasons

The following API’s relate to the ability to configure closure reasons for service requests. A closure reason must be provided for a service request in cases where a service request is closed without being resolved.

POST /service_requests/closure_reasons
PUT /service_requests/closure_reasons/{id}
GET /service_requests/closure_reasons
DELETE /service_requests/closure_reasons/{id}
Create Closure Reasons
POST /service_requests/closure_reasons

Creates specific closure reasons for service requests

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

Object
name
string required

Name of closure reason that as to be unique

Example:
Terminated account
description
string

Short description for closure reason

Example:
Customer has terminated their account

Responses

201 Created

Successfully created

Body
Object
id
string

The id of the successfully created closure reason

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
Example 1
POST https://sandbox.crm.com/backoffice/v2/service_requests/closure_reasons HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "name": "Terminated account",
    "description": "Customer has terminated their account"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Update Closure Reason
PUT /service_requests/closure_reasons/{id}

Update an existing closure reason for service requests

Path variables

id
string required

Id of the closure reason to be updated

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8

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

Object
name
string

Name of the closure reason. Name must be unique

Example:
Terminated account
description
string

Terminated account

Example:
Customer has terminated their account

Responses

200 OK
Body
Object
id
string

Id of the successfully updated closure reason

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
Example 1
PUT https://sandbox.crm.com/backoffice/v2/service_requests/closure_reasons/33f6614d-0c25-4bc6-b360-fa74687956b8 HTTP/1.1 

api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json

{
    "name": "Terminated account",
    "description": "Customer has terminated their account"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "33f6614d-0c25-4bc6-b360-fa74687956b8"
}
Get Closure Reasons
GET /service_requests/closure_reasons

Retrieves all closure reasons configured for service requests.

Responses

200 OK
Body
Object
content
Array
Object
id
string

The id of the closure reason

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
name
string

The name of the closure reason

Example:
Reffered to installer
description
string

The description of the closure reason

Example:
The service request has been handed over to the installation team
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

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
GET https://sandbox.crm.com/backoffice/v2/service_requests/closure_reasons HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "33f6614d-0c25-4bc6-b360-fa74687956b8",
            "name": "Reffered to installer",
            "description": "The service request has been handed over to the installation team"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Delete Closure Reason
DELETE /service_requests/closure_reasons/{id}

Deletes a closure reason. A reason can only be deleted if it was never used in any Service Request.

Path variables

id
string required

Id of the closure reason to be deleted

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8

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/service_requests/closure_reasons/33f6614d-0c25-4bc6-b360-fa74687956b8 HTTP/1.1 

HTTP/1.1 204 No Content 
Queue Application Settings

Configure the required default settings to enable service requests to be created from a self service platform.

GET /queues/{id}/application_settings
PUT /service_requests/queues/{id}/application_settings
Get Application Settings
GET /queues/{id}/application_settings

Retrieves the self service application settings configured for a specific queue.

Path variables

id
string required

Service Request Queue identifier

Example:
bf58e2a0-f73b-4ebb-8425-92ff4253d6be

Responses

200 OK
Body
Object
state
boolean

Enable the ability to create service requests from a self service platform?

Example:
true
classification
string

The classification name to be displayed on the self service platform for this queue. Required if state = true.

Example:
Billing Issues
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
tags
Array

List of tags added to every service request created from self service. This is applicable when state = true

string
Example:
["Sales","International"]
categories
Array

Default categories assigned to Service Requests raised through front-end platforms for this Service Request queue

string
Example:
["Technical","Service"]
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
GET https://sandbox.crm.com/backoffice/v2/queues/bf58e2a0-f73b-4ebb-8425-92ff4253d6be/application_settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "state": true,
    "classification": "Billing Issues",
    "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"
        }
    },
    "tags": [
        ""
    ],
    "categories": [
        ""
    ]
}
Update Application Settings
PUT /service_requests/queues/{id}/application_settings

Update the application settings for a single service request queue when creating a service request from a self-service platform.

Path variables

id
string required

The unique queue id for which application settings will be updated

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8

Request body

Object
state
boolean

Enable the ability to create service requests from a self service platform?

Example:
true
classification
string

The classification name to be displayed on the self service platform for this queue. Required if state = true.

Example:
Billing issues
assign_to
Object
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
tags
Array

List of tags that shall be added to every service request created from self service. This is optional when state = true and not required if state = false

string
Example:
["Sales","International"]
categories
Array

Default categories assigned to Service Requests raised through front-end platforms for this Service Request queue

string
Example:
["Technical","Service"]

Responses

200 OK
Body
Object
id
string

Id of successfully updated application settings for a service request queue

Example:
33f6614d-0c25-4bc6-b360-fa74687956b8
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
PUT https://sandbox.crm.com/backoffice/v2/service_requests/queues/33f6614d-0c25-4bc6-b360-fa74687956b8/application_settings HTTP/1.1 

Content-Type: application/json

{
    "state": true,
    "classification": "Billing issues",
    "assign_to": {
        "user_id": "1edef819-0a1d-4d41-9d2a-d4bbc2ddbedf",
        "team_id": "a43f08ca-998b-afbc-6ed4-c9dc2d136935"
    },
    "tags": [
        ""
    ],
    "categories": [
        ""
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "33f6614d-0c25-4bc6-b360-fa74687956b8"
}
Subscriptions
GET /subscriptions/settings
PUT /subscriptions/settings
GET /billing/settings
PUT /billing/settings
Get Subscription Settings
GET /subscriptions/settings

Retrieve Subscription Settings that include various Subscriptions business rules

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
automatic_deactivations
Object

Defines when services eligible to be deactivated will be picked up by the Service Delivery process to be deactivated.

deactivation_method
string required

Defines when the actual deactivation of a service will be performed by also considering the day and time at which the service was activated.

Enumeration:
BASED_ON_DAY

Deactivation will be performed during the day, regardless of the time the service was activated

BASED_ON_DAY_AND_HOUR

Deactivation will be performed be also considering the time at which the service was activated. Service is deactivated only afte rthis time of day

Default:
BASED_ON_DAY
Example:
BASED_ON_DAY
automatic_cancellations
Object

Defines the automatic cancellation process’s behaviour. Services being deactivated longer than the specified minimum period of time will be automatically cancelled.

minimum_period
integer required

The minimum deactivation period of time duration

Example:
3
uot
string required

The unit of time for the minimum deactivation period.

Enumeration:
DAYS
MONTHS
Default:
MONTHS
Example:
MONTHS
out_of_contract_cancellation
Object

Rules that describe when a subscriber is allowed to request for a cancellation of services when these are not in contract (contract period ended or service was never in contract).

allow_cancellation
string required

Settings on when the cancellation is allowed. Once must be specified

Enumeration:
ON_NOTICE

Requires a notice period befor cancellation

IMMEDIATELY

Immediate cancellation allowed

ON_NEXT_BILLING_CYCLE

Cancellation allowed only after the next billing cycle (from the next billing cycle’s start date - inclusive - and onwards)

Default:
IMMEDIATELY
Example:
ON_NEXT_BILLING_CYCLE
notice_period
Object

Applicable and required only if cancellation is allowed On notice

duration
string required

The notice period’s duration

Example:
1
uot
string required

The notice period unit of time

Enumeration:
DAYS
MONTHS
Default:
DAYS
Example:
MONTHS
in_contract_cancellation
Object

Rules that describe when a subscriber is allowed to request for a cancellation of services when these are still in contract.

allow_cancellation
string required

Settings on when the cancellation is allowed. Once must be specified

Enumeration:
IMMEDIATELY

Immediate cancellation allowed

ON_CONTRACT_END_DATE

Cancellation allowed only after the cotnract end date (from the contract end date - inclusive - and onwards)

ON_NEXT_BILLING_CYCLE

Cancellation allowed only after the next billing cycle (from the next billing cycle’s start date - inclusive - and onwards)

Default:
IMMEDIATELY
Example:
ON_CONTRACT_END_DATE
regret
Object

Rules that describe when a subscriber is allowed to request for a regret. If specified then a service can be regretted only X period after its first activation. After this period the service cannot be regretted, but it should be cancelled.

allow_regret
boolean required

Define whether service regret is allowed or not. If the business does not want to allow service regret, then it should be set to False. If allowed, then a period should be specified

Default:
true
Example:
true
regret_period
integer required nullable

Define when a service regret is allowed, e.g. 14 days after its activation . Mandatory if regret is allowed

Example:
14
uot
string required nullable

The regret period’s unit of time.Mandatory if regret is allowed

Enumeration:
DAYS
MONTHS
Default:
DAYS
Example:
DAYS
paused_period
Object

Rules that describe how ften and for long a customer can request a service pause. If no rules are specified, then no restrictions are applied hwn pausing a service.

days_per_year
Object nullable

How many days per year a service can be paused.

allowed_days
integer required

Maximum allowed number of days that a service can be paused within a year

Example:
30
starting_from
string required

Definition of the what is a “year” which maps to the service’s first activation date

Enumeration:
SERVICE_FIRST_EFFECTIVE_DATE

The service’s first activation date

Example:
SERVICE_FIRST_EFFECTIVE_DATE
times_per_year
Object nullable

How many times per year a service can be paused.

allowed_times
integer required

How many times within a year a service can be paused (regardless of each paused period’s duration)

Example:
3
starting_from
string required

Definition of the what is a “year”, i.e. if it’s the calencar year or a year starting from a service’s milestone like its activation date

Enumeration:
SERVICE_FIRST_EFFECTIVE_DATE

The service’s first activation date

Example:
SERVICE_FIRST_EFFECTIVE_DATE
days_per_pause
Object nullable

Restrction on the number of days for each paused period, i.e. everytime that a service is paused, the paused period will have a minimum and a maximum allowed duration. At least one of the tw settings must be specified.

minimum
integer nullable

The mininum number of days per paused period

Example:
3
maximum
integer nullable

The maximuum number of days per paused period

Example:
30
service_changes
Array

Rules that describe when a subscriber is allowed to request for a service change. A rule per service change type is allowed.

Object
change_type
string required

The service change type.

Enumeration:
UPGRADE
DOWGRADE
SWITCH
Example:
UPGRADE
allow_change
string required

Settings on when the service change is allowed. Once must be specified

Enumeration:
IMMEDIATELY

Immediate serice change is allowed

ON_NEXT_BILLING_CYCLE

Service change is allowed only after the next billing cycle (from the next billing cycle’s start date - inclusive - and onwards)

ON_CONTRACT_END_DATE

Service change is allowed only after the contract end date (from the cotnract end date - inclusive - and onwards)

Default:
IMMEDIATELY
Example:
ON_NEXT_BILLING_CYCLE
service_restrictions
Array

Rules that define the maximum number of services that a customer can subscribe to. Multiple rules can be specified but they have to be unique i.e. refer to different classification of account.

Object
maximum_services
integer required

Maximum number of services that a customer can subscribed to

Example:
5
account_classification
Object

The account classification of the customer. If specified, then restrictions are applied only to these customers.

id
string

The account classification’s unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

The account classification’s name

Example:
VIP
activation_rule
Object

Rule that determines if and when a service can remain Effective or it’s eligible to move into the Effective state

threshold
number

Account oustanding amount threshold. Service is eligible to go into Effective state if the oustanding amount is less than or equal to the threshold. If not specified, it defaults to 0. Always set in the business’s base currency

Example:
0.01
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
enable_automation
boolean

If automation is enabled, then service(s) are automatically activated once their outstanding Invoice is settled. When not enabled, then Actvation is performed on request. Activation is successfull as long as the threshold is met.

Default:
false
Example:
true
grace_period
Object

Rules that describe how often and for long a customer can request for a Grace period to avoif deactivation. If no rules are specified, then no restrictions are applied when applying a grace period to a subscription.

days_per_year
Object

How many days per year services can get a grace period.

allowed_days
integer

Number of days

Example:
30
starting_from
string

Definition of what is a year by setting a starting date

Enumeration:
INITIATION_DATE
Example:
INITIATION_DATE
times_per_year
Object

How many times a grace period can be provided to a subscription

allowed_times
integer

Number of times

Example:
3
starting_from
string

Definition of what is a year during which grace periods can be applied

Enumeration:
INITIATION_DATE
Example:
INITIATION_DATE
days_per_grace
Object

Minimum and maximum number of days per grace period

minimum
integer

Minimum number of days

Example:
5
maximum
integer

Maximum number of days

Example:
10
trial_period
Object

Trial Management rules

allowed_trials
string

Defines at which level the Trial period is applied. Trials are applied per Contact (i.e. contacts get a Trial service only once) or per Service (i.e. subscribing to a service also grants the contact a Trial period)

Enumeration:
CONTACT

Each contact can only get Trial service once

SERVICE

Apply trial once per subscribed service.

Default:
SERVICE
Example:
CONTACT
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/subscriptions/settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "automatic_deactivations": {
        "deactivation_method": "BASED_ON_DAY"
    },
    "automatic_cancellations": {
        "minimum_period": 3,
        "uot": "MONTHS"
    },
    "out_of_contract_cancellation": {
        "allow_cancellation": "ON_NEXT_BILLING_CYCLE",
        "notice_period": {
            "duration": "1",
            "uot": "MONTHS"
        }
    },
    "in_contract_cancellation": {
        "allow_cancellation": "ON_CONTRACT_END_DATE"
    },
    "regret": {
        "allow_regret": "true",
        "regret_period": 14,
        "uot": "DAYS"
    },
    "paused_period": {
        "days_per_year": {
            "allowed_days": 30,
            "starting_from": "SERVICE_FIRST_EFFECTIVE_DATE"
        },
        "times_per_year": {
            "allowed_times": 3,
            "starting_from": "SERVICE_FIRST_EFFECTIVE_DATE"
        },
        "days_per_pause": {
            "minimum": 3,
            "maximum": 30
        }
    },
    "service_changes": [
        {
            "change_type": "UPGRADE",
            "allow_change": "ON_NEXT_BILLING_CYCLE"
        }
    ],
    "service_restrictions": [
        {
            "maximum_services": 5,
            "account_classification": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "name": "VIP"
            }
        }
    ],
    "activation_rule": {
        "threshold": 0.01,
        "currency_code": "EUR",
        "enable_automation": "true"
    },
    "grace_period": {
        "days_per_year": {
            "allowed_days": 30,
            "starting_from": "INITIATION_DATE"
        },
        "times_per_year": {
            "allowed_times": 3,
            "starting_from": "INITIATION_DATE"
        },
        "days_per_grace": {
            "minimum": 5,
            "maximum": 10
        }
    },
    "trial_period": {
        "allowed_trials": "CONTACT"
    }
}
Update Subscription Settings
PUT /subscriptions/settings

Updates Subscriptions business rules.

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
automatic_deactivations
Object required

Defines the deactivation process’s behaviour

deactivation_method
string required

Defines when the actual deactivation of a service will be performed by also considering the day and time at which the service was activated.

Enumeration:
BASED_ON_DAY

Deactivation will be performed during the day, regardless of the time the service was activated

BASED_ON_DAY_AND_HOUR

Deactivation will be performed be also considering the time at which the service was activated. Service is deactivated only afte rthis time of day

Default:
BASED_ON_DAY
Example:
BASED_ON_DAY
automatic_cancellations
Object

Defines the automatic cancellation process’s behaviour. Services being deactivated longer than the specified minimum period of time will be automatically cancelled.If not specified, the automatic cancelledaitons are disabled.

minimum_period
integer required

The minimum deactivation period of time duration

Example:
3
uot
string required

The unit of time for the minimum deactivation period.

Enumeration:
DAYS
MONTHS
Example:
MONTHS
out_of_contract_cancellation
Object

Rules that describe when a subscriber is allowed to request for a cancellation of services when these are not in contract (contract period ended or service was never in contract).

allow_cancellation
string required

Settings on when the cancellation is allowed. Once must be specified

Enumeration:
IMMEDIATELLY

Immediate cancellation allowed

ON_NOTICE

Requires a notice period befor cancellation

ON_NEXT_BILLING_CYCLE

Cancellation allowed only after the next billing cycle (from the next billing cycle’s start date - inclusive - and onwards)

Default:
IMMEDIATELLY
Example:
ON_NOTICE
notice_period
Object required nullable

Applicable and required only if cancellation is allowed On notice

duration
string required

The notice period’s duration

Example:
30
uot
string required

The notice period’s unit of time

Enumeration:
DAYS
MONTHS
Default:
DAYS
Example:
DAYS
in_contract_cancellation
Object

Rules that describe when a subscriber is allowed to request for a cancellation of services when these are still in contract.

allow_cancellation
string required

Settings on when the cancellation is allowed. Once must be specified

Enumeration:
IMMEDIATELLY

Immediate cancellation allowed

ON_CONTRACT_END_DATE

Cancellation allowed only after the cotnract end date (from the contract end date - inclusive - and onwards)

ON_NEXT_BILLING_CYCLE

Cancellation allowed only after the next billing cycle (from the next billing cycle’s start date - inclusive - and onwards)

Default:
IMMEDIATELLY
Example:
ON_NEXT_BILLING_CYCLE
regret
Object

Rules that describe when a subscriber is allowed to request for a regret. If specified then a service can be regretted only X period after its first activation. After this period the service cannot be regretted, but it should be cancelled.

allow_regret
boolean required

Define whether service regret is allowed or not. If the business does not want to allow service regret, then it should be set to False. If allowed, then a period should be specified

Default:
false
Example:
true
regret_period
integer required nullable

Define when a service regret is allowed, e.g. 14 days after its activation . Mandatory if regret is allowed

Example:
14
uot
string

The regret period’s unit of time.Mandatory if regret is allowed

Enumeration:
DAYS
MONTHS
Default:
DAYS
Example:
DAYS
paused_period
Object

Rules that describe how ften and for long a customer can request a service pause. If no rules are specified, then no restrictions are applied hwn pausing a service.

days_per_year
Object nullable

How many days per year a service can be paused.

allowed_days
integer required

Maximum allowed number of days that a service can be paused within a year

Example:
30
starting_from
string required

Definition of the what is a “year” which maps to the service’s first activation date

Enumeration:
SERVICE_FIRST_EFFECTIVE_DATE

The service’s first activation date

Example:
SERVICE_FIRST_EFFECTIVE_DATE
times_per_year
Object nullable

How many times per year a service can be paused.

allowed_times
integer required

How many times within a year a service can be paused (regardless of each paused period’s duration)

Example:
3
starting_from
string required

Definition of the what is a “year”, i.e. if it’s the calencar year or a year starting from a service’s milestone like its activation date

Enumeration:
SERVICE_FIRST_EFFECTIVE_DATE

The service’s first activation date

Example:
FIRST_DAY_OF_YEAR
days_per_pause
Object nullable

Restrction on the number of days for each paused period, i.e. everytime that a service is paused, the paused period will have a minimum and a maximum allowed duration. At least one of the tw settings must be specified.

minimum
integer nullable

The mininum number of days per paused period

Example:
1
maximum
integer nullable

The maximum number of days per paused period

Example:
5
service_changes
Array

Rules that describe when a subscriber is allowed to request for a service change. A rule per service change type is allowed.

Object
change_type
string required

Service change type

Enumeration:
UPGRADE
DOWNGRADE
SWITCH
Example:
UPGRADE
allow_change
string required

Settings on when the service change is allowed. Once must be specified

Enumeration:
IMMEDIATELLY

Immediate serice change is allowed

ON_NEXT_BILLING_CYCLE

Service change is allowed only after the next billing cycle (from the next billing cycle’s start date - inclusive - and onwards)

ON_CONTRACT_END_DATE

Service change is allowed only after the contract end date (from the cotnract end date - inclusive - and onwards)

Default:
IMMEDIATELLY
Example:
ON_NEXT_BILLING_CYCLE
service_restrictions
Array

Rules that define the maximum number of services that a customer can subscribe to. Multiple rules can be specified but they have to be unique i.e. refer to different classification of account.

Object
maximum_services
integer

Maximum number of services that a customer can subscribed to

Example:
5
account_classification_id
string

The account classification of the customer. If specified, then restrictions are applied only to these customers.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
activation_rule
Object

Rule that determines if and when a service can remain Effective or it’s eligible to move into the Effective state

threshold
number

Account oustanding amount threshold. Service is eligible to go into Effective state if the oustanding amount is less than or equal to the threshold. If not specified, it defaults to 0. Always set in the business’s base currency

Example:
0.01
enable_automation
boolean

If automation is enabled, then service(s) are automatically activated once their outstanding Invoice is settled. When not enabled, then Actvation is performed on request. Activation is successfull as long as the threshold is met.

Default:
false
Example:
true
grace_period
Object nullable

Rules that describe how often and for long a customer can request for a Grace period to avoif deactivation. If no rules are specified, then no restrictions are applied when applying a grace period to a subscription.

days_per_year
Object nullable

How many days per year services can get a grace period.

allowed_days
integer required

Number of days

Example:
30
starting_from
string required

Definition of what is a year by setting a starting date

Enumeration:
INITIATION_DATE
Example:
INITIATION_DATE
times_per_year
Object nullable

How many times a grace period can be provided to a subscription

allowed_times
integer required

Number of times

Example:
3
starting_from
string required

Definition of what is a year during which grace periods can be applied

Enumeration:
INITIATION_DATE
Example:
INITIATION_DATE
days_per_grace
Object nullable

Minimum and maximum number of days per grace period

minimum
integer nullable

Minimum number of days

Example:
3
maximum
integer nullable

Maximum number of days

Example:
6
trial_period
Object

Trial Management Rules

allowed_trials
string required

Defines at which level the Trial period is applied. Trials are applied per Contact (i.e. contacts get a Trial service only once) or per Service (i.e. subscribing to a service also grants the contact a Trial period)

Enumeration:
CONTACT

Each contact can only get Trial service once

SERVICE

Apply trial once per subscribed service.

Default:
SERVICE

Responses

200 OK
Body
Object
id
string

Unique identifier of subscirption settings

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/subscriptions/settings HTTP/1.1 

Content-Type: application/json

{
    "automatic_deactivations": {
        "deactivation_method": "BASED_ON_DAY"
    },
    "automatic_cancellations": {
        "minimum_period": 3,
        "uot": "MONTHS"
    },
    "out_of_contract_cancellation": {
        "allow_cancellation": "ON_NOTICE",
        "notice_period": {
            "duration": "30",
            "uot": "DAYS"
        }
    },
    "in_contract_cancellation": {
        "allow_cancellation": "ON_NEXT_BILLING_CYCLE"
    },
    "regret": {
        "allow_regret": true,
        "regret_period": 14,
        "uot": "DAYS"
    },
    "paused_period": {
        "days_per_year": {
            "allowed_days": 30,
            "starting_from": "SERVICE_FIRST_EFFECTIVE_DATE"
        },
        "times_per_year": {
            "allowed_times": 3,
            "starting_from": "FIRST_DAY_OF_YEAR"
        },
        "days_per_pause": {
            "minimum": 1,
            "maximum": 5
        }
    },
    "service_changes": [
        {
            "change_type": "UPGRADE",
            "allow_change": "ON_NEXT_BILLING_CYCLE"
        }
    ],
    "service_restrictions": [
        {
            "maximum_services": 5,
            "account_classification_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "activation_rule": {
        "threshold": 0.01,
        "enable_automation": "true"
    },
    "grace_period": {
        "days_per_year": {
            "allowed_days": 30,
            "starting_from": "INITIATION_DATE"
        },
        "times_per_year": {
            "allowed_times": 3,
            "starting_from": "INITIATION_DATE"
        },
        "days_per_grace": {
            "minimum": 3,
            "maximum": 6
        }
    },
    "trial_period": {
        "allowed_trials": "SERVICE"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Get Billing Settings
GET /billing/settings

Retrieve general settings that define Billing business rules.

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
calendar_billing
Object

Calendar billing defines whether subscribers will be billed on their services’ Annniversary or on a specific Period. In the first case, service is billind on its urchase Anniversay day of month, in the case of PEriod billing, all services among all subscribers are billing on a defined day of month

type
string required

Applies Anniversary or Period Billing

Enumeration:
ANNIVERSARY
PERIOD
Default:
ANNIVERSARY
Example:
ANNIVERSARY
billing_day
integer required nullable

Applicable and mandatory for Period billing. This is the day of month from which all services will be billed

Example:
1
reset_billing_period
Object

Defines when and if a subscription’s billing cycle will be reset. Applicable only for Anniversary billing. A subscription’s billing periodis reset when the event being performed affects all of the subscription’s services.

on_events
Array

Set of events on which the billing period will be reset based on the event’s performed date. If none is selected, then billing period is never reset.

string
Enumeration:
REACTIVATE

Service re-activated after a Deactivation period.

UPGRADE

Service upgraded

DOWNGRADE

Service downgraded

RESUME

Service re-activated after a Paused Period

Example:
REACTIVATE
additional_billable_states
Object

By default services are billed only for the Effective period. This list includes any other service states which are additinally billable

states
Array

List of subscription service states considered as additional billable ones.

Min items: 1
Unique items: YES
Example:
["NOT_EFFECTIVE"]
string
Enumeration:
NOT_EFFECTIVE
PAUSED
services
Array

List of service products for which the additional billable states are applied. If not specified, then all services will be additionally billed. Only termed services can be specified

Object
id
string

Service product identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
sku
string

Product SKU

Example:
FILMS001
name
string

Product name

Example:
Films
non_creditable_states
Object

A set of subscription service life cycle states that will be considered as non creditable ones during billing. By default, only the Draft and Effective life cycle states are considered as non creditable

states
Array

List of service states considered as nono-creditable ones

Min items: 1
Example:
["NOT_EFFECTIVE"]
string
Enumeration:
NOT_EFFECTIVE
PAISED
CANCELLED
services
Array

List of service products for which the non-creditable states are applied. If not specified, then all services will be considered as non-creditable. Only termed services can be specified

Object
id
string

Service product identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
sku
string

Product SKU

Example:
SPORTS001
name
string

Product name

Example:
Sports
rating
Object

Defines billing rules on when and how services will be billed

bill_in_advance
Object

By default, services are billed on their billing day of month. If this settng is specified, then servces can be billed in advance a specific period prior the next billing cycle begins

period
integer required

The period’s value

Example:
3
uot
string required

The period’s unit of time

Enumeration:
DAYS
MONTHS
Default:
DAYS
Example:
DAYS
prorate_period
Object

Specifies whether sevice’s billing will be prorated or not

enabled
boolean required

Enable service proration

Default:
false
Example:
true
threshold_day
integer required

The day of month used as a threshold to deide whether the service is prorated or not. If service is purchased prior this day, then the service is not prorated. Required if proratng is enabled

Example:
15
invoicing
Object

Defines how invoices and/or credit notes will be generated during recurring billing. If not specified, then the default financial transaction types are used.

invoice_type
Object

The Invoie financial transaction’s type

id
string

The unique identifier od the financal transaction type

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

Tha name of financial trasnaciton type

Example:
BR Invoice
credit_note_type
Object

The Credit Note’s financial transaction’s type

id
string

The unique identifier of the financal transaction type

Example:
3dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

The name of the financial transaction type

Example:
BR Credit Note
usage_billing
Object

Usage Billing Settings

verify_allowance
boolean

Defines whether usage allowance is verified when a usage record is processed or not. If set to True, then usage record is posted only if there’s remaining allowance enough to cover the record’s usage amount, otherwise it gets Rejected. If set to False, then remaining allowance is not verified on posting the record.

Default:
true
Example:
true
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/billing/settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "calendar_billing": {
        "type": "ANNIVERSARY", 
        "billing_day": 1,
        "reset_billing_period": {
            "on_events": [
                "REACTIVATE"
            ]
        }
    },
    "additional_billable_states": {
        "states": [
            "PAUSED"
        ],
        "services": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "FILMS001",
                "name": "Films"
            }
        ]
    },
    "non_creditable_states": {
        "states": [
            "NOT_EFFECTIVE"
        ],
        "services": [
            {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "SPORTS001",
                "name": "Sports"
            }
        ]
    },
    "rating": {
        "bill_in_advance": {
            "period": 3,
            "uot": "DAYS"
        },
        "prorate_period": {
            "enabled": true,
            "threshold_day": 15
        }
    },
    "invoicing": {
        "invoice_type": {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "BR Invoice"
        },
        "credit_note_type": {
            "id": "3dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "BR Credit Note"
        }
    },
    "usage_billing": {
        "verify_allowance": "true"
    }
}
Update Billing Settings
PUT /billing/settings

Update general billing settings

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
calendar_billing
Object

Calendar billing defines whether subscribers will be billed on their services’ Annniversary or on a specific Period. In the first case, service is billind on its urchase Anniversay day of month, in the case of PEriod billing, all services among all subscribers are billing on a defined day of month

type
string required

Applies Anniversary or Period Billing

Enumeration:
ANNIVERSARY
PERIOD
Default:
ANNIVERSARY
Example:
ANNIVERSARY
billing_day
integer

Applicable and mandatory for Period billing. this is the day of month from which all services will be billed

Example:
1
reset_billing_period
Object

Defines when and if a subscription’s billing cycle will be reset. Applicable only for Anniversary billing. A subscription’s billing periodis reset when the event being performed affects all of the subscription’s services.

on_events
Array

Set of events on which the billing period will be reset based on the event’s performed date. If none is selected, then billing period is never reset.

string
Enumeration:
REACTIVATE

Service re-activated after a Deactivation period.

UPGRADE

Service upgraded

DOWNGRADE

Service upgraded

RESUME

Service re-activated after a Paused Period

additional_billable_states
Object

By default services are billed only for the Effective period. This list includes any other service states which are additinally billable

states
Array
Example:
["NOT_EFFECTIVE"]
string
Enumeration:
NOT_EFFECTIVE
PAUSED
services
Array

List of services product idnetifiers for which the additional billable states are applied. If not specified, then all services will be additionally billed. Only termed service products can be specified

Unique items: YES
Example:
[
    "4dc0809f-ed91-4b68-b912-5bd6064d901e"
]
string
Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
non_creditable_states
Object

A set of subscription service life cycle states that will be considered as non creditable ones during billing. By default, only the Draft and Effective life cycle states are considered as non creditable

states
Array
Example:
["NOT_EFFECTIVE"]
string
Enumeration:
NOT_EFFECTIVE
PAUSED
CANCELLED
services
Array

List of services product idnetifiers for which the non-creditable states are applied. If not specified, then all services will be considered as non-creditable. Only termed service products can be specified

Example:
[
    "4dc0809f-ed91-4b68-b912-5bd6064d901e"
]
string
Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
rating
Object

Defines billing rules on when and how services will be billed

bill_in_advance
Object

By default, services are billed on their billing day of month. If this settng is specified, then servces can be billed in advance a specific period prior the next billing cycle begins

period
integer required

The period’s value

Example:
3
uot
string required

The period’s unit of time

Enumeration:
DAYS
MONTHS
Example:
DAYS
prorate_period
Object

Specifies whether sevice’s billing will be prorated or not

enabled
boolean required

Enable service proration

Default:
false
Example:
true
threshold_day
integer

The day of month used as a threshold to deide whether the service is prorated or not. If service is purchased prior this day, then the service is not prorated. Required if proratng is enabled

Example:
15
invoicing
Object

Defines how invoices and/or credit notes will be generated during recurring billing. If not specified, then the default financial transaction types are used.

invoice_type_id
string

The invoice type’s unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
credit_note_type_id
string

The credit note type’s unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
usage_billing
Object

Usage Billing Settings

verify_allowance
boolean

Defines whether usage allowance is verified when a usage record is processed or not. If set to True, then usage record is posted only if there’s remaining allowance enough to cover the record’s usage amount, otherwise it gets Rejected. If set to False, then remaining allowance is not verified on posting the record.

Example:
true

Responses

200 OK
Body
Object
id
string

Unique identifier of Billing Settings

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/billing/settings HTTP/1.1 

Content-Type: application/json

{
    "calendar_billing": {
        "type": "ANNIVERSARY",
        "billing_day": 1,
        "reset_billing_period": {
            "on_events": [
                "DOWNGRADE"
            ]
        }
    },
    "additional_billable_states": {
        "states": [
            "PAUSED"
        ],
        "services": [
            "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        ]
    },
    "non_creditable_states": {
        "states": [
            "NOT_EFFECTIVE"
        ],
        "services": [
            "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        ]
    },
    "rating": {
        "bill_in_advance": {
            "period": 3,
            "uot": "DAYS"
        },
        "prorate_period": {
            "enabled": true,
            "threshold_day": 15
        }
    },
    "invoicing": {
        "invoice_type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
        "credit_note_type_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
    },
    "usage_billing": {
        "verify_allowance": "true"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Subscription Action Categories
GET /actions/categories
GET /action/categories/{id}
POST /actions/categories
PUT /actions/categories/{id}
DELETE /actions/categories/{id}
List Subscription Action Categories
GET /actions/categories

Returns a list of subscription action categories

Request parameters

search_value
string optional

Search for action categories using their name

business_classification_code
string optional

The business classification code of the category

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
content
Array
Object
id
string

The unique identifier of the action category

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

The action category name

Example:
Cancellation due to cost
description
string

The action category description

Example:
Service cancelled due to high monthly cost
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/actions/categories HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Cancellation due to cost",
            "description": "Service cancelled due to high monthly cost"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Subscription Action Category
GET /action/categories/{id}

Returns a single subscription action category

Path variables

id
string required

The action category identifier

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 OK
Body
Object
name
string

The action category name

Example:
Cancellation due to cost
description
string

The action category description

Example:
Cancellation due to high monthly cost
actions
Array

List of subscription actions business classification codes

Min items: 1
Object
behaviour_code
string required

The action’s behaviour code

Enumeration:
REMOVE_SERVICE
CHANGE_SERVICE
GRACE_PERIOD
Example:
CHANGE_SERVICE
business_classification_code
string required

The action’s business classification code

Enumeration:
CANCEL_SERVICE

Applicable when business code is set to Remove Service

REGRET_SERVICE

Applicable when business code is set to Remove Service

UPGRADE_SERVICE

Applicable when business code is set to Change Service

DOWNGRADE_SERVICE

Applicable when business code is set to Change Service

GRACE_PERIOD

Applicable when business code is set to Grace Period

Example:
DOWNGRADE_SERVICE
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/action/categories/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "Cancellation due to cost",
    "description": "Cancellation due to high monthly cost",
    "actions": [
        {
            "behaviour_code": "CHANGE_SERVICE",
            "business_classification_code": "DOWNGRADE_SERVICE"
        }
    ]
}
Create Subscription Action Category
POST /actions/categories

Creates a new subscription action category

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 action category’s name which has to be unique across all categories

Example:
Cancellation due to cost
description
string

The action category’s description

Example:
Cancellation because of high monthly cost
actions
Array required

List of subscription actions business classification codes

Min items: 1
Unique items: YES
Object
behaviour_code
string required

The behaviour code fo the action

Enumeration:
REMOVE_SERVICE
CHANGE_SERVICE
GRACE_PERIOD
Example:
CHANGE_SERVICE
business_classification_code
string required

The business classification code of the action

Enumeration:
CANCEL_SERVICE

Applicable when business code is set to Remove Service

REGRET_SERVICE

Applicable when business code is set to Remove Service

UPGRADE_SERVICE

Applicable when business code is set to Change Service

DOWNGRADE_SERVICE

Applicable when business code is set to Change Service

GRACE_PERIOD

Applicable when business code is set to Grace Period

Example:
DOWNGRADE_SERVICE

Responses

200 OK
Body
Object
id
string

The unique identifier of the subscription action category

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/actions/categories HTTP/1.1 

Content-Type: application/json

{
    "name": "Cancellation due to cost",
    "description": "Cancellation because of high monthly cost",
    "actions": [
        {
            "behaviour_code": "CHANGE_SERVICE",
            "business_classification_code": "DOWNGRADE_SERVICE"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Update Subscription Action Category
PUT /actions/categories/{id}

Updates an existing subscription action category

Path variables

id
string required

The unique identifier of the subscription action category

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

Request body

Object
name
string

The action category’s name which has to be unique across all categories

Example:
Cancellation due to cost
description
string

The action category’s description

Example:
Cancellation because of high monthly cost
actions
Array required
Min items: 1
Unique items: YES
Object
behaviour_code
string required

The behaviour code of the action

Enumeration:
REMOVE_SERVICE
CHANGE_SERVICE
GRACE_PERIOD
Example:
CHANGE_SERVICE
business_classification_code
string required

The business classification code of the action

Enumeration:
CANCEL_SERVICE

Applicable when business code is se to Remove Service

REGRET_SERVICE

Applicable when business code is se to Remove Service

UPGRADE_SERVICE

Applicable when business code is set to Change Service

DOWNGRADE_SERVICE

Applicable when business code is set to Change Service

GRACE_PERIOD

Applicable when business code is set to Grace Period

Example:
UPGRADE_SERVICE

Responses

200 OK
Body
Object
id
string

The unique identifier of the subscription action category

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/actions/categories/{id} HTTP/1.1 

Content-Type: application/json

{
    "name": "Cancellation due to cost",
    "description": "Cancellation because of high monthly cost",
    "actions": [
        {
            "behaviour_code": "CHANGE_SERVICE",
            "business_classification_code": "UPGRADE_SERVICE"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Delete Subscription Action Category
DELETE /actions/categories/{id}

Deletes a subscrpion action category

Path variables

id
string required

The action category identifier

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

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/actions/categories/{id} HTTP/1.1 

HTTP/1.1 204 No Content 
Event-based Charges

List of Web aPIs for creating and managing Event-based Charges

GET /subscription/charges
PUT /subscriptions/charges
Get Event-based Charges
GET /subscription/charges

Returns the list of event-based charges

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
id
string

The unique identifier of the event-based conditional charge

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
apply_on
string

Defines when the charge will be applied if the conditions are met

Enumeration:
IMMEDIATELLY

The charge is immediatelly invoiced

NEXT_BILLING_CYCLE

The charge is included in the upcoming bill

Default:
IMMEDIATELLY
Example:
NEXT_BILLING_CYCLE
event
string

The event that will trigger this rule.

Enumeration:
INITIATION
ACTIVATION
DEACTIVATION
CANCELLATION
DOWNGRADE
Example:
CANCELLATION
expense
Object

The expense service that will be invoiced

id
string

The unique identifier of the expense

Example:
90c0809f-ed91-4b68-b912-5bd6064d901e
sku
string

The expense’s SKU

Example:
CANCEL01
name
string

The expenses name

Example:
Cancellation Fee
conditions
Array

A set of conditions that should be met in order for the expense to be applied. Multiple conditinos can be set up. The event-based charge is appied when at least one condition is met.

Object
id
string

Unique identifer of the condition

Example:
10c0809f-ed91-4b68-b912-5bd6064d901e
in_contract
boolean

The service should be in contract period for the expense to be applied?

Default:
false
Example:
true
existing_service
Object

The service on which the subscription event is performed on

item_type
string

Define whether the condition applies for a product, a product type or a family.

Enumeration:
PRODUCT
TYPE
FAMILY
Example:
TYPE
item_id
string

The unique identifier of the product, type or family

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
item_name
string

The name of the product, type or family

Example:
Add-ons
change_to_service
Object

The service to which a service changes to. Applicable only for Downgrade subscription events

item_type
string

Define whether the condition applies for a product, a product type or a family.

Enumeration:
PRODUCT
TYPE
FAMILY
Example:
PRODUCT
item_id
string

The unique identifier of the product, type or family

Example:
3dc0809f-ed91-4b68-b912-5bd6064d901e
item_name
string

The name of the product, type or family

Example:
Gold
contract_started
Object

The condition is met if the subscription event occurs a period after the contract started. Applicable only if the condition is applied while the sevice is still in contract

period
string

The period’s value

Example:
1
uot
string

The period’s unit of time

Enumeration:
DAYS
MONTHS
Example:
MONTHS
contract
Object

The service’s contract period, in terms of duration

duration
integer

The contract period’s duration

Example:
12
uot
string

The unit of time of the contract period

Enumeration:
DAYS
MONTHS
YEARS
Example:
MONTHS
in_previous_state
Object

Expense is applied only if the service was in the same state for a minimum period of time before the event was performed.

period
string required

The value for the period of time

Example:
60
uot
string required

Period’s unit of time

Enumeration:
DAYS
MONTHS
YEARS
Example:
DAYS
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/subscription/charges HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "apply_on": "NEXT_BILLING_CYCLE",
            "event": "CANCELLATION",
            "expense": {
                "id": "90c0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "CANCEL01",
                "name": "Cancellation Fee"
            },
            "conditions": [
                {
                    "id": "10c0809f-ed91-4b68-b912-5bd6064d901e",
                    "in_contract": true,
                    "existing_service": {
                        "item_type": "TYPE",
                        "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "item_name": "Add-ons"
                    },
                    "change_to_service": {
                        "item_type": "PRODUCT",
                        "item_id": "3dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "item_name": "Gold"
                    },
                    "contract_started": {
                        "period": "1",
                        "uot": "MONTHS"
                    },
                    "contract": {
                        "duration": 12,
                        "uot": "MONTHS"
                    },
                    "in_previous_state": {
                        "period": "60",
                        "uot": "DAYS"
                    }
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Event-based Charges
PUT /subscriptions/charges

Updates the list of event-based charges

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Request body

Object
content
Array
Object
apply_on
string required

Defines when the charge will be applied if the conditions are met

Enumeration:
IMMEDIATELLY
ON_NEXT_BILLING_CYCLE
Default:
IMMEDIATELLY
Example:
ON_NEXT_BILLING_CYCLE
event
string required

The event that will trigger this rule.

Enumeration:
INITIATION
ACTIVATION
DEACTIVATION
CANCELLATION
DOWNGRADE
SWITCH
Example:
DOWNGRADE
expense_id
string required

The expense service that will be invoiced. This is a product classified as an Expense service.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
conditions
Array

A set of conditions that should be met in order for the expense to be applied. Conditions are optional but if one should be specified, then at least one of its criteria must be set.

Object
in_contract
boolean nullable

The service should be in contract period.

Default:
false
Example:
true
existing_service
Object nullable

The service on which the subscription eent is performed on

item_type
string required

Define whether the condition applies for a product, a product type or a family.

Enumeration:
PRODUCT
TYPE
FAMILY
Example:
PRODUCT
item_id
string required

The unique identifie rof the product, product type or family.

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
change_to_service
Object nullable

The service to which a service changes to. Applicable only for Downgrade and Switch subscription events

item_type
string required

Define whether the condition applies for a product, a product type or a family.

Enumeration:
PRODUCT
TYPE
FAMILY
Example:
PRODUCT
item_id
string required

The unique identifie rof the product, product type or family.

Example:
2ac0809f-ed91-4b68-b912-5bd6064d901e
contract
Object nullable

The service’s contract period duration.

duration
integer required

The contract period’s duration

Example:
12
uot
string required

The contract period’s unit of time

Enumeration:
DAYS
MONTHS
YEARS
Example:
MONTHS
contract_started
Object nullable

The condition is met if the subscription event occurs a period after the contract started. Applicable only if the condition is applied while the sevice is still in contract

period
integer required

The period’s value

uot
string required

The period’s unit of time

Enumeration:
DAYS
MONTHS
YEARS
Example:
MONTHS
in_previous_state
Object nullable

Expense is applied only if the service was in the same state for a minimum period of time before the event was performed.

period
string required

The value for the period of time

Example:
6
uot
string required

Period’s unit of time

Enumeration:
DAYS
MONTHS
YEAR
Example:
MONTHS
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

Responses

200 OK
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/subscriptions/charges HTTP/1.1 

Content-Type: application/json

{
    "content": [
        {
            "apply_on": "ON_NEXT_BILLING_CYCLE",
            "event": "DOWNGRADE",
            "expense_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "conditions": [
                {
                    "in_contract": true,
                    "existing_service": {
                        "item_type": "PRODUCT",
                        "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
                    },
                    "change_to_service": {
                        "item_type": "PRODUCT",
                        "item_id": "2ac0809f-ed91-4b68-b912-5bd6064d901e"
                    },
                    "contract": {
                        "duration": 12,
                        "uot": "MONTHS"
                    },
                    "contract_started": {
                        "period": 1,
                        "uot": "MONTHS"
                    },
                    "in_previous_state": {
                        "period": "6",
                        "uot": "MONTHS"
                    }
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}

HTTP/1.1 200 OK 
Event-based Recurring Charges

Event-based recurring charges is a set of policies triggered on various subscription events that identify if and which Expenses will be applied on a subscription and will be charged on a recurring basis, i.e per subscriber billing cycle. Recurring charges policies include two major events the event that will add the recurring expense on the subscription and the event that will remove it.

GET /subscriptions/recurring_charges
PUT /subscriptions/recurring_charges
Get Event-based Recurring Charges
GET /subscriptions/recurring_charges

Returns the list of configured event-based recurring charges

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

Event-based recurring charge policy identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
event_to_apply
string

The event that adds the recurring expense on the subscription

Enumeration:
INITIATION

Service set to Effective state for the first time

ENABLE_ON_DEVICE

Service enabled on a device

Example:
INITIATION
event_to_terminate
string

The event that adds the recurring expense on the subscription

Enumeration:
REMOVE

Service removed from a subscription

DISABLE_FROM_DEVICE

Service disabled from a service

Example:
REMOVE
expense
Object

The expense service that will be added/removed from the subscription

id
string

Expense product identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
sku
string

Expense product SKU

Example:
RFEE
name
string

Expense product name

Example:
Rental Fee
conditions
Array

Set of conditions that should be met to apply the policy.

Object
in_contract
boolean

Policy applied when the service is in contract

Example:
true
contract_period
Object

The service’s contract period

duration
integer

Contract period duration

Example:
12
uot
string

Contrat period’s unit of time

Enumeration:
DAYS
MONTHS
YEARS
Example:
MONTHS
service
Object

The event’s service. The service is represented by a specific product or it migth be a service products fo a specific type

item_type
string

What’s the item’s type

Enumeration:
PRODUCT
TYPE
FAMILY
Example:
TYPE
item_id
string

The item’s identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
item_name
string

The item’s name

Example:
TV Services
enabled_devices
integer

The minimum number of devices on which th service is already enabled on. Applicable only if the event in Enable service to a device. The policy is applied if the service is already enabled on at least this number of devices(excluding the event’s device)

Example:
1
device
Object

Defines to which devices the service is enabled on for the condition to apply. Optional and applicable when enabled_devices is set. This setting refers to the device’s product specification

item_type
string

The devicee’s product specification. A device might be of a specific product or any product of a type

Enumeration:
PRODUCT
TYPE
Example:
PRODUCT
item_id
string

The item’s identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
item_name
string

The item’s name

Example:
HD Decoder
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/subscriptions/recurring_charges HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "event_to_apply": "INITIATION",
            "event_to_terminate": "REMOVE",
            "expense": {
                "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                "sku": "RFEE",
                "name": "Rental Fee"
            },
            "conditions": [
                {
                    "in_contract": true,
                    "contract_period": {
                        "duration": 12,
                        "uot": "MONTHS"
                    },
                    "service": {
                        "item_type": "TYPE",
                        "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "item_name": "TV Services"
                    },
                    "enabled_devices": 1,
                    "device": {
                        "item_type": "PRODUCT",
                        "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
                        "item_name": "HD Decoder"
                    }
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Event-based Recurring Charges
PUT /subscriptions/recurring_charges

Updates the set of event-based recurring charges policies.

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
rules
Array

Set of Event-based recurring charges rules.

Object
expense_id
string required

The expense service that will be added/removed from the subscription. This product must be classified as an Expense service.

event_to_apply
string required

The event that adds the recurring expense on the subscription

Enumeration:
INITIATION

Service set to Effective state for the first time

ENABLE_TO_DEVICE

Service enabled on a device

Example:
INITIATION
event_to_terminate
string required

The event that adds the recurring expense on the subscription

Enumeration:
REMOVE

Service removed from a subscription

DISABLE_FROM_DEVICE

Service disabled from a device

Example:
REMOVE
conditions
Array

Set of conditions that should be met to apply the policy. Conditions are optional, so if nothing is specified, then the recurring expense is added on a subscription per event. If a condition is required, then at least one of its settings must be specified.

Object
in_contract
boolean

Policy applied when the service is in contract

Example:
true
contract_period
Object

The service’s contract period

duration
integer

Contract period duration

Example:
12
uot
string

Contract period unit of time

Enumeration:
DAYS
MONTHS
YEARS
Example:
MONTHS
service
Object

The event’s service. The service is represented by a specific product or it migth be a service products fo a specific type

item_type
string required

What’s the item’s type

Enumeration:
PRODUCT
TYPE
FAMILY
Example:
TYPE
item_id
string required

The item’s identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
enabled_devices
integer

The minimum number of devices on which th service is already enabled on. Applicable only if the event in Enable service to a device. The policy is applied if the service is already enabled on at least this number of devices(excluding the event’s device)

Example:
1
device
Object

Defines to which devices the service is enabled on for the condition to apply. Optional and applicable when enabled_devices is set. This setting refers to the device’s product specification

item_type
string required

The devicee’s product specification. A device might be of a specific product or any product of a type

Enumeration:
PRODUCT
TYPE
Example:
PRODUCT
item_id
string required

The item’s identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
id
string

Unique identifier of the Event-based recurring expense policy

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/subscriptions/recurring_charges HTTP/1.1 

Content-Type: application/json

{
    "rules": [
        {
            "event_to_apply": "INITIATION",
            "event_to_terminate": "REMOVE",
            "expense_id": "",
            "conditions": [
                {
                    "in_contract": true,
                    "contract_period": {
                        "duration": 12,
                        "uot": "MONTHS"
                    },
                    "service": {
                        "item_type": "TYPE",
                        "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
                    },
                    "enabled_devices": 1,
                    "device": {
                        "item_type": "PRODUCT",
                        "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
                    }
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Usage Charge Limits
POST /subscriptions/usage_charge_limits
GET /subscriptions/usage_charge_limits
PUT /usage_charge_limits/{id}
DELETE /usage_charge_limits/{id}
Create Usage Charge Limits
POST /subscriptions/usage_charge_limits

Create new rule for Usage Charge Limits. Each rule must include a maximum allowed non-billed usage amount or number of usage records that a business allows. On reaching these limits, subscribers are billed for their un-billed usage immediatelly. So this usage might be billed some time during a billing cycle.

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

Usage Charge Limits rule name that has to be unique across all rules

Example:
Usage Exceeded
usage_amount
number nullable

Usage Charge Limit rule applied when unbilled usage amount reaches this usage amount limit

Example:
999.99
usage_records
integer nullable

Usage Charge Limit rule applied when the number of unbilled usage records reaches this limit

Example:
10
products
Array

List of products related to the non-billed usage. Only usage service prodcuts can be specified.

Unique items: YES
Object
item_type
string required

The item type

Enumeration:
PRODUCT
TYPE
Example:
PRODUCT
item_id
string required

The item’s identifier which depending on the selection of item_type might be a product identifier or a product type identifier.

Example:
5cc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
id
string

The unique identfier of the new Usage Charge Limit Rule

Example:
5cc0809f-ed91-4b68-b912-5bd6064d901e
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/subscriptions/usage_charge_limits HTTP/1.1 

Content-Type: application/json

{
    "name": "Usage Exceeded",
    "usage_amount": 999.99,
    "usage_records": 10,
    "products": [
        {
            "item_type": "PRODUCT",
            "item_id": "5cc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "5cc0809f-ed91-4b68-b912-5bd6064d901e"
}
Get Usage Charge Limits
GET /subscriptions/usage_charge_limits

Returns the list of Usage Charge Limits Rules on maximum allowed un-billed-usage. Either a usage amount or number of usage records is specified per rule.

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

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

Unique identifier of the Usage Charge Limit rule

Example:
5cc0809f-ed91-4b68-b912-5bd6064d901e
name
string

Usage Charge Limit Rule name

Example:
Movies ordered
usage_amount
number

The maximum allowed un-billed usage amount. Defined in default currency

Example:
999.99
usage_records
integer

The maximum allownce number of un-billed usage records

Example:
10
currency_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 4217 currency code.
Example:
EUR
products
Array

List of products and/or product types on which usage charge limits will be applied, i.e. once the usage of the speified products is reached, then their usage is immediatelly billed.

Object
item_type
string

Define whether usage charge limit is applied per product or product type

Enumeration:
PRODUCT
TYPE
Example:
TYPE
item_id
string

The unique identifier of the product or product type accordingly.

Example:
5cc0809f-ed91-4b68-b912-5bd6064d901e
item_name
string

The name of the product or the product type

Example:
TV Service
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/subscriptions/usage_charge_limits HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "5cc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Movies ordered",
            "usage_amount": 999.99,
            "usage_records": 10,
            "currency_code": "EUR",
            "products": [
                {
                    "item_type": "TYPE",
                    "item_id": "5cc0809f-ed91-4b68-b912-5bd6064d901e",
                    "item_name": "TV Service"
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Update Usage Charge Limits
PUT /usage_charge_limits/{id}

Returns the list of Usage Charge Limits. Rules on maximum allowed un-billed-usage. Either a usage amount or number of usage records is specified per rule.

Path variables

id
string required

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
usage_amount
number nullable
Example:
999.99
usage_records
integer nullable
Example:
10
products
Array
Min items: 1
Object
item_type
string
Example:
PRODUCT
item_id
string
Example:
5cc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
id
string

The unique identfier of the updated sage Charge Limit Rule

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/usage_charge_limits/{id} HTTP/1.1 

Content-Type: application/json

{
    "name": "",
    "usage_amount": 999.99,
    "usage_records": 10,
    "products": [
        {
            "item_type": "PRODUCT",
            "item_id": "5cc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": ""
}
Delete Usage Charge Limits
DELETE /usage_charge_limits/{id}

Deletes a Usage Charge Limits rule.

Path variables

id
string required

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/v1/usage_charge_limits/{id} HTTP/1.1 

HTTP/1.1 204 No Content 
Taxes

Use CRM.COM Taxes to set up Tax Rates and define which and how products in the Product Cataogue will be taxed. Taxes are applied automatially whenever an account is debited/credited.

POST /tax_rates/
PUT /tax_rates/{id}
DELETE /tax_rates/{id}
GET /tax_rates/
GET /tax_rates/{id}
Create Tax Rate
POST /tax_rates/

Creates a new Tax Rate. A single Tax Rate can be created per Web API call.

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 name of the tax rate that has to be unique.

Example:
Standard VAT
description
string

The description of the tax rate

Example:
Standard VAT of 20%
percentage
number required

Tax rate percentage

Example:
19
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
tax_code
string required

The tax rate’s reated tax code

Enumeration:
VAT
SALES_TAX
TAX_EXEMPT
OTHER
Example:
VAT
as_of_date
integer epoch required

The date from which the tax rate is applied. If not specified, it defaults to the date on which the rate % is set.

Example:
1623225742
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
is_default
boolean

Defines whether tax rate is the default one. Default tax rates are applied when invoicing process cannot identify a tax to be applied because of missing country of agreement of contact’s billing address. Defaults to False. Only one tax rate per tax code and per country of agreement can be specified. On creating the first tax rate per code and per country, then it is automatically set to True.

Default:
false
Example:
true
product_conditions
Array

A set of products on which the tax rate will be applied

Unique items: YES
Object
item_type
string required

Tax rate is applied to either a specific product or products of a family.

Enumeration:
PRODUCT
FAMILY
Example:
PRODUCT
item_id
string required

The identifier of the product or product family

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
location_conditions
Array

Define additional location conditions in free text

Unique items: YES
Object
town_city
string required nullable

Town/City

Example:
Athens
state_province_county
string required nullable

State/Province/County

Example:
Attica

Responses

200 OK
Body
Object
id
string

The unique identifier of the new Tax Rate

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/tax_rates/ HTTP/1.1 

Content-Type: application/json

{
    "name": "Standard VAT",
    "description": "Standard VAT of 20%",
    "percentage": 19,
    "country_code": "CYP",
    "tax_code": "VAT",
    "as_of_date": 1623225742,
    "supply_method": "DELIVERY",
    "is_default": "true",
    "product_conditions": [ 
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "location_conditions": [
        {
            "town_city": "Athens",
            "state_province_county": "Attica"
        }
    ]
}
Update Tax Rate
PUT /tax_rates/{id}

Updates an existing Tax Rate. A single Tax Rate can be updated per Web API call.

Path variables

id
string required

Tax Rate unique identifier

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

Request body

Object
name
string

The name of the tax rate

Example:
Standard VAT
description
string

The description of the tax rate

Example:
Stadard VAT for 24%
percentage
number

Tax rate percentage

Example:
19
as_of_date
integer epoch

The date from which the tax rate is applied. If not specified, it defaults to the date on which the rate % is set. On updating the percentage of the tax, this date is automatically reset on the date of this update

Example:
1623226230
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
tax_code
string

The tax rate’s related tax code

Enumeration:
VAT
SALES_TAX
TAX_EXEMPT
OTHER
Example:
VAT
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
is_default
boolean

Defines whether tax rate is the default one. Default tax raes are applied when invoicing process cannot identify a tax to be applied because of missing country of agreement of contact’s billing address. Defaults to False. Only one tax rate per tax code and per country can be specified.

Example:
true
product_conditions
Array

A set of products on which the tax rate will be applied

Object
item_type
string required

The product family’s unique identifier

Enumeration:
PRODUCT
FAMILY
Example:
PRODUCT
item_id
string required

The unique identifier of either a product or product family depending on the item_type selection

Example:
3dc0809f-ed91-4b68-b912-5bd6064d901e
location_conditions
Array

Define additional location conditions in free text

Object
town_city
string required nullable

Town/City

Example:
Athens
state_province_county
string required nullable

State/Province/County

Example:
Attica

Responses

200 OK
Body
Object
id
string

The unique identifier of the updated Tax Rate

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
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/tax_rates/4dc0809f-ed91-4b68-b912-5bd6064d901e HTTP/1.1 

Content-Type: application/json

{
    "name": "Standard VAT",
    "description": "Stadard VAT for 24%",
    "percentage": 19,
    "as_of_date": 1623226230,
    "country_code": "CYP",
    "tax_code": "VAT",
    "supply_method": "DELIVERY",
    "is_default": "true",
    "product_conditions": [
        { 
            "item_type": "PRODUCT",
            "item_id": "3dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "location_conditions": [
        {
            "town_city": "Athens",
            "state_province_county": "Attica"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
}
Delete Tax Rate
DELETE /tax_rates/{id}

Deletes an existing Tax Rate. A single Tax Rate can be deleted per Web API call. A tax rate can be deleted only if it was never applied in an Invoice or Credit Note

Path variables

id
string required

The Tax rate identifier

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/tax_rates/{id} HTTP/1.1 

HTTP/1.1 204 No Content 
List Tax Rates
GET /tax_rates/

Returns a list of all configured Tax Rates

Request parameters

coutry_code
string optional

Filters Tax Rates per country

Example:
GRE
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 for Tax rates based on their Name or Description

product_id
string optional

The identifier of the product on which the tax rate is applied

product_family_id
string optional

The identifier of the product family on which the tax rate is applied

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 OK
Body
Object
content
Array
Object
id
string

The unique identifer of the tax rate

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

Tax rate name

Example:
Standard VAT
description
string

Tax rate description

Example:
Cyprus Standard VAT
percentage
number

Tax rate percentage

Example:
19.5
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
tax_code
string

The tax code

Enumeration:
VAT
TAX_EXEMPT
SALES_TAX
OTHER
Example:
VAT
is_default
boolean

Defines whether the Tax rate is the defualt one for the specified country

Example:
true
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/tax_rates/ HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [ 
        {
            "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e",
            "name": "Standard VAT",
            "description": "Cyprus Standard VAT",
            "percentage": 19.5,
            "country_code": "CYP",
            "tax_code": "VAT",
            "is_default": "true"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Tax Rate
GET /tax_rates/{id}

Returns detailed information of a Tax Rate. A single Tax Rate is returned in each Web API call.

Path variables

id
string required

The Tax rate’s identifier

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

Tax Rate unique identifier

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
name
string

Tax Rate name

Example:
Standard VAT
description
string

Tax Rate description

Example:
Standard VAt for Cyprus
percentage
number

Tax Rate percentage

Example:
19.5
as_of_date
integer epoch

The date from which the tax rate is applied.

Example:
1623227590
country_code
string
Min length: 3
Max length: 3
Pattern: 3-letter ISO 3166-1 country code.
Example:
CYP
tax_code
string

The tax code

Enumeration:
VAT
SALES_TAX
TAX_EXEMPT
OTHER
Example:
VAT
supply_method
string

The type of the event

Enumeration:
DELIVERY

Delivered to the customer’s address

PICK_UP

Picked up by the customer from a venue

DIRECT_SALES

Online sales of services

Example:
DELIVERY
is_default
boolean

Defines whether tax rate is the default one. Default tax raes are applied when invoicing process cannot identify a tax to be applied because of missing country of agreement of contact’s billing address. Defaults to False. Only one tax rate per tax code and per country can be specified.

Example:
true
product_conditions
Array

List of products or product families at which the tax rate will be applied

Object
item_type
string

Define either a product or a product family

Enumeration:
PRODUCT
FAMILY
Example:
PRODUCT
item_id
string

The identfier of the product or the product family

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e
location_conditions
Array

List of location conitions at which the tax rate will be applied. this lis tof conditions are appleid additionally compared to the rate’s Country condition. Conditions are specified in free text

Object
town_city
string

Town.City

Example:
Athens
state_province_county
string

State/Privince/County

Example:
Attica
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/tax_rates/{id} HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "4dc0809f-ed91-4b68-b912-5bd6064d901e", 
    "name": "Standard VAT",
    "description": "Standard VAt for Cyprus",
    "percentage": 19.5,
    "as_of_date": 1623227590,
    "country_code": "CYP",
    "tax_code": "VAT",
    "supply_method": "DELIVERY",
    "is_default": "true",
    "product_conditions": [
        {
            "item_type": "PRODUCT",
            "item_id": "4dc0809f-ed91-4b68-b912-5bd6064d901e"
        }
    ],
    "location_conditions": [
        {
            "town_city": "Athens",
            "state_province_county": "Attica"
        }
    ]
}
Wallets
GET /wallets/settings
PUT /wallets/settings
Get Wallet Settings
GET /wallets/settings

Retrieves the configured Wallet Settings that include Limits and Fees applied on performing various walet-related transactions such as Top-ups and Transfers.

Request headers

authorization
string optional

Authorization Token

Example:
eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
api_key
string optional

The secret api key required for API calls to ensure that the client is trusted

Example:
4dc0809f-ed91-4b68-b912-5bd6064d901e

Responses

200 200

Successful Request

Body
Object
limit_rules
Array

Defines the limit rules applied on specific wallet.

Object
name
string required

The name of the rule

Example:
Monthly Limits for VIP
maximum_amount
number required nullable

The maximum allowed amount among all wallet-related transactions. The amount is always set to the business’s base currency

Example:
9.99
maximum_number
integer required nullable

The maximum number of wallet-related transactions allowed

Example:
10
period
string required

Limits are applied on transactions performed within the specified period of time. In all cases, the period is defined based on calendar. e.g. Montlhy refers to a calendar month

Enumeration:
DAILY
MONTHLY
ANNUAL
Default:
MONTHLY
Example:
DAILY
transaction_type
Array

The wallet transaction type for which the limit is applied

string
Enumeration:
DEBIT
CREDIT
TOPUP
TRANSFER
REDEEM_DEBIT
REDEEM_CREDIT
Example:
TOPUP
conditions
Array

The conditions that should be met to apply the limit

Object
entity
string
Enumeration:
ACCOUNT_CLASSIFICATION
CONTACT_CATEGORY
Example:
ACCOUNT_CLASSIFICATION
id
string

The entity’s unique identifier

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The name of the entity

Example:
VIP
fees_rules
Array

Defines the global fees to be applied over a period or on transactions executed against wallets

Object
name
string required

The name of the rule

Example:
VIP
value_type
string

The value type of the fee

Enumeration:
AMOUNT
PERCENTGE
value
number

The value of the fee

Example:
0.01
applied_on
string

The event to apply the fee

Enumeration:
TRANSACTION
PERIOD
Default:
TRANSACTION
Example:
TRANSACTION
period
integer

The period when the fees will be applied

Example:
1
period_uot
string

The UOT of the period

Enumeration:
DAY
MONTH
YEAR
applied_transaction
Array

The transactions that the fee will be applied on

string
Enumeration:
DEBIT
CREDIT
TOPUP
TRANSFER
REDEEM_DEBIT
REDEEM_CREDIT
Example:
TOPUP
conditions
Array
Object
entity
string
Enumeration:
ACCOUNT_CLASSIFICATION
CONTACT_CATEGORY
Example:
ACCOUNT_CLASSIFICATION
id
string

The unique identifier of the entity

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The name of the entity

Example:
Enhanced
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/wallet_settings HTTP/1.1 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "limit_rules": [
        {
            "name": "Monthly Limits for VIP",
            "maximum_amount": 9.99,
            "maximum_number": 10,
            "period": "DAILY",
            "transaction_type": [
                "TOPUP"
            ],
            "conditions": [
                {
                    "entity": "ACCOUNT_CLASSIFICATION",
                    "id": "4AD9C84FA60F9FE407140E20F707726A",
                    "name": "VIP"
                }
            ]
        }
    ],
    "fees_rules": [
        {
            "name": "VIP",
            "value_type": "AMOUNT",
            "value": 0.01,
            "applied_on": "TRANSACTION",
            "period": 1,
            "period_uot": "MONTH",
            "applied_transaction": [
                "TOPUP"
            ],
            "conditions": [
                {
                    "entity": "ACCOUNT_CLASSIFICATION",
                    "id": "4AD9C84FA60F9FE407140E20F707726A",
                    "name": "Enhanced"
                }
            ]
        }
    ]
}
Update Wallet Settings
PUT /wallets/settings

Update the wallet settings

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
limit_rules
Array

Defines the limit rules applied on specific wallet. Applied on all wallets unless overriden

Object
name
string

The name of the rule

Example:
VIP
maximum_amount
number

The maximum amount allowed

Example:
100
maximum_number
integer

The maximum number of transactions allowed

period
string

The period for which the limit is applied

Enumeration:
DAILY
MONTHLY
ANNUAL
transaction_type
Array

The wallet transaction type for which the limit is applied

string
Enumeration:
DEBIT
CREDIT
TOPUP
TRANSFER
REDEEM_DEBIT
REDEEM_CREDIT
Example:
TOPUP
conditions
Array
Object
entity
string
Enumeration:
ACCOUNT_CLASSIFICATION
CONTACT_CATEGORY
Example:
ACCOUNT_CLASSIFICATION
id
string

The unique identifier of the entity

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The name of the entity

Example:
Enhanced
fees_rules
Array

Defines the global fees to be applied over a period or on transactions executed against wallets

Object
name
string

The name of the rule

Example:
VIP
value
number

The value of the fee

Example:
0.1
value_type
string

The value type of the fee

Enumeration:
AMOUNT
PERCENTAGE
applied_on
string

The event to apply the fee

Enumeration:
TRANSACTION
PERIOD
period
integer

The period when the fees will be applied

Example:
1
period_uot
string

The UOT of the period

Enumeration:
DAY
MONTH
YEAR
applied_transaction
Array

The transactions that the fee will be applied on

string
Enumeration:
DEBIT
CREDIT
TOPUP
TRANSFER
REDEEM_DEBIT
REDEEM_CREDIT
Example:
TOPUP
conditions
Array
Object
entity
string
Enumeration:
ACCOUNT_CLASSIFICATION
CONTACT_CATEGORY
Example:
ACCOUNT_CLASSIFICATION
id
string

The unique identifier of the entity

Example:
4AD9C84FA60F9FE407140E20F707726A
name
string

The name of the entity

Example:
Enhanced

Responses

200 200

Successful Request

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/wallet_settings HTTP/1.1 

Content-Type: application/json

{
    "limit_rules": [
        {
            "name": "VIP",
            "maximum_amount": 100,
            "maximum_number": 1,
            "period": "DAILY",
            "transaction_type": [
                "TOPUP"
            ],
            "conditions": [
                {
                    "entity": "ACCOUNT_CLASSIFICATION",
                    "id": "4AD9C84FA60F9FE407140E20F707726A",
                    "name": "Enhanced"
                }
            ]
        }
    ],
    "fees_rules": [
        {
            "name": "VIP",
            "value": 0.1,
            "value_type": "PERCENTAGE",
            "applied_on": "PERIOD",
            "period": 1,
            "period_uot": "YEAR",
            "applied_transaction": [
                "TOPUP"
            ],
            "conditions": [
                {
                    "entity": "ACCOUNT_CLASSIFICATION",
                    "id": "4AD9C84FA60F9FE407140E20F707726A",
                    "name": "Enhanced"
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 
Sales Model

Sales Model configuration will give the possibility for the business to use the default pricing group or add custom ones that will be applied to product prices and can be defined to companies, persons, contact category or specified contact as well

GET /sales_models
POST /sales_models
PUT /sales_models/{id}
DELETE /sales_models/{id}
List Sales Models
GET /sales_models

Retrieve all the Sales Models

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
id
string GUId

The sales model unique identifier

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
name
string

The sales model name which has to be unique across all sales models

Example:
Retail
description
string

The sales model description

Example:
Sales model available for all contact Person
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/v2/sales_models HTTP/1.1 

HTTP/1.1 200 OK 

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "caf332bc-4e90-47b5-a05d-142b264897b9",
            "name": "Retail",
            "description": "Sales model available for all contact Person"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Create Sales Models
POST /sales_models

Creates a new Sales Model that will be used when adding a price to a product or for setting the sales model of a contact.

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 sales model name which has to be unique across all sales models

Example:
Wealth model
description
string

The sales model description

Example:
Sales model available for all contact Person
Examples

Responses

201 Created
Body
Object
id
string GUId

The unique identifier of the sales model created

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
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/sales_models HTTP/1.1 

Content-Type: application/json

{
    "name": "Wealth model",
    "description": "Sales model available for all contact Person"
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "caf332bc-4e90-47b5-a05d-142b264897b9"
}
Update Sales Models
PUT /sales_models/{id}

Updates an existing Sales Model

Path variables

id
string required

Unique identifier of the Sales Model

Example:
caf332bc-4e90-47b5-a05d-142b264897b9

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 sales model name which has to be unique across all sales models.

Example:
Retail bank sales
description
string

The sales model description

Example:
Sales Model available for retail banks

Responses

200 OK
Body
Object
id
string

Sales Model unique identifier

Example:
caf332bc-4e90-47b5-a05d-142b264897b9
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/sales_models/caf332bc-4e90-47b5-a05d-142b264897b9 HTTP/1.1 

Content-Type: application/json

{
    "name": "Retail bank sales",
    "description": "Sales Model available for retail banks"
}
Delete Sales Models
DELETE /sales_models/{id}

Deletes an existing Sales Model

Path variables

id
string required

The unique identifier of sales model that will be deleted

Example:
caf332bc-4e90-47b5-a05d-142b264897b9

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/sales_models/caf332bc-4e90-47b5-a05d-142b264897b9 HTTP/1.1