POS and eCommerce Systems

This integration guide will walk you through the basics of how front-end systems such as point of sales (POS) and eCommerce systems can submit purchase events, spend requests and orders to CRM.COM.
Versioning
VERSIONING

A new updated version will be released when either new flows are introduced to cover market needs or (rarely) backwards-incompatible changes are made to the API. Currently, you are viewing docs for CRM.COM & POS Integrators v1, released on June 20, 2020.

Getting Started

What is Point of Sale?

Point of Sale (POS) is the system that is used by an agent (cashier) to sell goods to a customer and collect the due amount in usually a face to face (over the counter) manner.

What is CRM.COM?

CRM.COM is a rewards platform that awards loyal customers via a broad range of reward offers. Each offer defines a goal that customers should reach in order to earn an award in the form of cashback, conditional or not, that can be spent on specific products, locations or days/hours. Customers can spend their awards either on request, or by setting auto-spend preferences or as part of an instant discount.

The reduction method defines how the amount requested to be spent by the customer will be reduced from the total amount that should be paid in a single purchase transaction. CRM.COM supports the following reduction methods

  • Front-End Reduction: The front-end system (POS) is responsible to reduce the amount of money that the consumer should actually pay by the amount to be spent.
  • Back-End Reduction: A back-end system (e.g. PayPal) is responsible to reduce such amount of money, by letting the customer to pay the full transaction amount and credit him through a payment gateway system the reduced amount.

In the context of Rewards, the reduction method may vary per merchant and the decision falls under each POS integration to decide whether front-end or back-end reduction should take place.

Transaction Acquiring

On checkout, the POS simply submits the purchase transaction to CRM.COM and optionally indicates a spend amount.

Void Transaction

On voiding an existing transaction, the POS simply submits the purchase transaction that should be voided to CRM.COM.

Ad Hoc Return of Goods

On refunding a number of returned products (without knowing the iniital purchase transaction number), the POS simply submits the amount of money for such products to CRM.COM.

Product Synchronization

Product Synchronization provides the ability for the POS system to create or update a group of products into CRM.COM. Synchronization can be achieved either real-time during the transaction acquiring (creating product skus or product families that do not exist in CRM.COM) or offline, where the POS system will be able to create new or update existing product skus, families and brands in the CRM.COM.

Scenarios

The following sections cover in detail the main CRM.COM & POS integration flows.

Submit Purchase (Back-End Reduction)
  1. On checkout, the customer is asked if he desires to spend any of his available CRM.COM wallet balance
  2. The itemized POS sales transaction (or optionally the transaction total) is submitted to CRM.COM, along with a customer’s identification mean (e.g. card number) and requested spend amount (ref. Submit Purchase - Example 7)
  3. The payment is completed by collecting the full amount for the purchased products
  4. Customer is awarded and gets notified via the APP. The spend amount is credited to the customer’s designated card or bank account by an external payment gateway system (integrated with CRM.COM)
Submit Purchase (Front-End Reduction)

Please follow the following link for a quick demonstration of the Front-End Reduction POS Flow Examples

Customer Identification

  1. On checkout, the customer is asked if he desires to spend any his available CRM.COM wallet balance
  2. The itemized POS sales transaction (or optionally the transaction total) is submitted to CRM.COM, along with a customer’s identification mean (e.g. card number) and requested spend amount (ref. Submit Purchase - Example 2)
  3. Customer is awarded and spend amount is calculated real-time based on purchased products
  4. The spend amount is deducted from the amount to pay by the POS system, either as a discount (before VAT) or as a payment method (after VAT)

Customer Self-Service Identification

  1. On checkout, the itemized POS sales transaction (or optionally the transaction total) is submitted to CRM.COM, without any customer identification action taking place (ref. Submit Purchase - Example 5)
  2. The POS generates a QR code based on the purchase and organisation identifier (semicolon separated). Such QR code is printed on the POS receipt
  3. Customers via their mobile app scan the QR code from the receipt and they get awarded (no spend is triggered)

QR codes are valid for 72 hours

Customer Self-Service Spend

  1. Prior to checkout, customers request an OTP via their mobile app to spend (including optionally a spend amount - if not specified, all available wallet amount can be spent)
  2. On checkout, customers are prompted if they want to spend by providing an OTP
  3. The itemised POS sales transaction is submitted to CRM (including the OTP) (ref. Submit Purchase - Example 6)
  4. Customer is awarded and spend amount is calculated real-time based on purchased products
  5. The spend amount is deducted from the amount to pay by the POS system, either as a discount (before VAT) or as a payment method (after VAT)
Void Purchase
  1. The POS agent selects the purchase that needs to be voided
  2. On confirming such action, the void purchase is submitted to CRM.COM (ref. Void Purchase)
  3. CRM.COM responds back, confirming the completion of such action
  4. The purchase and all corresponding awards will be reversed by CRM.COM
Ad Hoc Return of Goods
  1. The POS agent submits an ad hoc return of goods to CRM.COM (ref. Ad Hoc Return of Goods)
  2. CRM.COM responds back, confirming the completion of such action
  3. An amount proportional to the return amount, purchase transaction total amount and awarded amount on that purchase will be debited from the customer’s wallet in CRM.COM
Order Provisioning

Order Provisioning using CRM.COM Webhooks

  1. Customer submits an order to CRM.COM
  2. CRM.COM fires a single webhook request with the customer’s order details over to the POS system
  3. POS system responds back, confirming the receival of such request
  4. A sales transaction (based on the received order information) is created in the POS

Order Provisioning using POS Adaptors

  1. Customer submits an order to CRM.COM
  2. CRM.COM creates a sales transaction over to the POS system (CRM.COM is integrated with the POS system, consuming its APIs)
  3. POS system responds back, confirming the creation of such sales transaction

Order Provisioning using POS Adaptors is supported only for MICROS Simphony and Twinsoft

Product Synchronization
  1. The POS system requests to perform product synchronization over to CRM.COM (ref. Synchronise Products)
  2. CRM.COM responds back, confirming the receival of such request
  3. Imported products, families, brands and categories are created or updated into CRM.COM

Product synchronization on a POS system can be implemented as a batch process that is performed on a repeated basis (e.g. every day at 02:00), where product information is sent to CRM.COM

If your business model supports ordering, then via our product synchronization API you can update for each imported product its pricing, variants and components

Setup & Integration

The following sections include reference materials to aid POS system’s developers for integrating any POS system with CRM.COM platform.

Application Programming Interface

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 and response codes, like most external system integrations. CRM.COM BackOffice API is recommended.

Authentication

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

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

All API requests must be made over HTTPS. API requests made over plain HTTP or without authentication will fail.

Contacts
GET /customers
GET /contacts/{id}
GET /contacts/{id}/loyalty_identifiers
GET /accounts/{id}/financials
GET /accounts/{id}/rewards
Search Customers
GET /customers

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

Request parameters

search_value
string optional

The value of the search across Full Name, Company Name and Contact Code (case insensitive)

Example:
99542899
person_name
string optional

The full name of contact. Applicable only when searching for physical persons

Example:
Jack Csak
company_name
string optional

The name of the company. Applicable only when searching for companies

Example:
CRM
code
string optional

The contact’s unique code

Example:
ABC-123
email_address
string optional

The contact’s email address

Example:
info@crm.com
phone_number
string optional

The contact’s phone number

Example:
0035722265566
loyalty_identifier
string optional

The contact’s loyalty identifier

Example:
12345974159
cim
string optional

The customer identification medium

Example:
123456
country_agreement
string optional

Filters contacts based on the country code that the contact agreed to registered to

Example:
CYP
include_financials
boolean optional

If set to true then information about the primary account and wallet will be also retrieved

Example:
true
sort
string optional

Defines on which attribute the results should be sorted

Enumeration:
CREATED_DATE
UPDATED_DATE
order
string optional

Defines how the results will be ordered

Enumeration:
ASC
DESC
page
integer optional

The page number that should be retrieved

Example:
1
size
integer optional

The size (total records) of each page

Example:
14

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array
Object
id
string GUID

The contact identifier

Example:
ba28b216-d9be-7c12-8305-3427cfa6ed4a
code
string

The contact code

Example:
ABC-123
contact_type
string

The contact type

Enumeration:
PERSON
COMPANY
contact_name
string

The contact full name

Example:
John CRM Doe
email_address
string

The contact’s email address

Example:
johndoe@crm.com
phones
Array

Details about contact phones

Object
id
string GUID

The phone identifier

Example:
52e2dc4c-3dc1-8ceb-6a15-f1f1b82aed87
phone_type
string

The phone type

Enumeration:
LANDLINE
MOBILE
is_primary
boolean

Defines whether the phone is the primary one

Example:
true
country_code
string

The phone country code

Example:
44
number
string

The phone number

Example:
238065437
loyalty_identifiers
Array

The contact’s loyalty identifiers (e.g. cards)

Object
id
string GUID

The unique identifier of the loyalty identifier (CIM)

Example:
e172cdd1-41f4-47ec-717e-2c3733afb19f
identifier
string

The loyalty identifier

Example:
1478521478521
financials
Array

Details about the contact’s financials

Object
account
Object

Details about the account

id
string GUID

The account identifier

Example:
6d595a01-3c39-2a00-ffd5-9a10a55c3bf9
number
string

The account number

Example:
A1234
currency_code
string

The account currency (code)

Example:
EUR
is_primary
boolean

Defines whether the account is the primary one

Example:
true
life_cycle_state
string

The account life cycle state

Enumeration:
ACTIVE
SUSPENDED
TERMINATED
wallet
Object

Details about the wallet

id
string GUID

The wallet identifier

Example:
6d595a01-3c39-2a00-ffd5-9a10a55c3bf9
name
string

The wallet code

Example:
W1234
life_cycle_state
string

The wallet life cycle state

currency_code
string

The wallet currency (code)

Enumeration:
EFFECTIVE
NOT_EFFECTIVE
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 provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET /customers?include_financials=true&code=C0123456 HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "code": "ABC-123",
            "contact_type": "COMPANY",
            "contact_name": "John CRM Doe",
            "email_address": "johndoe@crm.com",
            "phones": [
                {
                    "id": "60bcca96-4965-4d56-8341-cb6f5ae61803",
                    "phone_type": "MOBILE",
                    "is_primary": "true",
                    "country_code": "357",
                    "number": "99999999"
                }
            ],
            "loyalty_identifiers": [
                {
                    "id": "e172cdd1-41f4-47ec-717e-2c3733afb19f",
                    "identifier": "1478521478521"
                }
            ],
            "financials": [
                {
                    "accoun": {
                        "id": "6d595a01-3c39-2a00-ffd5-9a10a55c3bf9",
                        "number": "A1234",
                        "currency_code": "EUR",
                        "is_primary": "true",
                        "life_cycle_state": "ACTIVE"
                    },
                    "wallet": {
                        "id": "6d595a01-3c39-2a00-ffd5-9a10a55c3bf9",
                        "name": "W1234",
                        "life_cycle_state": "",
                        "currency_code": "EFFECTIVE"
                    }
                }
            ]
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Get Contact
GET /contacts/{id}

Get details for a specific contact

Path variables

id
string GUID required

The contact identifier that should be returned

Example:
ba28b216-d9be-7c12-8305-3427cfa6ed4a

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The contact identifier

Example:
ba28b216-d9be-7c12-8305-3427cfa6ed4a
code
string

The contact’s unique code

Example:
ABC-123
contact_type
string

Type of contact support types include Person and Company.

Enumeration:
PERSON
COMPANY
company_name
string

The name of the company if the contact type is COMPANY

Example:
Louis Kozior
title
string

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

Example:
Sir
first_name
string

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

Example:
Louis
middle_name
string

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

Example:
Aloz
last_name
string

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

Example:
Kozior
contact_name
string

The full name of the contact (takes into consideration the name display settings)

Example:
Louis Aloz Kozior
email_address
string

The contact’s email

Example:
bill@gmail.com
preferred_language_code
string

The contact’s preferred language for communication

Example:
ENG
notes
string

Notes for the contact

Example:
Notes
statutory_number
string

The contact’s unique statutory code

Example:
EF-12345
is_tax_exempt
boolean

Defines whether the contact is Tax Exempt or not

Example:
true
category
Object

Details about the contact category

id
string GUID

The category identifier

Example:
8a317250-8076-24ea-6fa3-63812679e552
name
string

The category name

Example:
Category A
demographics
Object

Details about the contact’s dmographic information (applicable for PERSON contects)

gender
string

The contact gender

Example:
FEMALE
country_of_residence
string

The contact’s country of residence

Example:
CY
passport
Object

Details about the contact’s passport

passport_number
string

The passport number

Example:
PASS1234
issue_country_code
string

The issue country for the passport

Example:
GRC
expiration_date
integer epoch

The expiration date for the passport

Example:
129876567
id_details
Object

Details about the ID (applicable for PERSON contects)

id_number
string

The ID number

Example:
ID1234
issue_country_code
string

The country that issued such ID

Example:
CYP
expiration_date
integer epoch

The expiration date for the ID

Example:
129876567
name_day
Object

Details about the contact nameday (applicable for PERSON contects)

month
integer

The nameday month

Example:
10
day
integer

The nameday day

Example:
4
date_of_birth
Object

Details about the contact birthday (applicable for PERSON contects)

year
integer

The year of birth

Example:
2018
month
integer

The month of birth

Example:
10
day
string

The day of birth

Example:
16
addresses
Array

Details about the addresses

Object
id
string GUID

The address identifier

Example:
52e2dc4c-3dc1-8ceb-6a15-f1f1b82aed87
address_type
string

The address type

Enumeration:
HOME
BUSINESS
is_primary
boolean

Defines whether the address is primary or not

Example:
true
care_of
string

The address of care of

address_line_1
string

The address line 1

Example:
Elia Papakyriakou 7
address_line_2
string

The address line 2

Example:
Thomas V
state_province_county
string

The address state/province/county

Example:
Active
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
country
string

The address country

Example:
CYP
lat
number

The latitude of the address

Example:
35.157115
lon
number

The longitude of the address

Example:
33.313719
googlePlaceId
string

The Google textual identifier that uniquely identifies an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
phones
Array

Details about the phones

Object
id
string GUID

The phone identifier

Example:
52e2dc4c-3dc1-8ceb-6a15-f1f1b82aed87
phone_type
string

The phone type

Enumeration:
LANDLINE
MOBILE
is_primary
boolean

Defines whether the phone is the primary one

Example:
true
country_code
string

The phone country code

Example:
44
number
string

The phone number

Example:
238065437
consent_state
string

The contact’s consent state

Enumeration:
PENDING
REJECTED
ACCEPTED
WITHDRAWN
is_anonymized
boolean

Defines whether the contact is anonymized

interaction_status
string enum

The contact’s interaction status, retrieved from REDIS

Example:
OPERATIONAL
total_spend
string

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

Example:
250
sms_opt_out
boolean

Defines whether the SMS communication will be opt out

Example:
true
email_opt_out
boolean

Defines whether the EMAIL communication will be opt out

Example:
true
kyc_profile
Object

Details about the KYC profile

id
string GUID

The KYC profile identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the KYC profile

Example:
Standard
kyc_status
string

The status of the KYC profile assigned to Contact

Enumeration:
PENDING
VERIFIED
referral_code
string

The contact referral code

Example:
REF123
loyalty_identifiers
Array

The contact’s loyalty identifiers (e.g. cards)

Object
id
string GUID

The unique identifier of the loyalty identifier (CIM)

Example:
e172cdd1-41f4-47ec-717e-2c3733afb19f
identifier
string

The loyalty identifier

Example:
1478521478521
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 provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "code": "ABC-123",
    "contact_type": "PERSON",
    "company_name": "Louis Kozior",
    "title": "Sir",
    "first_name": "Louis",
    "middle_name": "Aloz",
    "last_name": "Kozior",
    "contact_name": "Louis Aloz Kozior",
    "preferred_language_code": "ENG",
    "category": {
        "id": "8a317250-8076-24ea-6fa3-63812679e552",
        "name": "Category A"
    },
    "demographics": {
        "gender": "FEMALE",
        "country_of_residence": "CY",
        "passport": {
            "passport_number": "PASS1234",
            "issue_country_code": "GRC",
            "expiration_date": 129876567
        },
        "id_details": {
            "id_number": "ID1234",
            "issue_country_code": "CYP",
            "expiration_date": 129876567
        },
        "name_day": {
            "month": 10,
            "day": 4
        },
        "date_of_birth": {
            "year": 2018,
            "month": 10,
            "day": "16"
        }
    }
}
List Customer Loyalty Identifiers
GET /contacts/{id}/loyalty_identifiers

Retrieve the loyalty identifiers (e.g. loyalty card) for a specific contact

Path variables

id
string GUID required

The contact identifier that should be returned

Example:
41dc3d8a-5ab2-3dc8-83d5-33501eb1949f

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array
Object
id
string GUID

The unique identifier of the loyalty identifier (CIM)

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

The loyalty identifier of the customer

Example:
2143454566754
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

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

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "1adaae9e-6dbb-f389-e5d0-8288f0c87a62",
            "identifier": "2143454566754"
        }
    ]
}
Get Customer Financial Details
GET /accounts/{id}/financials

Get a single account, along with its financial details

Path variables

id
string GUID required

The account identifier whose financial details will be retrieved

Example:
41dc3d8a-5ab2-3dc8-83d5-33501eb1949f

Responses

200 200

OK

Body
application/json
Object
name
string

The account’s name

Example:
John Smith AC00123456
number
string

The account’s number

Example:
AC00123456
is_primary
boolean

Defines whether the account is the primary one of the contact

Example:
true
life_cycle_state
string

The account’s life cycle state

Enumeration:
ACTIVE
SUSPENDED
TERMINATED
currency_code
string

The account’s currency (3 code currency)

Example:
EUR
balance
number

The account’s calculated balance

Example:
200
overdue_amount
number

The unpaid amount that is passed its due date

Example:
100.5
credit_limit
number

The account’s credit limit

Example:
98
accounting_period_id
string GUID

The ID of the latest closed accounting period

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
accounting_period_name
string

The name of the account’s latest accounting period

Example:
OCTOBER2018
opening_balance
number

The opening balance brought forwards after the latest closed accounting period

Example:
100.5
classification
Object
id
string GUID

The unique identifier of the Account classification

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The name of the Account classification

Example:
VIP
wallet
Array

The account’s wallet information (if available)

Object
id
string GUID

The wallet’s unique identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
code
string

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

Example:
W00123456
balance
number

The total balance of the wallet

Example:
150.5
commerce_balance
number

The commerce balance of the wallet

Example:
98
open_balance
number

The open balance of the wallet

life_cycle_state
string

The wallet’s life cycle state

Enumeration:
EFFECTIVE
CANCELLED
minimum_balance
number

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

Example:
9
limit_rules
Array

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

Object
minimum_amount
number

The minimum amount allowed

Example:
100.5
maximum_amount
number

The maximum amount allowed

Example:
200
period
string

The period for which the limit is applied

Enumeration:
DAILY
MONTHLY
ANNUAL
transaction_type
string

The wallet transaction type for which the limit is applied

Enumeration:
CREDIT
DEBIT
TOPUP
TRANSFER
auto_topup
Object

Details about auto-topup details

threshold
number

Sets the threshold for the auto topup to be performed

Example:
10.5
amount
number

The amount to get topped up

Example:
10.5
payment_method
string

Indicates the method of collecting money

Enumeration:
CASH
BANK_TRANSFER
CARD
DIRECT_DEBIT
WALLET
PAYPAL
ACCOUNT
payment_method_id
string

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

billing_address
Object

Details about the billing address

id
string GUID

The address identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
address_line_1
string

The address line 1

Example:
2265 Oak Street
address_line_2
string

The address line 2

Example:
n/a
state_province_county
string

The address state/province/county

Example:
New York
town_city
string

The address town/city

Example:
Old Forge
postal_code
string

The address postal code

Example:
13420
country_code
string

The address country code

Example:
USA
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET /accounts/4AD9C84FA60F9FE407140E20F707726A/financials HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "name": "John Smith AC00123456",
    "number": "AC00123456",
    "wallet": [
        {
            "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "code": "W00123456",
            "balance": 150.5,
            "commerce_balance": 98,
            "open_balance": 1,
            "life_cycle_state": "EFFECTIVE"
        }
    ]
}
Get Customer Reward Details
GET /accounts/{id}/rewards

Get a single account, along with its reward details

Path variables

id
string GUID required

The account identifier whose details will be retrieved

Example:
41dc3d8a-5ab2-3dc8-83d5-33501eb1949f

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Responses

200 200

OK

Body
application/json
Object
id
string GUID

The account identifier

Example:
cdfd962b-e203-4c91-a2ba-12be3c669a53
name
string

The account’s name

Example:
John Smith AC00123456
number
string

The account’s number

Example:
AC00123456
currency_code
string

The account’s currency (3 code currency)

Example:
EUR
signed_up_on
integer epoch

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

Example:
1583846865
sign_up_organisation
Object

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

id
string GUID

The organisation identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation name

Example:
CRMdotCOM
spending_blocked_status
boolean

Defines whether the account can spend or not

Example:
false
spending_blocked_date
integer epoch

The date that the spending status of the account was updated

Example:
1583846865
spending_blocked_user
Object

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

id
string GUID

The user identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
email_address
string

The user’s email address

Example:
johndoe@crm.com
first_name
string

The user’s first name

Example:
John
last_name
string

The user’s last name

Example:
Doe
automatic_spend_settings
Object

Information about the automatic spend settings for the account

enable_automatic_spend
boolean

Defines whether automatic spend is enabled for the account

Example:
true
automatic_spend_preference
string

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

Enumeration:
NEXT_MERCHANT_PURCHASE
ALL_MERCHANT_PURCHASE
minimum_wallet_balance
number

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

Example:
0.52
from_purchase_amount
number

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

Example:
1.78
merchants
Array

Information about the merchants that automatic spending is allowed

Object
id
string GUID

The merchant record identifier

Example:
REC1E31269B76D7A65ACCE45B2E68DFD
is_next_visit
boolean

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

Example:
false
organisation
Object

Information about organisation

id
string GUID

The organisation identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The organisation name

Example:
Bravo Coffee
reward_tier
Object

Information about the account’s reward tier

id
string

The reward tier identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The reward tier name

Example:
Gold
color
string

The designated hexadecimal code of the tier’s color

Example:
#d4af37
period_value_units
number

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

Example:
222
lifetime_value_units
number

The account’s value units that accumulated overall

Example:
333
next_tier_progression
number

The progression percentage until the next reward tier is reached

Example:
45.98
joined_reward_schemes
Array

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

Object
id
string GUID

The reward scheme identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The reward scheme name

Example:
CRMdotCOM Scheme
signed_up_on
integer epoch

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

Example:
1583846865
email_address
string

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

Example:
johndoe@crm.com
sign_up_option
string

Defines how customers can sign up to the reward scheme

Enumeration:
AUTO_SIGN_UP
SELF_SIGN_UP
CLOSE_LOOP_SIGN_UP
preferred_payment_method
Object

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

id
string GUID

The preferred payment method identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
payment_method_type
string

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

Enumeration:
CARD
DIRECT_DEBIT
first6
string

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

Example:
424242
last4
string

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

Example:
4242
iban
string

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

Example:
CY3550000000054910000003
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET /accounts/4AD9C84FA60F9FE407140E20F707726A/rewards HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
    "name": "John Smith AC00123456",
    "number": "AC00123456",
    "currency_code": "EUR",
    "reward_tier": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "Gold",
        "color": "#d4af37",
        "period_value_units": 222,
        "lifetime_value_units": 333,
        "next_tier_progression": 45.98
    }
}
Customer Events
GET /purchases
POST /purchases
POST /purchases/{id}/cancel
POST /purchases/ad_hoc_return
Search Purchases
GET /purchases

A supplementary API that enables the POS agents to search through existing purchases, either based on contact or specific purchase attributes

Request parameters

contact_id
string optional

The contact identifier who performed the purchase

Example:
c89d3d40-ca73-4d99-8f96-ef51f66d55a7
reference_number
string optional

The purchase’s reference number

Example:
REF1234
from_date
integer epoch optional

The date from which the purchase was performed.If not specified, then the last 10 purchases will be returned

Example:
11591774402
to_date
integer epoch optional

The date until which the purchase was performed

Example:
11591774402
life_cycle_state
string optional

The life cycle state of the customer event

Enumeration:
POSTED
CANCELLED
organisation_id
string GUID optional

The organisation that the purchase customer event was performed

Example:
CEEE83D6E0804A30966F684B0269AD91
tap_id
string GUID optional

The transaction acquiring point that captured the customer event

Example:
CEEE83D6E0804A30966F684B0269AD91
from_total_amount
number optional

Filters customer events that have greater or equal total amount as specified

Example:
112.32
to_total_amount
number optional

Filters customer events that have less or equal total amount as specified

Example:
2112.32
sort
string optional

Defines on which attribute the results should be sorted

Enumeration:
CREATED_DATE
UPDATED_DATE
order
string optional

Defines how the results will be ordered

Enumeration:
ASC
DESC
page
integer optional

The page number that should be retrieved

Example:
1
size
integer optional

The size (total records) of each page

Example:
14

Request headers

api_key
string optional

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array
Object
id
string GUID

The purchase identifier (POS based)

Example:
CEEE83D6E0804A30966F684B0269AD91
reference_number
string

The purchase unique referene number (can be the same as the POS based identifier or a unique transaction number if it’s supported)

Example:
REF1234
contact
Object

Contact details

id
string GUID

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The contact full name

Example:
John Doe
code
string

The contact code

Example:
CO1234
account
Object

Account details

id
string GUID

The account identifier

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The account name

Example:
ACR1234 John Doe
number
string

The account number

Example:
ACR1234
life_cycle_state
string

The purchase’s life cycle state

Example:
POSTED
reduction_method
string

The reduction method that was applied on the related spend

Example:
BACK_END
classification
Object

The purchase event’s classification details

id
string GUID

The classification identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The classification name

Example:
Delivery
total_net_amount
number

The purchase’s total net amount of all products’ net amount

Example:
1.51
total_tax_amount
number

The purchase’s total tax amount of all products’ tax amount

Example:
0.49
discount_amount
number

The purchase’s discount amount

Example:
1
total_amount
number

The purchase’s total amount after discount

Example:
1
organisation
Object

The organisation details at which the purchase was performed

id
string GUID

The organisation identifier at which the purchase was performed

Example:
CEEE83D6E0804A30966F684B0269AD91
name
string

The organisation name at which the purchase was performed

Example:
Bravo Coffee
performed_on
integer epoch

The date on which the purchase was performed

Example:
1576486645
paging
Object
page
integer

The page number

Example:
2
size
integer

The number of records per page

Example:
20
total
integer

The overal number of records

Example:
5124
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET /purchases HTTP/1.1 

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

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "CEEE83D6E0804A30966F684B0269AD91",
            "reference_number": "REF1234",
            "contact": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "John Doe",
                "code": "CO1234"
            },
            "account": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "ACR1234 John Doe",
                "number": "ACR1234"
            },
            "life_cycle_state": "POSTED",
            "reduction_method": "BACK_END",
            "classification": {
                "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
                "name": "Delivery"
            },
            "total_net_amount": 1.51,
            "total_tax_amount": 0.49,
            "discount_amount": 1,
            "total_amount": 1,
            "organisation": {
                "id": "CEEE83D6E0804A30966F684B0269AD91",
                "name": "Bravo Coffee"
            },
            "performed_on": 1576486645
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Submit Purchase
POST /purchases

Create a purchase customer event into CRM.COM (in posted state) based on the submitted POS purchase transaction

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Request body

application/json
Object
id
string GUID

The purchase Identifier (POS based)

Example:
b2fbaa45-af26-4dba-b866-546a26dee1f9
contact_id
string GUID required

The contact identifier that the purchase is created for

Example:
3b6c40fb-1444-4719-bad0-0fbc30fa704a
cim
string required

The value for a single contact identification medium representing the customer that the purchase is created for

Example:
4A30966F684B0269AD91
contact_token
string

The OTP token that will identify the contact who requested to spend (applicable on Customer Self Service Identification/Spend)

Example:
123456
reference_number
string required

The purchase unique referene number (can be the same as the POS based identifier or a unique transaction number if it’s supported)

Example:
RF000001
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:
42424242
performed_on
integer epoch

The date that the customer event was performed (if not specified, default to date of posting such purchase)

Example:
1572423477
reduction_method
string required

Defines the reduction method that will be applied on spend

Enumeration:
FRONT_END
BACK_END
products
Array required

The purchased products (either products object or explicit net/tax/total amounts should be provided)

Object
product_sku
string required

The purchased product sku family (either product sku or product famly should be speciifed)

Example:
FREDESPR001
product_name
string

The purchased product name (will be used on online product sync)

Example:
Freddo Espresso
product_family
string required

The purchase product family (either product sku or product famly should be speciifed)

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

The purchased product quantity

Example:
2
spend_request
Object

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

amount
number required

The amount to be spent by the specified spend request in system currency

Example:
2.12
merchant_tap
Object required

Details about the merchant’s point on which the purchase is made

id
string GUID required

The merchant transaction acquiring point identifier (either tap id or code should be provided)

Example:
CEEE83D6E0804A30966F684B0269AD91
code
string required

The merchant transaction acquiring point code (either tap id or code should be provided)

Example:
TAP001
outlet_tap
Object required

Details about the merchant’s outlet point on which the purchase is made

id
string GUID required

The outlet transaction acquiring point identifier (either tap id or code should be provided)

Example:
CEEE83D6E0804A30966F684B0269AD91
code
string required

The outlet transaction acquiring point code (either tap id or code should be provided)

Example:
8269
discount_amount
number

The discount of the purchase

Example:
1.56
net_amount
number required

The purchase net amount. Applicable when no products (sku/family) are provided

tax_amount
number required

The purchase tax amount. Applicable when no products (sku/family) are provided

total_amount
number required

The purchase total amount (net + tax - discount). Applicable when no products (sku/family) are provided

classification
Object

Details about the customer event classification

id
string GUID required

The customer event classification identifier

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

The customer event classification name

Example:
Delivery Purchase
pass
Object

Details about the pass

code
string required

The pass code

Example:
1231231231231231
otp
string

The pass one time password (if applicable)

Example:
2345

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The purchase identifier

Example:
b2fbaa45-af26-4dba-b866-546a26dee1f9
reference_number
string

The purchase reference number (applicable only for Front-End Reduction)

Example:
RF123
total_award
number

The total award amount (applicable only for Front-End Reduction)

Example:
1.4
total_spend
number

The sum of all spends (instant discount, auto spends, spends on request). Applicable only for Front End Reduction

Example:
2.21
instant_discount
number

The spend related to instant discount. Applicable only for Front End Reduction

Example:
0.21
auto_spend
number

The spend related to auto spend requests. Applicable only for Front End Reduction

Example:
1.51
spend_on_request
number

The actual spend related to requested spend requests. Applicable only for Front End Reduction

Example:
0.49
total_open_spend
number

The wallet’s open balance amount that was spent. Applicable only for Front End Reduction

Example:
1.12
total_commerce_spend
number

The wallet’s commerce balance amount that was spent. Applicable only for Front End Reduction

Example:
0.09
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Create Front-End Purchase
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7
Example 8

Create a purchase event of classification Delivery with spend request and pass code redemption

POST https://sandbox.crm.com/backoffice/v1/purchases HTTP/1.1 

api_key: adea79a6-fe7f-2e92-56c7-9a0685ffa290
Content-Type: application/json

{
    "id": "b2fbaa45-af26-4dba-b866-546a26dee1f9",
    "reference_number": "O00123",
    "contact_id": "acd11adc-51cc-5d41-f1dd-f625a18b3ff3",
    "reduction_method": "FRONT_END",
    "products": [
        {
            "product_sku": "10023401",
            "product_name": "Soda",
            "net_amount": 1.00,
            "tax_amount": 0.02,
            "total_amount": 1.02,
            "quantity": 1
        },
        {
            "product_sku": "20057809",
            "product_name": "Caramel Donut",
            "net_amount": 10.00,
            "tax_amount": 0.19,
            "total_amount": 10.19,
            "quantity": 10
        }
    ],
    "classification": {
        "name": "Delivery"
    },
    "spend_request": {
        "amount": 1.21
    },
    "pass": {
        "code": 1234
    },
    "outlet_tap": {
        "code": "8239"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "b2fbaa45-af26-4dba-b866-546a26dee1f9",
    "reference_number": "RF123",
    "total_award": 1.4,
    "total_spend": 1.21,
    "instant_discount": 0.21,
    "auto_spend": null,
    "spend_on_request": 1.00,
    "total_open_spend": 1.12,
    "total_commerce_spend": 0.09
}

Submit Front-End Reduction Purchase (product sku only, spend request)

POST /purchases HTTP/1.1 

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

{
    "id": "RF000001",
    "contact_id": "f7aa324c-9670-43dd-6e1e-d5ee7e044168",
    "reduction_method": "FRONT_END",
    "products": [
        {
            "product_sku": "FREDESPR001",
            "product_name": "Freddo Espresso",
            "net_amount": 4.15,
            "tax_amount": 1.04,
            "total_amount": 5.19,
            "quantity": 2
        },
        {
            "product_sku": "ICL0001",
            "product_name": "Iced Caramel Latte",
            "net_amount": 5.15,
            "tax_amount": 1.04,
            "total_amount": 6.19,
            "quantity": 1
        }
    ],
    "merchant_tap": {
        "code": "EK123456"
    },
    "outlet_tap": {
        "code": "CD123456"
    },
    "spend_request": {
        "amount": 2.12
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "RF000001",
    "reference_number": "RF000001"
    "total_award": 0.54,
    "total_spend": 1.72,
    "instant_discount": 0.21,
    "auto_spend": 1.51,
    "spend_on_request": 0.00
}

Submit Front-End Reduction (product sku only, spend request & discount on total transaction)

POST /purchases HTTP/1.1 

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

{
    "id": "RF000001",
    "contact_id": "f7aa324c-9670-43dd-6e1e-d5ee7e044168",
    "reference_number": "RF000001",
    "reduction_method": "FRONT_END",
    "products": [
        {
            "product_sku": "FREDESPR001",
            "product_name": "Freddo Espresso",
            "net_amount": 4.15,
            "tax_amount": 1.04,
            "total_amount": 5.19,
            "quantity": 2
        },
        {
            "product_sku": "ICL0001",
            "product_name": "Iced Caramel Latte",
            "net_amount": 5.15,
            "tax_amount": 1.04,
            "total_amount": 6.19,
            "quantity": 1
        }
    ],
    "discount_amount": 1.56,
    "merchant_tap": {
        "code": "EK123456"
    },
    "outlet_tap": {
        "code": "CD123456"
    },
    "spend_request": {
        "amount": 2.12
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "RF000001",
    "reference_number": "RF000001"
    "total_award": 0.54,
    "total_spend": 1.72,
    "instant_discount": 0.21,
    "auto_spend": 1.51,
    "spend_on_request": 0.00
}

Submit Front-End Reduction (product sku only, spend request, pass & discount on total transaction)

POST /purchases HTTP/1.1 

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

{
    "id": "RF000001",
    "contact_id": "f7aa324c-9670-43dd-6e1e-d5ee7e044168",
    "reduction_method": "FRONT_END",
    "products": [
        {
            "product_sku": "FREDESPR001",
            "product_name": "Freddo Espresso",
            "net_amount": 4.15,
            "tax_amount": 1.04,
            "total_amount": 5.19,
            "quantity": 2
        },
        {
            "product_sku": "ICL0001",
            "product_name": "Iced Caramel Latte",
            "net_amount": 5.15,
            "tax_amount": 1.04,
            "total_amount": 6.19,
            "quantity": 1
        }
    ],
    "discount_amount": 1.56,
    "merchant_tap": {
        "code": "EK123456"
    },
    "outlet_tap": {
        "code": "CD123456"
    },
    "pass": {
        "code": "1231231231231231"
    },
    "spend_request": {
        "amount": 2.12
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "RF000001",
    "reference_number": "RF000001"
    "total_award": 0.54,
    "total_spend": 1.72,
    "instant_discount": 0.21,
    "auto_spend": 1.51,
    "spend_on_request": 0.00
}

Submit Front-End Reduction (no contact identification. product sku & discount on total transaction value)

POST /purchases HTTP/1.1 

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

{
    "id": "191e36d5-2afc-3715-1b7c-5e38528c48b3",
    "reduction_method": "FRONT_END",
    "products": [
        {
            "product_sku": "FREDESPR001",
            "product_name": "Freddo Espresso",
            "net_amount": 4.15,
            "tax_amount": 1.04,
            "total_amount": 5.19,
            "quantity": 2
        },
        {
            "product_sku": "ICL0001",
            "product_name": "Iced Caramel Latte",
            "net_amount": 5.15,
            "tax_amount": 1.04,
            "total_amount": 6.19,
            "quantity": 1
        }
    ],
    "discount_amount": 1.56,
    "merchant_tap": {
        "code": "EK123456"
    },
    "outlet_tap": {
        "code": "CD123456"
    },
    "spend_request": {
        "amount": 2.12
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "191e36d5-2afc-3715-1b7c-5e38528c48b3",
    "reference_number": "RF000001"
}

Submit Front-End Reduction (contact token, product sku & discount on total transaction value)

POST /purchases HTTP/1.1 

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

{
    "id": "191e36d5-2afc-3715-1b7c-5e38528c48b3",
    "contact_token": "123456",
    "reduction_method": "FRONT_END",
    "products": [
        {
            "product_sku": "FREDESPR001",
            "product_name": "Freddo Espresso",
            "net_amount": 4.15,
            "tax_amount": 1.04,
            "total_amount": 5.19,
            "quantity": 2
        },
        {
            "product_sku": "ICL0001",
            "product_name": "Iced Caramel Latter",
            "net_amount": 5.15,
            "tax_amount": 1.04,
            "total_amount": 6.19,
            "quantity": 1
        }
    ],
    "discount_amount": 1.56,
    "merchant_tap": {
        "code": "EK123456"
    },
    "outlet_tap": {
        "code": "CD123456"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "191e36d5-2afc-3715-1b7c-5e38528c48b3",
    "reference_number": "RF000001",
    "total_award": 0.54,
    "total_spend": 1.72,
    "instant_discount": 0.21,
    "auto_spend": 1.51,
    "spend_on_request": 0.00
}

Submit Back-End Reduction Purchase (product sku and family)

POST /purchases HTTP/1.1 

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

{
    "cim": "4A30966F684B0269AD91",
    "reference_number": "RF000001",
    "payment_medium_identifier": "42424242",
    "performed_on": 1572423477,
    "reduction_method": "FRONT_END",
    "products": [
        {
            "product_sku": "FREDESPR001",
            "product_name": "Freddo Espresso",
            "net_amount": 4.15,
            "tax_amount": 1.04,
            "total_amount": 5.19,
            "quantity": 2
        },
        {
            "product_family": "Beverages",
            "net_amount": 5.15,
            "tax_amount": 1.04,
            "total_amount": 6.19,
            "quantity": 1
        }
    ],
    "merchant_tap": {
        "code": "EK123456"
    },
    "outlet_tap": {
        "code": "CD123456"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}

Submit Back-End Reduction Purchase (total transaction)

POST /purchases HTTP/1.1 

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

{
    "id": "CEEE83D6E0804A30966F684B0269AD91",
    "cim": "4A30966F684B0269AD91",
    "reference_number": "RF000001",
    "payment_medium_identifier": "42424242",
    "reduction_method": "BACK_END",
    "merchant_tap": {
        "code": "0000012"
    },
    "outlet_tap": {
        "code": "0000012345"
    },
    "net_amount": 99.99,
    "tax_amount": 1.00,
    "total_amount": 100.99
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "ccca2889-301b-40ad-aed9-9c3a78e6e50b",
    "reference_number": "RF123"
}
Void Purchase
POST /purchases/{id}/cancel

Cancel an existing customer’s purchase and as a result any related awards/spends will be reversed

Path variables

id
string GUID required

The purchase identifier (POS based) that will be cancelled

Example:
ccca2889-301b-40ad-aed9-9c3a78e6e50b

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The purchase identifier

Example:
ccca2889-301b-40ad-aed9-9c3a78e6e50b
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Void Purchase
POST https://sandbox.crm.com/backoffice/v1/purchases/ccca2889-301b-40ad-aed9-9c3a78e6e50b/cancel HTTP/1.1 

api_key: adea79a6-fe7f-2e92-56c7-9a0685ffa290

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "ccca2889-301b-40ad-aed9-9c3a78e6e50b"
}
Ad Hoc Return of Goods
POST /purchases/ad_hoc_return

Performs an ad hoc return of goods for a speciifc customer

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Request body

application/json
Object
contact_id
string GUID required

The contact identifier that the customer event is created for (either contact_id or cim must be specified)

Example:
41dc3d8a-5ab2-3dc8-83d5-33501eb1949f
cim
string required

The value for a single contact identification medium representing the customer event is created for (either contact_id or cim must be specified)

Example:
4A30966F684B0269AD91
currency_code
string

The currency code

Example:
EUR
amount
number required

The amount (real currency) of purchased goods that are returned

Example:
14.56
merchant_tap
Object required

Details about the merchant that submits such transaction (either id or code should be specified)

id
string GUID

The organisation (business/merchant) tap identifier

Example:
95e5c54a-d133-d75d-037c-24637de896dd
code
string

The organisation (business/merchant) tap code

Example:
EK123456
outlet_tap
Object required

Details about the venue that submits such transaction (either id or code should be specified)

id
string GUID required

The organisation (venue) tap identifier

Example:
474bb4d5-1f14-3424-2088-a3bd2374248f
code
string required

The organisation (venue) tap code

Example:
CD123456

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The purchase identifier that ad hoc return of goods is applied

Example:
ccca2889-301b-40ad-aed9-9c3a78e6e50b
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST /purchases/ad_hoc_return HTTP/1.1 

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

{
    "cim": "4A30966F684B0269AD91",
    "currency_code": "EUR",
    "amount": 14.56,
    "merchant_tap": {
        "code": "EK123456"
    },
    "outlet_tap": {
        "code": "CD123456"
    }
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "ccca2889-301b-40ad-aed9-9c3a78e6e50b"
}
Financial Events
POST /topups
Create TopUp
POST /topups

Create a new Topup for an Account or a Wallet

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Request body

application/json
Object
account_id
string GUID required

The account (identifier) for which the top-up will be performed. Either account or wallet is applicable and mandatory

Example:
a56cb853-847d-2d5b-e5f8-5c7e282abe87
wallet_id
string GUID required

The wallet (identifier) for which the top-up will be performed. Either account or wallet is applicable and mandatory

Example:
4e2c435d-8a30-543d-95ce-d7e835342372
topup_date
integer epoch

The date of the top-up request

Example:
1618298816
amount
number required

The top-up amount

Example:
19.99
payment_method
string required

Indicates the method of collecting money

Enumeration:
CASH
Example:
CASH
payment_method_id
string GUID

The identifier of the actual payment method if any

Example:
3de402ce-37b4-5bc2-d0b9-a940fdfd8128
code
string

A unique 16-digit code, will be auto-generated if not provided

Example:
a8ec-516d5-f7361

Responses

200 200

OK

Body
application/json
Object
id
string GUID

The top-up identifier

Example:
2b7eb198-f9fb-f920-1f68-b04cb36b63ea
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

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

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

{
    "wallet_id": "72c47daa-4b86-2d81-56e1-f61eb2264043",
    "topup_date": 1618298816,
    "amount": 19.99,
    "payment_method": "CASH"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "2b98beb3-df11-f14d-561b-a93fcd4a246a"
}
Orders
GET /orders
GET /orders/{id}
PUT /orders/{id}/actions
GET /order_cancellation_reasons
Search Orders
GET /orders

Retrieve a list of orders based on search criteria

Request parameters

number
string optional

Filters based on order number

Example:
O100012
life_cycle_state
array of string optional

Fitlers based on the order state

Example:
[
    "NEW"
]
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:
1234
created_on
string optional

Filter 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

sort
string optional

Defines on which attribute the results should be sorted

Enumeration:
CREATED_DATE
UPDATED_DATE
order
string optional

Defines how the results will be ordered

Enumeration:
ASC
DESC
page
integer optional

The page number that should be retrieved

Example:
1
size
integer optional

The size (total records) of each page

Example:
14

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Responses

200 200

OK

Body
application/json
Object
content
Array
Object
id
string GUID

The order identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
number
string

The order number

Example:
O11101
life_cycle_state
string

The order state

Enumeration:
NEW
IN_PROGRESS
COMPLETED
CANCELLED
notes
string

The order general notes

Example:
Lorem Ipsum
number_of_milestones
integer

The order total number of milestones

Example:
1
supply_method
string

The order supply method

Enumeration:
DELIVERY
PICK_UP
number_of_items
integer

The total number of items that were ordered

Example:
1
total_cost
number

The total cost of all order items

Example:
5.99
wallet_funds_amount
number

The amount that was used from wallet funds

Example:
1.98
amount_due
number

The amount due to be paid (total cost MINUS wallet funds)

Example:
4.01
discount
Object

Details about the (total) amount that was provided as discount

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.91
amount_incl_tax
number

The total discount amount including taxes

Example:
2.11
currency
string

The currency (code)

Example:
EUR
contact
Object

Details about the contact that 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
address
Object
address_line_1
string

The address line 1

Example:
Elia Papakyriakou 7
address_line_2
string

The address line 2

Example:
Thomas V
state_province_county
string

The address state/province/county

Example:
Active
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
country
string

The address country

Example:
CYP
care_of
string

The address of care of

lat
number

The latitude of the address

Example:
35.157115
lon
number

The longitude of the address

Example:
33.313719
googlePlaceId
string

The Google textual identifier that uniquely identifies an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
category
Object

Details about the order category

id
string GUID

The order category identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
name
string

The order category name

Example:
VIP
cancellation_reason
Object

Details why the order was cancelled

id
string GUID

The cancellation reason identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
name
string

The cancellation reason name

Example:
Placed by mistake
fulfilled_by
Object

Details about the organisation that will carry through the order

id
string GUID

The organisation identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
name
string

The organisation name

Example:
CRM Egkomis
order_items
Array

Details about the order items

Object
id
string GUID

The order item identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
notes
string

The order item notes

Example:
n/a
life_cycle_state
string

The order item state

Example:
PENDING_DELIVERY
quantity
integer

The order item quantity

Example:
1
product
Object

Details about the order item product

id
string GUID

The product identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
sku
string

The product SKU

Example:
FE0001
name
string

The product name

Example:
Freddo Espresso
quantity
integer

The product quantity

Example:
2
price
number

The product price (of a single unit)

Example:
1.7
cost
number

The product cost (price * quantity - promotion)

Example:
3.4
classification
string

The product classification

Example:
EXPENSE_SERVICE
components
Array

Details about the product components (modifies/add ons)

Object
id
string GUID

The product component identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
sku
string

The product component SKU

Example:
S11B
name
string

The product component name

Example:
Brown Sugar
quantity
integer

The product component quantity

Example:
1
price
number

The product component price (of a single unit)

Example:
0.5
variant_attributes
Array

Details about the product variants

Object
key
string

The variant key

Example:
size
name
string

the variant name

Example:
Size
value
string

The variant value

Example:
Grande
price_terms
Object

Details about the product price terms

billing_period
Object

Details about the billing period

duration
string

The duration of the billing period

Example:
12
uot
string

The unit of time of the billing period

Example:
MONTHS
auto_renew
boolean

Defines whether price terms will be automatically renewed or not

Example:
true
key_dates
Object

Details about the order key dates

submitted_on
integer epoch

The date/time that the order was submitted

Example:
1617358428
completed_on
integer epoch

The date/time that the order was completed

Example:
1617358428
cancelled_on
integer epoch

The date/time that the order was cancelled

Example:
1617358428
estimated_fulfillement_in
integer

The expected period that order will be fulfilled

Example:
30
estimated_fulfillment_UOT
string

The unit of time for the expected fulfilled time

Example:
MINUTES
estimated_fulfillement
integer epoch

The expected date/time that order will be fulfilled

Example:
1617358428
expires_on
integer epoch

The date/time that order will be expired (if not completed)

Example:
1617358429
requested_date
integer epoch

The date/time that order was requested to be completed

Example:
1617358428
started_on
integer epoch

The date/time that order was started (in progress)

Example:
1617358428
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
order_provision
Object

Defines whether the order is configured to be provisioned

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:
true
provisioner
string

Defines the integration on which the order has been provisioned (applicable only if the order is available for provision)

Enumeration:
TWINSOFT
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 provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1

Retrieve today’s orders for a specific venue that are currently new

GET /backoffice/v1/orders?life_cycle_state=NEW&fulfilled_by_tap_code=8269&created_on[gte]=1628456400 HTTP/1.1 

api_key: adea79a6-fe7f-2e92-56c7-9a0685ffa290

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "paging": {
        "page": 1,
        "size": 2,
        "total": 2
    },
    "content": [
        {
            "number": "A11636",
            "address": null,
            "currency": "EUR",
            "notes": "please add a couple napkins",
            "contact": {
                "id": "ed86f87f-3df2-4c83-8897-736c08536eb9",
                "name": "Sozos K",
                "code": "6562126827272730"
            },
            "category": null,
            "assignee": null,
            "discount": {
                "amount": 0.68,
                "amount_incl_tax": 0.72
            },
            "id": "970cc6bc-ca78-4f35-9fb7-09c81a42dfc7",
            "life_cycle_state": "NEW",
            "supply_method": "DELIVERY",
            "total_cost": 6.38,
            "wallet_funds_amount": 0.20,
            "amount_due": 6.18,
            "key_dates": {
                "id": null,
                "submitted_on": 1628500082,
                "completed_on": null,
                "cancelled_on": null,
                "expires_on": null,
                "requested_date": null,
                "started_on": null,
                "estimated_fulfillement": 1628507280,
                "estimated_fulfillement_in": 119,
                "estimated_fulfillment_UOT": "MINUTE"
            },
            "number_of_milestones": 1,
            "cancellation_reason": null,
            "fulfilled_by": {
                "id": "8967BAB2A75A456DA055D00111F97DFE",
                "name": "Store 1"
            },
            "is_favorite": false,
            "number_of_items": 3,
            "is_printed": true,
            "available_for_printing": null,
            "order_provision": {
                "provisioner": null,
                "available_for_provision": false,
                "is_provisioned": true
            },
            "amount_to_collect": 6.18,
            "total_before_discount": 7.10,
            "order_items": []
        },
        {
            "number": "A11635",
            "address": null,
            "currency": "EUR",
            "notes": null,
            "contact": {
                "id": "ed86f87f-3df2-4c83-8897-736c08536eb9",
                "name": "Sozos K",
                "code": "6562126827272730"
            },
            "category": null,
            "assignee": null,
            "discount": {
                "amount": 0.00,
                "amount_incl_tax": 0.00
            },
            "id": "16105370-9be8-412e-976c-f987c40254a6",
            "life_cycle_state": "NEW",
            "supply_method": "PICK_UP",
            "total_cost": 7.70,
            "wallet_funds_amount": null,
            "amount_due": 7.70,
            "key_dates": {
                "id": null,
                "submitted_on": 1628499814,
                "completed_on": null,
                "cancelled_on": null,
                "expires_on": null,
                "requested_date": null,
                "started_on": null,
                "estimated_fulfillement": 1628507014,
                "estimated_fulfillement_in": 120,
                "estimated_fulfillment_UOT": "MINUTE"
            },
            "number_of_milestones": 1,
            "cancellation_reason": null,
            "fulfilled_by": {
                "id": "8967BAB2A75A456DA055D00111F97DFE",
                "name": "Store 1"
            },
            "is_favorite": false,
            "number_of_items": 3,
            "is_printed": true,
            "available_for_printing": null,
            "order_provision": {
                "provisioner": null,
                "available_for_provision": false,
                "is_provisioned": true
            },
            "amount_to_collect": 7.70,
            "total_before_discount": 7.70,
            "order_items": []
        }
    ]
}
Get Order
GET /orders/{id}

Retrieve details for a specific order

Path variables

id
string GUID required

The order (identifier) that will be retrieved

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Responses

200 200

OK

Body
application/json
Object
id
string GUID

The order identifier

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
number
string

The order (reference) number

Example:
ORDER1234
life_cycle_state
string

The order state

Enumeration:
NEW
IN_PROGRESS
COMPLETED
CANCELLED
notes
string

The order notess

Example:
Lorem Ipsum
supply_method
string

The order supply method

Enumeration:
DELIVERY
PICK_UP
ON_SITE
total_cost
number

The total cost of all order items (total order items cost + taxes - discounts)

Example:
5.99
wallet_funds_amount
number

The amount that was used from wallet funds

Example:
1.98
discount
Object

Details about the (total) amount that was provided as discount

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.91
amount_incl_tax
number
Example:
2.12
amount_due
number

Tbe amount due to be paid (total cost - wallet funds)

Example:
3.01
currency
string

The order currency

Example:
EUR
payment_info
string

An informative description related to the order’s payment

Example:
NOT PAID - TO BE PAID IN CASH
is_favorite
boolean

Defines whether the order was marked as a favorite one from the contact

Example:
true
number_of_items
integer

The total number of items for the order

Example:
6
contact
Object

Details about the contact who placed the order

id
string GUID

The contact identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
code
string

The contact code

Example:
1234
name
string

The contact name

Example:
John Doe
phone_number
string

The contact phone number

Example:
357 22265566
country_code
string
Example:
CYP
address
Object
address_line_1
string

The address line 1

Example:
Elia Papakyriakou 7
address_line_2
string

The address line 2

Example:
Thomas V
state_province_county
string

The address state/province/county

Example:
Active
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
country
string

The address country

Example:
CYP
care_of
string

The address of care of

lat
number

The latitude of the address

Example:
35.157115
lon
number

The longitude of the address

Example:
33.313719
googlePlaceId
string

The Google textual identifier that uniquely identifies an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
category
Object

Details about the order category

id
string GUID

The category identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
name
string

The category name

Example:
Seasonal
cancellation_reason
Object

Details about the cancellation reason (applicable only if the order was cancelled)

id
string GUID

The cancellation reason identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
name
string

The cancellaton reason

Example:
Placed by mistake
fulfilled_by
Object

Details about the organisation that will fulfill the order

id
string GUID

The organisation identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
name
string

The organisation name

Example:
CRM Nicosia
phone
string

The organisation phone number

Example:
357 22265577
address
Object
id
string GUID

The address identifier

Example:
52e2dc4c-3dc1-8ceb-6a15-f1f1b82aed87
address_type
string

The address type

Enumeration:
HOME
BUSINESS
is_primary
boolean

Defines whether the address is primary or not

Example:
true
care_of
string

The address of care of

address_line_1
string

The address line 1

Example:
Elia Papakyriakou 7
address_line_2
string

The address line 2

Example:
Thomas V
state_province_county
string

The address state/province/county

Example:
Active
town_city
string

The address town/city

Example:
Nicosia
postal_code
string

The address postal code

Example:
2415
country
string

The address country

Example:
CYP
lat
number

The latitude of the address

Example:
35.157115
lon
number

The longitude of the address

Example:
33.313719
googlePlaceId
string

The Google textual identifier that uniquely identifies an address

Example:
ChIJrTLr-GyuEmsRBfy61i59si0
order_items
Array

Details about the ordered items

Object
id
string GUID

The item identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
notes
string

The item notes

Example:
Lorem Ipsum
life_cycle_state
string

The item state

Example:
PENDING_DELIVERY
quantity
integer

The order item (product) quantity (same as product.quantity)

Example:
1
product
Object

Details about the ordered product item

id
string GUID

The product identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
sku
string

The product SKU

Example:
SKU1234
name
string

The product name

Example:
Iced Latte
quantity
integer

The product quantity

Example:
2
price
number

The product price (of a single unit)

Example:
1.7
cost
number

The product cost (price * quantity - promotion)

Example:
3.4
classification
string

The product classification

Example:
EXPENSES_SERVICE
components
Array

Details about the components

Object
id
string GUID

The product component identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
sku
string

The product component SKU

Example:
B1234
name
string

The product component name

Example:
Brown Sugar
quantity
integer

The product component quantity

Example:
1
price
number

The product component price (of a single unit)

Example:
0.5
variant_attributes
Array

Details about the variants

Object
key
string

The variant key

Example:
size
name
string

The variant name

Example:
Size
value
string

The variant value

Example:
Grande
price_terms
Object
billing_period
Object
duration
integer
Example:
1
uot
string
auto_renew
boolean
Example:
true
termed_period_cycles
integer
Example:
1
contract_period
Object
duration
integer
Example:
1
uot
string
trial_period
Object
duration
string
uot
string
price_model
string
Example:
FIXED
bill_model
string
Example:
POST_BILL
creatives
Array
Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

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

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

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

Details about the order key dates

submitted_on
integer epoch

The date that the order was submitted

Example:
1592809457
completed_on
integer epoch

The date that the order was completed

Example:
1592809457
cancelled_on
integer epoch

The date that the order was cancelled

Example:
1592809457
estimated_fulfillment_in
integer

Defines the estimated time until order fulfillment

Example:
30
estimated_fulfillment_UOT
string

Defines the estimated unit of time (UOT) until order fulfillment

Example:
MINUTES
estimated_fulfillment
integer epoch

The date that the order was estimated to be fufilled

Example:
1592809457
expires_on
integer epoch

The date that the order will expire

Example:
1592809457
started_on
integer epoch

The date that the order was started

Example:
1
requested_date
integer epoch

The date that the order was requested

Example:
1
milestones
Array
Object
payment_method
string
Example:
CARD
paid_on
string
Example:
ON_COMPLETE
posted_on
integer
Example:
1234567
payment_method_details
Object
brand
string
Example:
VISA
last4
integer
Example:
1234
funding_type
string
Example:
Credit
invoice
Object
id
string
Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
number
string
Example:
INV1234
payment
Object
id
string
Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
number
string
Example:
PAY1234
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
available_for_printing
boolean
Example:
true
is_printed
boolean
Example:
true
order_provison
Object
available_for_provision
string
Example:
true
is_provisoned
boolean
Example:
true
provisoner
string
Example:
TWINSOFT
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/backoffice/v1/orders/997f1287-3d83-827a-7199-e5df2c0e4e67 HTTP/1.1 

api_key: adea79a6-fe7f-2e92-56c7-9a0685ffa290

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "997f1287-3d83-827a-7199-e5df2c0e4e67",
    "number": "ORDER1234",
    "life_cycle_state": "CANCELLED",
    "notes": "Lorem Ipsum",
    "supply_method": "DELIVERY",
    "total_cost": 5.99,
    "wallet_funds_amount": 1.98,
    "discount": {
        "amount": 1.91,
        "amount_incl_tax": 2.12
    },
    "amount_due": 3.01,
    "currency": "EUR",
    "payment_info": "NOT PAID - TO BE PAID IN CASH",
    "is_favorite": true,
    "number_of_items": 6,
    "contact": {
        "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
        "code": "1234",
        "name": "John Doe",
        "phone_number": "357 22265566",
        "country_code": "CYP"
    },
    "address": {
        "address_line_1": "Elia Papakyriakou 7",
        "address_line_2": "Thomas V",
        "state_province_county": "Active",
        "town_city": "Nicosia",
        "postal_code": "2415",
        "country": "CYP",
        "care_of": "",
        "lat": 35.157115,
        "lon": 33.313719,
        "googlePlaceId": "ChIJrTLr-GyuEmsRBfy61i59si0"
    },
    "category": {
        "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
        "name": "Seasonal"
    },
    "cancellation_reason": {
        "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
        "name": "Placed by mistake"
    },
    "fulfilled_by": {
        "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
        "name": "CRM Nicosia",
        "phone": "357 22265577",
        "address": {
            "id": "52e2dc4c-3dc1-8ceb-6a15-f1f1b82aed87",
            "address_type": "HOME",
            "is_primary": true,
            "care_of": "",
            "address_line_1": "Elia Papakyriakou 7",
            "address_line_2": "Thomas V",
            "state_province_county": "Active",
            "town_city": "Nicosia",
            "postal_code": "2415",
            "country": "CYP",
            "lat": 35.157115,
            "lon": 33.313719,
            "googlePlaceId": "ChIJrTLr-GyuEmsRBfy61i59si0"
        }
    },
    "order_items": [
        {
            "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
            "notes": "Lorem Ipsum",
            "life_cycle_state": "PENDING_DELIVERY",
            "quantity": 1,
            "product": {
                "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
                "sku": "SKU1234",
                "name": "Iced Latte",
                "quantity": 2,
                "price": 1.7,
                "cost": 3.4,
                "classification": "EXPENSES_SERVICE",
                "components": [
                    {
                        "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
                        "sku": "B1234",
                        "name": "Brown Sugar",
                        "quantity": 1,
                        "price": 0.5
                    }
                ],
                "variant_attributes": [
                    {
                        "key": "size",
                        "name": "Size",
                        "value": "Grande"
                    }
                ],
                "price_terms": {
                    "billing_period": {
                        "duration": 1,
                        "uot": ""
                    },
                    "auto_renew": true,
                    "termed_period_cycles": 1,
                    "contract_period": {
                        "duration": 1,
                        "uot": ""
                    },
                    "trial_period": {
                        "duration": "",
                        "uot": ""
                    },
                    "price_model": "FIXED",
                    "bill_model": "POST_BILL"
                },
                "creatives": [
                    {
                        "id": "CA123456789AQWSXZAQWS1236547896541",
                        "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"
                            }
                        ]
                    }
                ]
            }
        }
    ],
    "key_dates": {
        "submitted_on": 1592809457,
        "completed_on": 1592809457,
        "cancelled_on": 1592809457,
        "estimated_fulfillment_in": 30,
        "estimated_fulfillment_UOT": "MINUTES",
        "estimated_fulfillment": 1592809457,
        "expires_on": 1592809457,
        "started_on": 1,
        "requested_date": 1
    },
    "milestones": [
        {
            "payment_method": "CARD",
            "paid_on": "ON_COMPLETE",
            "posted_on": 1234567,
            "payment_method_details": {
                "brand": "VISA",
                "last4": 1234,
                "funding_type": "Credit"
            },
            "invoice": {
                "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
                "number": "INV1234"
            },
            "payment": {
                "id": "1866a75f-953e-4109-86b4-1cab53fbaaa8",
                "number": "PAY1234"
            }
        }
    ],
    "custom_fields": [
        {
            "key": "back_office",
            "value": "0001-12345"
        }
    ],
    "available_for_printing": true,
    "is_printed": true,
    "order_provison": {
        "available_for_provision": "true",
        "is_provisoned": true,
        "provisoner": "TWINSOFT"
    }
}
Perform Order Actions
PUT /orders/{id}/actions

Updates a single order based on the preferred action

Path variables

id
string GUID required

The order (identifier) that will be updated

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Request body

application/json
Object
action
string required

The action that will be applied on the order

Enumeration:
START_PROGRESS
COMPLETE
CANCEL
cancellation_reason_id
string GUID

The reason why an order is cancelled (applicable if action = CANCEL)

Example:
86d3a62b-5ee5-3a9e-b6dd-517a5dc908dd

Responses

200 200

OK

Body
application/json
Object
id
string GUID

The order (identifier) that was updated

Example:
997f1287-3d83-827a-7199-e5df2c0e4e67
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Start Order Progress
Complete Order
Cancel Order
PUT https://sandbox.crm.com/backoffice/v1/orders/997f1287-3d83-827a-7199-e5df2c0e4e67/actions HTTP/1.1 

api_key: adea79a6-fe7f-2e92-56c7-9a0685ffa290
Content-Type: application/json

{
    "action": "START_PROGRESS"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "997f1287-3d83-827a-7199-e5df2c0e4e67"
}

PUT https://sandbox.crm.com/backoffice/v1/orders/997f1287-3d83-827a-7199-e5df2c0e4e67/actions HTTP/1.1 

api_key: adea79a6-fe7f-2e92-56c7-9a0685ffa290
Content-Type: application/json

{
    "action": "COMPLETE"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "997f1287-3d83-827a-7199-e5df2c0e4e67"
}
PUT https://sandbox.crm.com/backoffice/v1/orders/997f1287-3d83-827a-7199-e5df2c0e4e67/actions HTTP/1.1 

api_key: adea79a6-fe7f-2e92-56c7-9a0685ffa290
Content-Type: application/json

{
    "action": "CANCEL",
    "cancellation_reason_id": "86d3a62b-5ee5-3a9e-b6dd-517a5dc908dd"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "997f1287-3d83-827a-7199-e5df2c0e4e67"
}
List Order Cancellation Reasons
GET /order_cancellation_reasons

Retrieve all reasons that will justify an order cancellation

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Enumeration:
CREATED_DATE
UPDATED_DATE
order
string optional

Defines how the results will be ordered

Enumeration:
ASC
DESC
page
integer optional

The page number that should be retrieved

Example:
1
size
integer optional

The size (total records) of each page

Example:
14

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Responses

200 200

OK

Body
application/json
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
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

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

api_key: adea79a6-fe7f-2e92-56c7-9a0685ffa290

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"
        }
    ],
    "pages": {
        "page": 2,
        "size": 20,
        "total": 5124
    }
}
Provision Order (using Webhooks)

Order Provisioning to POS systems is achieved using CRM.COM Webhooks Adaptor (via CRM.COM Automations).

A webhook is an event notification method where an application (or a system) is provided with real time information for an order created in CRM.COM without requiring an additional integration (the POS integrator is responsible to parse such order information in order to be able to perform POS operations).

Attached is the order details, send to a POS using a webhook

Object
type
string

The order event

Example:
CREATE_ORDER
submitted_date
integer epoch

The date that the event was submitted

Example:
11594205783
contact
Object

Details about the contact that placed the order

id
string GUID

The contact identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
code
string

The contact code

Example:
1234
name
string

The contact name

Example:
John Doe
financials
Object

Details about the account that placed the order

account
Object

Details about the customer’s account

id
string GUID

The account identifier

Example:
1e920b82-9f5e-4ab1-beab-e8dc92b5ee2e
name
string

The account name

Example:
AR132 John Doe
number
string

The account number

Example:
AR132
business
Object

Details about the business organisation

id
string GUID
Example:
3870f789-1a51-f454-def3-3e7e021f1136
name
string
subsidiary
Object

Details about subsidiary organisation

id
string GUID

The subsidiary organisation identifier

Example:
977e27af-0208-8abb-a195-f70d33c81633
name
string

The subsidiary organisation name

Example:
Delicious Bakery Cyprus
merchant
Object

Details about merchant organisation

id
string GUID

The merchant organisation identifier

Example:
36874a85-0b5b-ed40-1c06-f3181364f779
name
string

The merchant organisation name

Example:
Delicious Bakery
venue
Object

Details about venue organisation

id
string GUID

The venue organisation identifier

Example:
36874a85-0b5b-ed40-1c06-f3181364f772
name
string

The venue organisation name

Example:
Delicious Bakery Nicosia
location
Object

Details about the contact’s delivery address

address_line_1
string

Address line 1 details

Example:
Elia Papakyriakou
address_line_2
string

Address line 2 details

Example:
7 Tower Stars
city
string

Address town/city

Example:
Nicosia
postal_code
string

Address postal code

Example:
2000
country
string

Address country (code)

Example:
CY
transaction
Object

Details about the order transaction

id
string GUID

The order identifier

Example:
1866a75f-953e-4109-86b4-1cab53fbaaa8
number
string

The order number

Example:
ORDER1234
life_cycle_state
string

The order state

Example:
IN_PROGRESS
currency_code
string

The currency in which the order was made (3 code currency)

Example:
EUR
net_amount
number

The order’s net amount

Example:
5.99
tax_amount
number

The order’s tax amount

Example:
1.99
discount_amount
number

The order’s discount amount

Example:
0.99
total_amount
number

The order’s total amount

Example:
6.99
order
Object

Details about the order

id
string GUID

The order identifier

Example:
674f61a3-8bab-1fa4-d702-3bcbc1d40308
number
string

The order number

Example:
12345
life_cycle_state
string

The state of the order

Enumeration:
NEW
IN_PROGRESS
COMPLETED
CANCELLED
ON_HOLD
supply_method
string

Defines how the order will be supplied

Enumeration:
DELIVERY
PICK_UP
ON_SITE
category
Object

Details about the order’s category

id
string GUID

The category identifier

Example:
674f61a3-8bab-1fa4-d702-3bcbc1d40301
name
string

The category name

cancellation_reason
Object

Details about the order’s cancellation reason

id
string GUID

The cancellation reason identifier

Example:
974f61a3-8bab-1fa4-d702-3bcbc1d40308
name
string

The cancellation reason name

Example:
Ordered by mistake
notes
string

The order notes

Example:
No additional notes
submitted_date
integer epoch

The date that the order was submitted

estimated_fulfillment_date
integer epoch

The estimated date that the order will be fulfilled

Example:
1594204578
completed_date
integer epoch

The date that the order was completed

Example:
1594204578
cancelled_date
integer epoch

The date that the order was cancelled

Example:
1594204578
expiration_date
integer epoch

The date that the order was expired

Example:
1594204578
requested_date
integer epoch

The date that the order was requested

Example:
1594204578
is_favourite
boolean

Defines whether the order is the favourited one (for the customer)

Example:
true
total_cost
number

The total cost of the order

Example:
9.99
currency
string

The order’s currency

Example:
EUR
payment_method_details
Object

Details about the payment method

payment_method
string

The payment method

Example:
CARD
brand
string

The payment method brand

Example:
VISA
funding_type
string

The type of funding on which the payment is made against

Example:
Credit
currency_code
string

The currency in which the order was made (3 code currency)

Example:
EUR
amount
number

The payment amount

Example:
6.99
products
Array

Details about the ordered products

Object
id
string GUID

The product identifier

Example:
f2195f8f-eabc-823a-e579-0359ff2d9bba
sku
string

The product sku

Example:
FR1234
name
string

The product name

Example:
Freddo Espresso
notes
string

The product notes

Example:
No extra
type
Object

Details about the product type

id
string GUID

The product type identifier

Example:
49026369-afd7-5f0a-e055-595c981d0694
name
string

The product type name

Example:
Continents
brand
Object

Details about the product brand

id
string GUID

The product brand identifier

Example:
0b2e57fb-cc0e-5d65-a7a9-ff8526543b96
name
string

The product brand name

Example:
Coffee Lab97
family
Object

Details about the product family

id
string GUID

The product family identifier

Example:
0b2e57fb-cc0e-5d65-a7a9-ff8526543b92
name
string

The product family name

Example:
Coffee
category
Object

Details about the product category

id
string GUID

The product category identifier

Example:
0b2e57fb-cc0e-5d65-a7a9-ff8526543b22
name
string

The product category name

Example:
Drinks
quantity
integer

The ordered product quantity

Example:
1
net_amount
number

The ordered product net amount

Example:
1.99
tax_amount
number

The ordered product tax amount

Example:
0.99
discount_amount
number

The ordered product discount amount

Example:
0.99
amount
number

The ordered product total amount

Example:
1.99
bundle_products
Array

Details about the bundle products

Object
id
string GUID

The bundle product identifier

Example:
7936ab8a-c901-117f-bbee-3036d152430f
sku
string

The bundle product sku

Example:
NS123
name
string

The bundle product name

Example:
Full Sugar
Products
POST /synchronise_products
Synchronise Products
POST /synchronise_products

Performs product synchornization between the products that exist in the POS system over to CRM.COM

Request headers

api_key
string GUID required

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

Example:
adea79a6-fe7f-2e92-56c7-9a0685ffa290

Request body

application/json
Object
products
Array

Details about the products to synchornise

Object
sku
string required

The product sku

Example:
IL001
name
string

The product name

Example:
Iced Latte
description
string

The product description

Example:
Cold Brew Latte
type
Object

The product type (if type is provided, id or name should be specified)

id
string GUID required

The product type identifier

Example:
0c2582d9-6f5c-4477-86f5-74e2055b941d
name
string required

The product type name

Example:
Non-traceable goods
brand
Object

Details about the product brand (if brand is provided, id or name should be specified)

id
string GUID required

The product brand identifier

Example:
0c2582d9-6f5c-4477-86f5-74e2055b941d
name
string required

The product brand name

Example:
Brew Ltd
family
Object

Details about the product family (if family is provided, id or name should be specified)

id
string GUID required

The product family identifier

Example:
0c2582d9-6f5c-4477-86f5-74e2055b941d
name
string required

The product family name

Example:
Cold Coffee
categories
Array

Details about the product categories (for each provided category, id or name or code should be specified)

Object
id
string GUID required

The product category identifier

Example:
c4f611aa-eb51-9857-0e15-c1176ea3ade1
name
string required

The product category name

Example:
Milks
code
string required

The product category code

Example:
500
validity_period
Object

Defines the period that the product will be valid (if not specified, will be always valid)

from_date
integer epoch

The date from which the product will be valid

Example:
1
to_date
integer epoch

The date up to which the product will be valid

Example:
1
tax_rate
Object

Details about the product tax rate

id
string GUID

The tax rate identifier

Example:
0c2582d9-6f5c-4477-86f5-74e2055b941d
name
string

The tax rate name

pricing
Object
rate_model
string

The pricing rate model

Example:
FLAT
tax_model
string

The pricing tax model

Example:
TAX_INCLUSIVE
price
number

The price (amount)

Example:
9.99
currency
string

The price currency (3 code)

Example:
EUR
tiers
Array

Details about the pricing tiering (required for Tiered and Volume based rate models)

Object
lower_tier
integer required

The lowest tier

Example:
1
upper_tier
integer

The top tier

Example:
5
price
number required

The tier price (amount)

Example:
8.99
variant_attributes
Array

Details about the product variant attributess

Object
key
string required

The variant key

Example:
size
value
string required

The variant value

Example:
medium
components
Array

Details about the product components

Object
sku
string required

The component product sku that will be used as component (sku or family, category or product type should be specified)

Example:
CPSKU01
product_family
Object

The component product family that will be used as component (sku or family, category or product type should be specified)

id
string GUID required

The product family identifer (id or name should be specified)

Example:
dd513fea-85dc-2bf1-dcab-2288c539f034
name
string

The product family name (id or name should be specified)

Example:
Extras
product_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

The product type identifer (id or name should be specified)

Example:
dd513fea-85dc-2bf1-dcab-2288c539f034
name
string

The product type name (id or name should be specified)

Example:
Dry
product_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

The product category identifer (id, name or codeshould be specified)

Example:
dd513fea-85dc-2bf1-dcab-2288c539f034
name
string

The product category name (id, name or codeshould be specified)

Example:
Milks
code
string

The product category code (id, name or codeshould be specified)

Example:
500
inclusive
boolean

Defines if pricing is inclusive

Example:
true
min_amount
integer

The minimum number of components that should be added (applicable only for product family and type)

Example:
1
max_amount
integer

The maximum number of components that should be added (applicable only for product family and type)

Example:
4
mandatory
boolean

Defines whether the component must be added to the product or not

Example:
true
classification
string

Defines the classification of the component

Enumeration:
ADDON
MODIFIER
creatives
Array
Object
id
string GUID

The creative identifier

Example:
CA123456789AQWSXZAQWS1236547896541
type
string

Information about the creative type

Enumeration:
ATTACHMENT
PROFILEIMAGE
MARKETING
width
integer

The creative width

Example:
2159
height
integer

The creative height

Example:
3075
format
string

The creative format

Example:
jpg
url
string

The creative content URL

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

The creative public identifier

Example:
crm-com/image
media
Array

Information about the creative transformations

Object
width
integer

The transformed creative width

Example:
200
height
integer

The transformed creative height

Example:
300
url
string

The transformed creative URL

Example:
https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg
main_product_sku
string required

The unique product sku of variant_attribute (required if the synced product is a variant attribute of another product)

Example:
SKU000A

Responses

200 200

The request has succeeded

Body
application/json
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 provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
Example 2
Example 3
Example 4
Example 5
POST /synchronise_products HTTP/1.1 

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

{
    "products": [
        {
            "sku": "IL001",
            "name": "Iced Latte",
            "description": "Cold Brew Latte",
            "brand": {
                "name": "Brew Ltd"
            },
            "family": {
                "name": "Coffee"
            },
            "category": {
                "name": "Cold Drinks"
            }
        },
        {
            "sku": "HL002",
            "name": "Hot Latte",
            "description": "Hot Latte",
            "brand": {
                "name": "Coffee Ltd"
            },
            "family": {
                "name": "Coffee"
            },
            "category": {
                "name": "Warm Drinks"
            }
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a781bbc1-9067-c384-52fe-43586f89110a"
}
POST /synchronise_products HTTP/1.1 

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

{
    "products": [
        {
            "sku": "IL001",
            "name": "Iced Latte",
            "description": "Cold Brew Latte",
            "brand": {
                "name": "Brew Ltd"
            },
            "family": {
                "name": "Coffee"
            },
            "category": {
                "name": "Cold Drinks"
            },
            "pricing": {
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "price": 4.99,
                "currency": "EUR"
            }
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a781bbc1-9067-c384-52fe-43586f89110a"
}
POST https://sandbox.crm.com/backoffice/v1/synchronise_products HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "products": [
        {
            "sku": "SUGAR001",
            "name": "Brown Sugar",
            "description": "Brown Sugar",
            "type": {
                "name": "Condiments"
            },
            "brand": {
                "name": "Fresh Sug"
            },
            "pricing": {
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "price": 1.99,
                "currency": "EUR"
            }
        },
        {
            "sku": "FREESP01",
            "name": "Freddo Espress0",
            "description": "Freddo Espresso",
            "type": {
                "name": "Wet"
            },
            "brand": {
                "name": "Fresh Brew Inc"
            },
            "family": {
                "name": "Homebrew"
            },
            "category": {
                "name": "Drinks"
            },
            "pricing": {
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "price": 4.99,
                "currency": "EUR"
            }
        },
         {
            "sku": "MFREESP01",
            "name": "Freddo Espresso Medio",
            "description": "Freddo Espresso Medio",
            "type": {
                "name": "Wet"
            },
            "brand": {
                "name": "Fresh Brew Inc"
            },
            "family": {
                "name": "Homebrew"
            },
            "category": {
                "name": "Drinks"
            },
            "pricing": {
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "price": 5.99,
                "currency": "EUR"
            },
            "main_product_sku": "FREESP01",
            "variant_attributes": [
                {
                    "key": "size",
                    "value": "Primo"
                },
                {
                    "key": "size",
                    "value": "Maximo"
                }
            ],
            "components": [
                {
                    "sku": "SUGAR001",
                    "inclusive": true,
                    "mandatory": true,
                    "classification": "MODIFIER"
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a781bbc1-9067-c384-52fe-43586f89110a"
}
POST https://sandbox.crm.com/backoffice/v1/synchronise_products HTTP/1.1 

Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV

{
    "products": [
        {
            "sku": "SUGAR001",
            "name": "Brown Sugar",
            "description": "Brown Sugar",
            "type": {
                "name": "Condiments"
            },
            "family": {
                "name": "Coffee & Tea Condiments"
            },
            "categories": [{
                "code": "100"
            }],
            "pricing": {
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "price": 1.99,
                "currency": "EUR"
            }
        },
                {
            "sku": "FFM001",
            "name": "Full Fat",
            "description": "Full Fat Milk",
            "type": {
                "name": "Condiments"
            },
            "family": {
                "name": "Coffee & Tea Condiments"
            },
            "categories": [{
                "code": "100"
            },{
                "name": "Latte Medio Milk El"
            }]
            "pricing": {
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "price": 1.99,
                "currency": "EUR"
            }
        },
         {
            "sku": "MFREESP01",
            "name": "Freddo Espresso Medio",
            "description": "Freddo Espresso Medio",
            "type": {
                "name": "Wet"
            },
            "family": {
                "name": "FREDDO"
            },
            "categories": [{
                "code": "210"
            }],
            "pricing": {
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "price": 5.99,
                "currency": "EUR"
            },
            "components": [
                {
                    "product_category":  {
                        "code": "500"
                    },
                    "mandatory": false,
                    "classification": "MODIFIER",
                    "min_amount": 0,
                    "max_amount": 1,
                    "inclusive": true
                },
                {
                    "product_category":  {
                        "code": "100"
                    },
                    "mandatory": true,
                    "classification": "MODIFIER",
                    "min_amount": 1,
                    "max_amount": 2
                }
            ]
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a781bbc1-9067-c384-52fe-43586f89110a"
}
POST /synchronise_products HTTP/1.1 

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

{
    "products": [
        {
            "sku": "225092",
            "name": "Iced Mocha Grande",
            "type": {
                "name": "Coffees"
            },
            "brand": {
                "name": "Brew Ltd"
            },
            "family": {
                "name": "Cold Coffee"
            },
            "categories": [
                {
                    "name": "Coffee"
                }
            ],
            "pricing": {
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "price": 4.00,
                "currency": "EUR"
            },
            "components": [
                {
                    "sku": "282227",
                    "inclusive": "true",
                    "min_amount": 1,
                    "max_amount": 4,
                    "mandatory": "false",
                    "classification": "MODIFIER"
                }
            ]
        },
        {
            "sku": "282227",
            "name": "Classic Chocolate",
            "type": {
                "name": "Syrups"
            },
            "pricing": {
                "rate_model": "FLAT",
                "tax_model": "TAX_INCLUSIVE",
                "price": 0.00,
                "currency": "EUR"
            }
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a781bbc1-9067-c384-52fe-43586f89110a"
}