BackOffice Admin
Welcome to the CRM.COM Application Programming Interface (API) documentation
The CRM.COM API is designed around REST, allowing you to access and extend the software’s current functionality in a simple, programmatic way using intuitive URL endpoints, conventional HTTP requests, response codes, authentication and verbs.
Back-Office API is designed with a main focus on users and external systems that desire to access and extend the functionality found in CRM.COM.
For the Mobile/Web based Applications API please refer to the Self-Service API documentation that provides more details how to allow customer to manage their subscriptions and/or reward accounts.
CRM.COM BackOffice API uses either API keys to authenticate requests or an authentication JWT token obtained from a user successful logging in
API keys can be accessed and managed in the CRM.COM Dashboard. Such API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code and so forth
All API requests must be made over HTTPS. API requests made over plain HTTP or without authentication will fail. API keys authentication is made using -H “api_key : crm_test_;dwfwgiuhjr412edws”, while User Bearer Auth is achieved using -H “Authorization: Bearer JWT_TOKEN”
CRM.COM is built on a domain based micro-service architecture. Our primary resources such as Contact, Account, Wallet, Products, Subscriptions are all created with a unique identifier that uses a performant time based GUID. These are generated when a new resource such as a contact is created. However in some cases external integration may wish to use a unique identfier that is stored in an external system, such as a Bank CIF or Credit Card fingerprint.
Some systems allow from their create APIs to supply a unique identifier as part of the request body. CRM.COM has decided to provide an alternative approach and make an alternative unique identifier available on resources (e.g. on Contacts we provide the contact.code). If such attribute is specified during the create operation it wil be available on subsequent operations as a resource’s identifier, alongside with the GUID that is returned in the response body. Updating such resource can be achieved either using PUT /contact/GUID or PUT /contact/CODE.
CRM.COM uses conventional HTTP response codes and human-readable messages in JSON format to indicate the success or failure of an API request
- 2xx success status codes confirm that your request worked as expected
- 4xx error status codes indicate an error because of the information provided (e.g., a required parameter was omitted)
- 5xx error status codes are rare and indicate an error with Stripe’s servers
Please note that some 4xx errors that could be handled programmatically (e.g. a contact already exists) contain the following informaiion
- HTTP Code (programmatic consumption)
- Message (human-readable)
- Attribute (attribute that caused the error)
Below is a list of our common error codes that can be returned, along with additional information about how to resolve them
The request has succeeded
The input request was invalid or incorrect, often due to missing a required parameter
The provided API Key or Token is invalid
The API key or Token does not have permissions to perform the request
The requested resource does not exist
The server encountered an unexpected condition which prevented it from fulfilling the request
The server received an invalid response from the upstream server it accessed in attempting to fulfill the request
The server is currently unable to handle the request due to a temporary overloading or maintenance
The server did not receive a timely response from the upstream server
{id}/accounts{id}/accounts{id}{id}/life_cycle_state{id}/accountsAdd a new customer account to an existing contact
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The account’s classification ID
The account’s currency
If set to true, then the account will be set as the primary one even if a different one exists
The unique identification of a contact address which will be set as the billing address of the account. By default, the primary addres (if exists) will be provided
Responses
OK
Body
The account identifier
POST https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1
Content-Type: application/json
{
"classification_id": "4AD9C84FA60F9FE407140E20F707726A",
"currency_code": "USD",
"is_primary": true,
"billing_address_id": "4AD9C84FA60F9FE407140E20F707726A"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}/accountsGet a list of Contact Accounts. Normally a contact will have a single account but multiple accounts can be used to service different currencies, or different spending profiles.
Path variables
The contact identifier whose accounts will be retrieved
Request parameters
If set to true, then only the primary account of the contact will get retrieved
Defines on which attribute the results should be sorted
The page number that should be retrieved
The size (total records) of each page
Defines how the results will be ordered
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
The account identifier
Indicates the primary account of the contact
The account name
The Account number
The account’s life cycle state
The account’s currency
The account’s classification
The classification identifier
The classification name
The account’s calculated balance
The account’s credit limit
The unpaid amount that is passed its due date
The billing address of the account which is the same as one of the contact’s addresses
The account’s wallet information (if available)
The wallet identifier
The wallet’s life cycle state
GET https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/accounts HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"accounts": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"is_primary": true,
"name": "Default",
"number": "AC123456",
"life_cycle _state": "ACTIVE",
"currency_code": "",
"classification": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "VIP"
},
"balance": 200,
"credit_limit": 100,
"overdue_amount": 50,
"billing_address_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"wallet": {
"id": "6A24D2B5E44F44B28451FE021FCAD51E",
"code": "1234567898767543",
"balance": 200.2,
"currency_code": "EUR",
"life_cycle_state": "CANCELLED"
}
}
]
}
{id}Update the account of a contact
Path variables
The account identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The account’s classification ID
If set to true, then the account will be set as the primary one even if a different one exists
The unique identification of a contact address which will be set as the billing address of the account. By default, the primary addres (if exists) will be provided
Sets the credit limit of the account, within the allowed range based on settings
Responses
OK
Body
The account identifier
PUT https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Content-Type: application/json
{
"classification_id": "4AD9C84FA60F9FE407140E20F707726A",
"is_primary": true,
"billing_address_id": "4AD9C84FA60F9FE407140E20F707726A",
"credit_limit": 200
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}/life_cycle_stateChange the life cycle state of the Account
Path variables
The account identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The life cycle state that the account will changed into
The account to which any account/wallet balance will get transfered, in case of Termination
Responses
Successful Request
Body
The unique identifier of the account
POST /accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/life_cycle_state HTTP/1.1
Content-Type: application/json
{
"life_cycle_state": "TERMINATED",
"transfer_to_account_id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}/financials{id}/members{id}/members/{member_id}{id}/members/{member_id}{id}/members{id}/financialsGet a single Account with its financial information
Path variables
The unique identification of the Account to be retrieved.
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
The account’s name
The account’s number
Defines whether the account is the primary one of the contact
The account’s life cycle state
The account’s currency (3 code currency)
The account’s calculated balance
The unpaid amount that is passed its due date
The account’s credit limit
The ID of the latest closed accounting period
The name of the account’s latest accounting period
The opening balance brought forwards after the latest closed accounting period
The unique identifier of the Account classification
The name of the Account classification
The account’s wallet information (if available)
The wallet’s unique identifier
A unique 16-digit code that if not provided, it is auto-generated
The total balance of the wallet
The commerce balance of the wallet
The open balance of the wallet
The wallet’s life cycle state
The minimum wallet balance threshold. If not provided, the global rules apply
Defines the limit rules applied on specific wallet. If not provided, the global rules apply
The minimum amount allowed
The maximum amount allowed
The period for which the limit is applied
The wallet transaction type for which the limit is applied
Sets the threshold for the auto topup to be performed
The amount to get topped up
Indicates the method of collecting money
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.
The id of the billing address
GET https://stagingapi.crm.com/backoffice/v1/accounts/4AD9C84FA60F9FE407140E20F707726A/financials HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "John Smith AC00123456",
"number": "AC00123456",
"is_primary": "true",
"life_cycle_state": "SUSPENDED",
"currency_code": "EUR",
"balance": 200,
"overdue_amount": 100.5,
"credit_limit": 98,
"accounting_period_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"accounting_period_name": "OCTOBER2018",
"opening_balance": 100.5,
"classification": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "VIP"
},
"wallet": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"code": "W00123456",
"balance": 150.5,
"commerce_balance": 98,
"open_balance": 1,
"life_cycle_state": "EFFECTIVE",
"minimum_balance": 9,
"limit_rules": [
{
"minimum_amount": 100.5,
"maximum_amount": 200,
"period": "ANNUAL",
"transaction_type": "TRANSFER"
}
],
"auto_topup": {
"threshold": 10.5,
"amount": 10.5,
"payment_method": "PAYPAL",
"payment_method_id": ""
}
}
],
"billing_address": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"address_line_1": "2265 Oak Street",
"address_line_2": "",
"state_province_county": "New York",
"town_city": "Old Forge",
"postal_code": "13420",
"country_code": "USA"
}
}
{id}/membersAdd new member on an account group.
Path variables
The account identifier that will add a member in its group
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The account to join
The funding scope that the account joins the group
The funded products of the member account
Responses
Successful Request
Body
The unique identifier of the account
POST https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/members HTTP/1.1
Content-Type: application/json
{
"member_account_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"funding_scope": "PARTIALLY",
"products": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"product_types": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"product_families": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": ""
}
{id}/members/{member_id}Update a member of this account group
Path variables
The account identifier that the member belongs to
The member account identifier to be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The funding scope that the account joins the group
The funded products of the member account
Responses
Successful Request
Body
The unique identifier of the account
PUT https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/members/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Content-Type: application/json
{
"funding_scope": "FULLY",
"products": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"product_types": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"product_families": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": ""
}{id}/members/{member_id}Remove a member account from an account group
Path variables
The account identifier that the member belongs to
The member account identifier to be removed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
Body
The unique identifier of the account
DELETE https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/members/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}/membersLists the members of an account
Path variables
The account identifier for which the members will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The member account’s unique identifier
The member account’s number
The funding scope that the account joins the group
The unique identifier of the funded product
The SKU of the funded product
The unique identifier of the funded product type
The name of the funded product type
The unique identifier of the funded product family
The name of the funded product family
Responses
Successful Request
Body
The unique identifier of the account
GET https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/members HTTP/1.1
Content-Type: application/json
{
"members": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"number": "AC123456",
"funding_scope": "PARTIALLY",
"products": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"sku": "ABC123"
}
],
"product_types": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "FOOD"
}
],
"product_families": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "COFFEE"
}
]
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": ""
}
{id}/wallets{id}{id}/actions{id}/balances{id}/walletsAdd a new wallet for an existing account
Path variables
The account identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The minimum wallet balance threshold. If not provided, the global rules apply
Defines the limit rules applied on specific wallet. If not provided, the global rules apply
The maximum amount allowed
The wallet transaction type for which the limit is applied
The period for which the limit is applied
Responses
OK
Body
The wallet identifier
POST https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/wallets HTTP/1.1
Content-Type: application/json
{
"minimum_balance": 10,
"limit_rules": [
{
"limit_amount": 100,
"transaction_type": "DEBIT",
"period": "DAILY"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}Update the wallet of an account
Path variables
The wallet identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The minimum wallet balance threshold. If not provided, the global rules apply
Defines the limit rules applied on specific wallet. If not provided, the global rules apply
The minimum amount allowed
The maximum amount allowed
The period for which the limit is applied
The wallet transaction type for which the limit is applied
Sets the threshold for the auto topup to be performed
The amount to get topped up
Indicates the method of collecting money
The contact’s actual preferred payment method. Required and mandatory only for online payments (Card, Wallet, PayPal and Account). Defaults to the primary payment method, if any.
Responses
OK
Body
The wallet identifier
PUT https://stagingapi.crm.com/backoffice/v1/wallets/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Content-Type: application/json
{
"minimum_balance": 10,
"limit_rules": [
{
"minimum_amount": 100,
"maximum_amount": 200,
"period": "DAILY",
"transaction_type": "TRANSFER"
}
],
"auto_topup": {
"threshold": 10.5,
"amount": 10.5,
"payment_method": "ACCOUNT",
"payment_method_id": ""
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}/actionsChange the life cycle state of the Wallet
Path variables
The wallet identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Defines the life cycle state of the wallet. If selected, then all of the above will not be taken into consideration
Responses
Successful Request
Body
The unique identifier of the wallet
POST https://stagingapi.crm.com/backoffice/v1/wallets/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1
Content-Type: application/json
{
"action": "EFFECTIVE"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}/balancesGet the wallet’s balances split per spend condition
Path variables
The unique identification of the wallet whose balance spend conditions will be retrieved.
Request parameters
The id of a specific spend condition (optional). If not provided then all spend conditions are retrieved
If se to true, then the expiration information will also be retrieved
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
The amount that is allocated to the specified spend condition
The unique ID of the spend condition group
The name of the spend condition group
The organisations where the amount can be spent at
The ID of the organisation
The name of the organisation
The location of the organisation
The products that the amount can be spent for
The type of the ID to be provided
The ID of the product (based on the type provided)
The name of the product
The descrtipion of the product
The time when the amount can be spent
The month as a condition (1-12)
The day of the week as condition (1-7), 1 is Sunday
The start time of the day in 24 Hour format
The end time of the day in 24 Hour format
Defines the amounts expiring in periods. Available only if the parameter include_expiration is set to true
The amount that will expire in up to 30 days
The amount that will expire from 30 to 60 days
The amount that will expire from 60 to 90 days
The amount that will expire in more than 90 days
GET https://stagingapi.crm.com/backoffice/v1/wallets/4AD9C84FA60F9FE407140E20F707726A/balances HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"amount": 100.5,
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Happy Hour",
"organisations": [
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Cafe",
"locations": [
{
"name": "Head Office",
"address_line_1": "Elia Papakyriakou 21",
"address_line_2": "7 Tower Stars",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"country_code": "CY",
"lat": "35.157115",
"lon": "33.313719",
"googleplaceid": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
]
}
],
"products": [
{
"id_type": "FAMILY",
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "Coffee",
"description": "Brazilian Coffee"
}
],
"timings": [
{
"month": 1,
"day": 1,
"start_time": "19:00",
"end_time": "21:00"
}
],
"expiration": {
"zero_to_thirty": 50.5,
"thirty_to_sixty": 50.5,
"sixty_to_ninety": 50.5,
"ninety_plus": 50.5
}
}
]
Create a wallet debit or credit journal entry
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The unique identifier for which the journal entry will be created
The amount of the journal
The type of the journal
The description of the journal
The unique identifier of the related spend condition
The valid from date
The valid to date
The date and time when the journal actually created
Allows a wallet debit journal to take the wallet balance below zero. By default, the wallet balance cannot go below zero.
Responses
OK
Body
The wallet journal identifier
POST https://devapi.crm.com/backoffice/v1/journals HTTP/1.1
Content-Type: application/json
{
"wallet_id": "4AD9C84FA60F9FE407140E20F707726A",
"amount": 10,
"type": "DEBIT",
"description": "Credit adjustment by 10 EUR",
"spend_condition_id": "4AD9C84FA60F9FE407140E20F707726A",
"valid_from": 1587988965,
"valid_to": 1587988965,
"created_on": 1588081851
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}/rewards{id}/rewards{id}/merchants{id}/merchants/{merchant_id}{id}/reward_schemes{id}/reward_schemes/{reward_scheme_id}{id}/rewardsUpdate the reward attributes of the primary account of a contact
Path variables
The account identifier whose reward attributes will be updated
Notes
Only Primary Accounts of a Contact hold Reward information
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The date that the customer first signed up
The organisation identifier that signed up the customer (first time)
Defines whether the spending is blocked for the specific account
Information about the automatic spend settings for the account
Defines whether automatic spend is enabled for the account
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
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
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
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)
Responses
OK
Body
The account identifier
PUT https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/rewards HTTP/1.1
Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A
{
"signed_up_on": 1583846865,
"signed_up_organisation_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"spending_blocked_status": "true",
"automatic_spend_settings": {
"enable_automatic_spend": "false",
"automatic_spend_preference": "ALL_MERCHANT_PURCHASE",
"minimum_wallet_balance": 1,
"from_purchase_amount": 1.76
},
"preferred_payment_method_id": "CAD1E31269B76D7A65ACCE45B2E68DCD"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}/rewardsRetrieve the Rewards details if a single account
Path variables
The unique identification of the Account to be retrieved.
Notes
Only Primary Accounts of a Contact hold Reward information
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
The account identifier
The account’s name
The account’s number
The account’s currency (3 code currency)
The date when the account was signed up for the first time
Information about the organisation that sign up the account for the first time
The organisation identifier
The organisation name
Defines whether the account can spend or not
The date that the spending status of the account was updated
Information about the user that updated the spending status of the account
The user identifier
The user’s email address
The user’s first name
The user’s last name
Information about the automatic spend settings for the account
Defines whether automatic spend is enabled for the account
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
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
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
Information about the merchants that automatic spending is allowed
The merchant record identifier
Defines whether the merchant is setup for automatic spend on the next visit
Information about organisation
The organisation identifier
The organisation name
Information about the account’s reward tier
The reward tier identifier
The reward tier name
The designated hexadecimal code of the tier’s color
The account’s value units that accumulated during the last rolling period
The account’s value units that accumulated overall
The progression percentage until the next reward tier is reached
Details about The progression percentage for each reward tier
The progression percentage until the reward tier
Details about the reward tier
The reward tier identifier
The reward tier name
The tier (threshold) value units (inclusive)
The remaining value units to reach this tier
Information about the reward schemes that the account has signed up to
The reward scheme identifier
The reward scheme name
The date when the account was signed up on the specific reward scheme
The email address that was used during sign up (applicable if the reward scheme is a close loop scheme based on email domains)
Defines how customers can sign up to the reward scheme
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)
The preferred payment method identifier
The customer’s preferred payment method identifier that will be used for spending purposes
The first six digits of the card (applicable only if the payment method type is card based)
The last four digits of the card (applicable only if the payment method type is card based)
The bank’s iban (applicable only if the payment method type is direct debit based)
GET https://devapi.crm.com/backoffice/v1/accounts/4AD9C84FA60F9FE407140E20F707726A/rewards HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "John Smith AC00123456",
"number": "AC00123456",
"currency_code": "EUR",
"signed_up_on": 1583846865,
"sign_up_organisation": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "CRMdotCOM"
},
"spending_blocked_status": "false",
"spending_blocked_date": 1583846865,
"spending_blocked_user": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"email_address": "johndoe@crm.com",
"first_name": "John",
"last_name": "Doe"
},
"automatic_spend_settings": {
"automatic_spend_preference": "NEXT_MERCHANT_PURCHASE",
"minimum_wallet_balance": 0.52,
"from_purchase_amount": 1.78,
"allowed_merchants": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "CRMdotCOM"
}
]
},
"reward_tier": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Gold",
"color": "#d4af37",
"period_value_units": 222,
"lifetime_value_units": 333,
"next_tier_progression": 45.98
},
"joined_reward_schemes": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "CRMdotCOM Scheme"
"signed_up_on": 1583846865,
"email_address": "johndoe@crm.com",
"sign_up_option": "CLOSE_LOOP_SIGN_UP"
}
]
}
{id}/merchantsAdd a set of new merchants for automatic spends for that account
Path variables
The account identifier whose reward attributes will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Defines a list of merchants that are authorised to perform automatic awards spending for that account
The organisation identifier that should be authorised to perform automatic awards spending
Defines whether the merchant is setup for automatic spend on the next visit
Responses
OK
Body
A list of merchants that are authorised to perform automatic awards spending for that account
The organisation identifier
POST https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants HTTP/1.1
Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A
{
"merchants": [
{
"organisation_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"is_next_visit": "false"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"merchants": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
]
}{id}/merchants/{merchant_id}Remove an exisintg merchant from an account’s automatic spend preferences
Path variables
The account identifier whose reward attributes will be updated
The merchant identifier that will be removed from the spend preferences
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
DELETE https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/merchants/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK {id}/reward_schemesSign up the account to a specific reward scheme
Path variables
The account that will be signed up to the reward scheme
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The reward scheme that the account has signed up
The email address of the customer requestng to sign uo to a reward scheme based on supported domains
The code that will verify that the customer is allowed to sign up to a close loop reward scheme
The date that the account has signed up (if not specified, defaults to current date)
Responses
OK
Body
The reward scheme identifier
POST https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes HTTP/1.1
Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A
{
"reward_scheme_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"email_address": "johndoe@crm.com",
"sign_up_code": "ABCDEFG1234"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DXD"
}{id}/reward_schemes/{reward_scheme_id}Sign out the account from a specific reward scheme
Path variables
The account that will be signed off from the reward scheme
The reward scheme identifier that the account has signed off
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
DELETE https://devapi.crm.com/backoffice/v1/accounts/CAD1E31269B76D7A65ACCE45B2E68DFD/reward_schemes/CAD1E31269B76D7A65ACCE45B2E68DXD HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK {id}{id}{id}/life_cycle_state{id}Create a new activity
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The activity subject
The activity description
The organisation identifier from which a user wil be responsible to complete this activity (organisation or user should be specified)
The user identifier that is responsible to complete this activity (user should belong to the specified organisation)
Related entity details
The type of the related entity
The related entity identifier
Responses
Successful Request
Body
The activity identifier that was created
POST https://devapi.crm.com/backoffice/v1/activities HTTP/1.1
Content-Type: application/json
{
"subject": "Call customer",
"description": "We need to call the customer (after 4pm) in order to schedule a demo",
"organisation_id": "CEEE83D6E0804A30966F684B0269ROLE"
"entity": {
"type": "LEAD",
"id": "CEEE83D6E0804A30966F684B0269AD91"
}
}{id}Update an existing activity
Path variables
The activity identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The activity subject
The activity description
The organisation identifier from which a user wil be responsible to complete this activity (organisation or user should be specified)
The user identifier that is responsible to complete this activity (user should belong to the specified organisation)
Responses
Successful Request
Body
The activity identifier that was updated
PUT https://devapi.crm.com/backoffice/v1/activities/QWERTY1234543212345678UJIKY76HJR HTTP/1.1
Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A
{
"subject": "Approve Offers",
"description": "Require 4 approvals for an offer",
"organisation_id": "CEEE83D6E0804A30966F684B0269ROLE"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "QWERTY1234543212345678UJIKY76HJR"
}{id}Delete an existing activity
Path variables
The activity identifier that will be deleted
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
DELETE https://devapi.crm.com/backoffice/v1/automations/QWERTY1234543212345678UJIKY76HJR HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK {id}/life_cycle_stateUpdate an existing activity’s life cycle state
Path variables
The activity identifier whose life cycle state will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Defines the new life cycle state of the activity
Responses
Successful Request
Body
The activity identifier that was updated
PUT https://devapi.crm.com/backoffice/v1/activities/QWERTY1234543212345678UJIKY76HJR/life_cycle_state HTTP/1.1
Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A
{
"life_cycle_state": "COMPLETED"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "QWERTY1234543212345678UJIKY76HJR"
}Search for activities
Request parameters
Filter based on activity state
Filter based on the related Order
Filter based on the related Lead
Filter based on the related Service Request
Filter based on the ORganisation of which users are responsible to complete it
Filter based on the User who is responsible to complete it
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The activity identifier
The activity subject
The activity description
The activity life cycle state
The organisation from which users are responsible to complete the activity
The organisation identifier
The organisation name
The user that is responsible to complete the activity
The user identifier
The user name
The page number
The number of records per page
The overal number of records
GET https://devapi.crm.com/backoffice/v1/activities HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"subject": "Call customer",
"description": "We need to call the customer to arrange a demo",
"life_cycle_state": "COMPLETED",
"organisation": {
"id": "CEEE83D6ER804A30966F684B0269AD91",
"name": "MArketing"
}
"user": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "John Doe"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Get details for a specific activity
Path variables
The activity identifier that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The activity identifier
The activity subject
The activity description
The activity state
The organisation from which users are responsible to complete the activity
The organisation identifier
The organisation name
The user that is responsible to complete the activity
The user identifier
The user name
GET https://devapi.crm.com/backoffice/v1/activities/CEEE83D6E0804A30966F684B0269AD91 HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"subject": "Call customer",
"description": "Arrange a call with the customer after 4pm to schedule a demo for next week",
"life_cycle_state": "PENDING",
"organisation": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "Marketing"
}
}
{id}{id}/preview{id}/analytics{id}/analytics{id}Runs a report and sends its results via email to the user who runs it
Path variables
The unique name of the report
Request body
The report’s format
Set of filters based on which the report runs
The filter’s label
The filter’s name
The filter’s value as this was specified by the user
The data type of the filter
Set of columns that will be included in the report
Number, NameThe ordering of the columns from left to right
The column’s label as this will be displayed on the report
The field’s name
Set of fields to be used to group the report’s results
The grouping’s ordering
The group by field’s label as this will be displayed on the report
The field’s name
Responses
POST https://devapi.crm.com/backoffice/v1/reports/{id} HTTP/1.1
Content-Type: application/json
{
"format": "CSV",
"filters_set": [
{
"label": "Registration date",
"key": "period_from",
"value": "THIS_MONTH",
"type": "INTEGER"
}
],
"columns_set": [
{
"order": 1,
"label": "Code",
"key": "product_code",
"type": "TEXT"
}
],
"group_by_set": [
{
"order": 1,
"label": "Type",
"key": "product_type",
"type": "NUMBER"
}
]
}
Contacts Summary Report example
POST https://devapi.crm.com/backoffice/v1/reports/contacts_summary HTTP/1.1
Content-Type: application/json
{
"format": "PDF",
"filters_set": [
{
"label": "Registered From",
"key": "registered_from",
"value": "1577879016",
"type" : "date"
},
{
"label": "Registered To",
"key": "registered_to",
"value": "1589370216",
"type" : "date"
}
],
"columns_set": [
{
"key": "code",
"type" : "text",
"label": "Code",
"order": 1
},
{
"key": "contact_name",
"type" : "text",
"label": "Name",
"order": 2
},
{
"key": "registered_on",
"type" : "date",
"label": "Registered On",
"order": 3
},
{
"key": "owned_by.name",
"type" : "text",
"label": "Owned By",
"order": 5
},
{
"key": "financials.primary_account.number",
"type" : "text",
"label": "Primary Account",
"order": 6
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.balance",
"type" : "text,amount",
"label": "Account Balance",
"order": 7
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"type" : "text,amount",
"label": "Overdue Amount",
"order": 8
},
{
"key": "financials.wallet.code",
"type" : "text",
"label": "Wallet",
"order": 9
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"label": "Wallet Balance",
"type" : "text,amount",
"order": 10
}
],
"group_by_set": [
{
"key": "category.name",
"type" : "text",
"label": "Category",
"order": 1
}
]
}
{id}/previewRuns the report in preview mode, i.e. a subset of the report’s results are returned for preview purposes (max 10 records included in the response)
Path variables
The unique name of the report
Request body
Set of filters based on which the report runs
The filter’s name
The filter’s value as this was specified by the user
Set of columns that will be included in the report’s preview. Up to 10 columns are included by default
Number, NameThe field’s name
Responses
Body
List of columns to be displayed in the report’s preview. Maximum 10 records are included in the preview
GET https://devapi.crm.com/backoffice/v1/reports/{id}/preview HTTP/1.1
Content-Type: application/json
{
"filters_set": [
{
"key": "period_from",
"value": "This month"
}
],
"columns_set": [
{
"order": 1,
"key": "product_code",
"value": "Code"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"order": 1,
"key": "Name",
"value": "Jane Smith"
}
]
}
Preview Contacts Summary example
GET https://devapi.crm.com/backoffice/v1/reports/contacts_summary/preview HTTP/1.1
Content-Type: application/json
{
"filters_set": [
{
"key": "registered_from",
"value": "1577877342"
},
{
"key": "registered_to",
"value": "1589282142"
}
],
"columns_set": [
{
"key": "contact_name"
},
{
"key": "registered_on"
},
{
"key": "category.name"
},
{
"key": "owned_by.name"
},
{
"key": "financials.primary_account.number"
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance"
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount"
},
{
"key": "financials.wallet.number"
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance"
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"fields": [
{
"key": "contact_name",
"value": "Marios Ioannou11"
},
{
"key": "registered_on",
"value": "1590493499"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": "A10009"
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": "38.0"
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": "TWD 0"
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": "TWD 0.0"
}
]
},
{
"fields": [
{
"key": "contact_name",
"value": "Marios Ioannou10"
},
{
"key": "registered_on",
"value": "1590492704"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": "A10008"
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": "0.0"
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": "USD 0"
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": "USD 0.0"
}
]
},
{
"fields": [
{
"key": "contact_name",
"value": "Marios Ioannou9"
},
{
"key": "registered_on",
"value": "1590475066"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": "A10007"
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": "3.4"
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": "EUR 0"
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": "EUR 0.0"
}
]
},
{
"fields": [
{
"key": "contact_name",
"value": "George Rewards"
},
{
"key": "registered_on",
"value": "1590468310"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": "A10006"
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": "15.0"
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": "USD 0"
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": "USD 0.0"
}
]
},
{
"fields": [
{
"key": "contact_name",
"value": "Mikaela Schiza"
},
{
"key": "registered_on",
"value": "1589794026"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": "A10003"
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": "-10.0"
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": "EUR 0"
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": "EUR 0.0"
}
]
},
{
"fields": [
{
"key": "contact_name",
"value": "Marios Ioannou8"
},
{
"key": "registered_on",
"value": "1589446686"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": "A10001"
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": "22.0"
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": "CAD 0"
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": "CAD 0.0"
}
]
},
{
"fields": [
{
"key": "contact_name",
"value": "Marios Ioannou7"
},
{
"key": "registered_on",
"value": "1589396523"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": "A10001"
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": "0.0"
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": "USD 0"
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": "USD 0.0"
}
]
},
{
"fields": [
{
"key": "contact_name",
"value": "Marios Ioannou5"
},
{
"key": "registered_on",
"value": "1589374073"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": ""
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": ""
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": ""
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": ""
}
]
},
{
"fields": [
{
"key": "contact_name",
"value": "Giorgos Georgiou"
},
{
"key": "registered_on",
"value": "1589370096"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": ""
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": ""
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": ""
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": ""
}
]
},
{
"fields": [
{
"key": "contact_name",
"value": "Marios Ioannou4"
},
{
"key": "registered_on",
"value": "1589368957"
},
{
"key": "category.name",
"value": ""
},
{
"key": "owned_by.name",
"value": ""
},
{
"key": "financials.primary_account.number",
"value": ""
},
{
"key": "financials.primary_account.currency_symbol,financials.primary_account.balance",
"value": ""
},
{
"key": "financials.primary_account.currency_code,financials.primary_account.overdue_amount",
"value": ""
},
{
"key": "financials.wallet.number",
"value": ""
},
{
"key": "financials.wallet.wallet_currency_code,financials.wallet.balance",
"value": ""
}
]
}
]
}
{id}/analyticsGet analytics for an organisation
Path variables
The organisation identifier that is optionally a parent. If the organisation is a Parent an optional paramter can request children in the same response.
Request parameters
Which metrics are required
[
"visits","offers","transactions","products","awards","wallets"
]Start of Sequence - used for sliding window
End of Sequuence used for sliding window
Children inclusion from the network
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
Metric Type Requested
Timestamp base on the requested unit, in EPOCH format with YEAR-MONTH-DAY-HOUR, or YEAR-MONTH-DAY, YEAR-MONTH inteded for granularity.
The total for the given timestamp
GET https://devapi.crm.com/backoffice/v1/organisations/babc8d45-50be-4259-b1bf-c85dee46642f/analytics HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{"content" : [
{
"organisationId": "bf07da38-0d34-11ea-9518-42010a9a0003",
"organisationName": "Banana Wharf Hamble",
"purchases": [
{
"timestamp": 1588600800,
"number": 321.00
},
{
"timestamp": 1588604400,
"number": 64.00
},
{
"timestamp": 1588665600,
"number": 150.00
},
{
"timestamp": 1588672800,
"number": 36.00
},
{
"timestamp": 1588744800,
"number": 198.00
},
{
"timestamp": 1588748400,
"number": 256.00
},
{
"timestamp": 1588752000,
"number": 134.52
},
{
"timestamp": 1588755600,
"number": 165.78
},
{
"timestamp": 1588827600,
"number": 98.21
}
]
},
{
"organisationId": "cc44858b-0d34-11ea-9518-42010a9a0003",
"organisationName": "Banana Wharf Poole",
"purchases": [
{"timestamp": 1588600800,
"number": 321.00
},
{
"timestamp": 1588604400,
"number": 64.00
},
{
"timestamp": 1588665600,
"number": 150.00
},
{
"timestamp": 1588672800,
"number": 36.00
}
]
}
]}
{id}/analyticsGet analytics for a customer
Path variables
The uique identifier of the contact
Request parameters
Which metrics are required
[
"visits","awards","transactions"
]Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
The metric’s name
GET https://devapi.crm.com/backoffice/v1/contacts/babc8d45-50be-4259-b1bf-c85dee46642f/analytics HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"name": "visits",
"values": {
"hour": 1,
"today": 2,
"this_week": 2,
"this_month": 10,
"last_month": 15,
"this_quarter": 15,
"this_semester": 30,
"this_year": 45
}
}
]Returns a list of Events logged in Mongo DW
Request parameters
Responses
Body
POST https://stagingapi.crm.com/backoffice/v1/events HTTP/1.1
HTTP/1.1 201 Created
Content-Type: application/json
{
"type": "PURCHASE",
"business": {
"id": "",
"name": ""
},
"submitted_on": 4343432132,
"submitted_day": "MONDAY",
"contact": {
"id": "fffe6dc7-dd1a-441a-a747-60f5d0c6a844"
},
"financials": {
"account": {
"id": "",
"number": "",
"name": ""
},
"wallet": {
"id": "",
"code": ""
}
},
"merchant": {
"id": "",
"name": ""
},
"venue": {
"id": "",
"name": ""
},
"subsidiary": {
"id": "",
"name": ""
},
"location": {
"city": "",
"province": "",
"country": "",
"postal_code": "",
"address_line_1":"",
"address_line_2":""
},
"transaction": {
"id": "",
"number": "",
"reference_number": "",
"notes": "",
"classification": "PURCHASE",
"life_cycle_state": "POSTED",
"total_amount": 1,
"net_amount": 1,
"tax_amount": 1,
"discount_amount": 1,
"quantity": 10,
"currency": "EUR",
"due_date": 1221213243,
"expiration_date": 1312312312,
"issue_date": 12345,
"posted_date": 2313344,
"type": {
"id": "",
"name": ""
}
},
"initiating_transaction": {
"id": "",
"number": "",
"classification": "REFERRAL",
"type": {
"id": "",
"name": ""
}
},
"award": {
"amount": 0.5,
"currency": "EUR",
"awarded_on": 1234556,
"expires_on": 123123123,
"reward_offer": {
"id": "",
"name": ""
},
"reward_scheme": {
"id": "",
"name": ""
}
},
"spend": {
"amount": 1,
"currency": "EUR",
"spend_method": "",
"instant_spend": 1,
"auto_spend": 0.5,
"on_request": 0.5
},
"rewards_sign_up": {
"sign_up_on": 1234566,
"sign_out_on": 123456,
"reward_scheme": {
"id": "",
"name": ""
}
},
"payment_information": {
"payment_method_type": "CARD",
"brand": "MASTERCARD",
"funding_type": "DEBIT"
},
"communication": {
"id": "",
"life_cycle_state": "",
"channel": ""
},
"order": {
"id":"",
"number":"",
"life_cycle_state":"NEW",
"supply_method":"DELIVERY",
"is_favorite":true,
"notes":"",
"submitted_date":12345678,
"estimated_fulfillment_date":12345678,
"completed_date":12345678,
"cancelled_date":12345678,
"expiration_date":12345678,
"requested_date":12345678,
"total_cost":2.40,
"currency":"EUR",
"cancellation_reason":{
"id":"",
"name":""
},
"category":{
"id":"",
"name":""
}
},
"products": [
{
"id": "99c90eb3-64e6-4048-b3a3-d433611cfa93",
"sku": "ABC9678",
"name": "Regular Latte",
"type": {
"id": "",
"name": ""
},
"family": {
"id": "",
"name": ""
},
"brand": {
"id": "",
"name": ""
},
"category": {
"id": "",
"name": ""
},
"quantity": 1,
"total_amount": 1,
"net_amount": 1,
"tax_amount": 1,
"discount_amount": 1,
"currrency": "GBP",
"notes":"",
"bundle_product": {
"id": "",
"sku": "",
"name": ""
}
}
]
}
Responses
Body
POST https://devapi.crm.com/backoffice/v1/contact_profiles HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"contacts": [
{
"id": "",
"code": "4234392059483233",
"type": "PERSON",
"name": "",
"surname": "",
"gender": "FEMALE",
"preferred_language": "GR",
"email": "jmith@testing.com",
"phone": "0035799435233",
"category": {
"id": "",
"name": ""
},
"industry": {
"id": "",
"name": ""
},
"industry_sectors": [
{
"id": "",
"name": ""
}
],
"birthday": {
"day": 28,
"month": 3,
"year": 1981
},
"nameday": {
"day": 23,
"month": 4
},
"location": {
"city": "Hamble",
"province": "Hampshire",
"country": "United Kingdom",
"postal_code": "PO345HD"
},
"payment_method": {
"type": "",
"funding_type": "",
"brand": ""
},
"financials": [
{
"account": {
"id": "",
"number": "",
"name": "",
"balance": 1.99,
"overdue_amount": 0.99,
"credit_limit": 100,
"currency": "EUR",
"classification": {
"id": "",
"name": ""
},
"billing_location": {
"city": "Hamble",
"province": "Hampshire",
"country": "United Kingdom",
"postal_code": "PO345HD"
},
"life_cycle_state": "",
"rewards_tier": {
"id": "",
"name": ""
},
"preferred_spending_method": ""
},
"wallet": {
"id": "",
"code": "",
"balance": "",
"life_cycle_state": ""
}
}
],
"reward_schemes":[
{
"id":"",
"name":"",
"signed_up_date":123456788
}
]
}
]
}
List of Web APIs used to retrieve informaiton displayed in Reports
Retrieves details information for a contact that perticipates in a Reward Scheme in terms of purchases, awards and spends
Request parameters
The contact’s reward tier
The contact’s category
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
The contact’s unique identifier
The contact’s full name or company name
The page number
The number of records per page
The overal number of records
GET https://stagingapi.crm.com/backoffice/v1/contact_rewards_analysis HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "",
"name": "John Smith",
"code": "",
"loyalty_code": "123344555",
"sign_up_date": 123456789,
"tier": {
"id": "",
"name": ""
},
"category": {
"id": "",
"name": ""
},
"wallet": {
"id": "",
"code": "",
"balance": 9.99,
"currency": "EUR"
},
"purchases": {
"number": 10,
"amount": 99.99,
"days_since_last_purchase": 35,
"currency": ""
},
"awards": {
"number": 10,
"amount": 99.99,
"days_since_last_award": 35,
"currency": ""
},
"spends": {
"number": 10,
"amount": 99.99,
"days_since_last_spend": 35,
"currency": ""
}
}
],
"pages": {
"page": 2,
"size": 20,
"total": 5124
}
}
Retrieves details information for a contact and the items purchased through an Order
Request parameters
The creation date of the order
The contact’s category
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Body
The page number
The number of records per page
The overal number of records
GET https://stagingapi.crm.com/backoffice/v1/contact_order_analysis HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "",
"name": "John Smith",
"code": "",
"category": {
"id": "",
"name": ""
},
"number_of_orders": 4,
"total_order_amount": 10,
"average_order_value": 2.5,
"curency": "EUR",
"days_since_last_order": 3,
"preferred_supply_method": "DELIVERY",
"preferred_payment_method": "CARD"
}
],
"pages": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}{id}{id}{id}/actions{id}/actionsCreate a new automation
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The automation name
The automation description
Defines whether the automation is active or not
Defines the entity that its events will trigger this automation
Defines the event that will trigger this automation (filtered based on the selected entity)
Responses
Successful Request
Body
The automation identifier that was created
POST https://stagingapi.crm.com/backoffice/v1/automations HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"name": "Approve Offers",
"description": "Require 4 approvals for an offer",
"life_cycle_state": "INACTIVE",
"entity": "CONTACTS",
"event": "REGISTER_CONTACT"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "QWERTY1234543212345678UJIKY76HJR"
}{id}Update an existing automation
Path variables
The automation identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The automation name
The automation description
Defines whether the automation is active or not
Responses
Successful Request
Body
The automation identifier that was updated
PUT https://devapi.crm.com/backoffice/v1/automations/QWERTY1234543212345678UJIKY76HJR HTTP/1.1
Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A
{
"name": "Approve Offers",
"description": "Require 4 approvals for an offer",
"state": "INACTIVE"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "QWERTY1234543212345678UJIKY76HJR"
}{id}Delete an existing automation
Path variables
The automation identifier that will be deleted
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
DELETE https://devapi.crm.com/backoffice/v1/automations/QWERTY1234543212345678UJIKY76HJR HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK Search for automations
Request parameters
Search automations based on Name
Filter based on automation name
Filter based on automation state
Filter based on the entity that its event will trigger the automation
Filter based on the event that will trigger the automation
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The automation identifier
The automation name
The automation description
The automation life cycle state
The entity that its events triggered the automation
The event that triggered the automation
The page number
The number of records per page
The overal number of records
GET https://stagingapi.crm.com/backoffice/v1/automations HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "Notify customers on award",
"description": "Lorem Ipsum",
"life_cycle_state": "INACTIVE",
"entity": "Contacts",
"event": "Register Customer"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Get details for a specific automation
Path variables
The automation identifier that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The automation identifier
The automation name
The automation description
The automation state
The entity that its events trigger the automation
The event that will trigger the automation
GET https://devapi.crm.com/backoffice/v1/automations/CEEE83D6E0804A30966F684B0269AD91 HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "Notify awarded customers",
"description": "On customer award an outbound email communication will be triggered",
"life_cycle_state": "INACTIVE",
"entity": "CONTACTS",
"event": "AWARD_CUSTOMER"
}{id}/actionsSet the sequence of actions (including filters) for a specific automation
Path variables
The automation identifier whose sequence will be set
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The automation action identifier
The automation adaptor
Approval Requests
Automatic Content Updates
Communications
Order Provision
Service Request Provision
Webhooks
MICROS Simphony Order Provision
NCR Aloha Order Provision
The automation adaptor action (each action is applicable for specific adaptors)
Request Appoval (Approval Requests adaptor)
Update Content (Automatic Content Updates adaptor)
Communicate Customer (Communications adaptor)
Communicate User (Communications adaptor)
Assign To A Specific User (Order Provision & Service Request Provision adaptor)
Fulfilled By Specific Organisation (Order Provision & Service Request Provision adaptor)
Assign To Specific Department (Order Provision adaptor)
Fulfilled By Nearest Location (Order Provision adaptor)
Fulfilled Based On Post Code Coverage (Order Provision adaptor)
POST Webhook (webhooks adaptor)
Put Webhook (webhooks adaptor)
Assign To User Of A Specific Department (Service Request Provision adaptor)
Assign To User Of A Specific User Role (Service Request Provision adaptor)
Fulfilled By User Of A Specific User Role (Service Request Provision adaptor)
Fulfilled By Specific User (Service Request Provision adaptor)
Provision Order To Simphony POS (MICROS Simphony Order Provision adaptor)
Provision Order To Aloha POS (NCR Aloha Order Provision adaptor)
Defines the sequence’s action
Defines the sequence path
Details about the adaptor’s actions parameters
The parameter identifier
The parameter group (used when more than one parameters should be specified for an adaptor’s action)
The parameter key
The parameter from value
The parameter to value
The parameter type
Details about the filters to be applied (required when type is based on Filter)
The action filter identifier
Details about the applicable filtered attributes
The filter identiifer
The attribute that its value will be compared based on the related operator
The type of the key
The filter operator to compare the attribute actual value with the filtered one
Applicable for type of number/integer/date
Applicable for type of string
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
The attribute value to apply the filter condition (either value or value_list should be specified)
The supported list of values (either value or value_list should be specified)
Responses
OK
Body
The automation identifier
POST https://stagingapi.crm.com/backoffice/v1/automations/6A24D2B5E44F44B28451FE021FCAD51E/actions HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"content": [
{
"id": "ACTIONB5E44F44B28451FE021FCAD51E",
"adaptor": "APPROVAL_REQUESTS",
"adaptor_action": "ASSIGN_SPECIFIC_DEPARTMENT",
"order": 1,
"path": "1",
"adaptor_action_parameters": [
{
"id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
"parameter_group": "1",
"parameter_key": "RICH_CONTENT",
"parameter_from_value": "123",
"parameter_to_value": "1234",
"parameter_type": "APPROVAL_ENTITY_TYPE"
}
],
"action_filters": [
{
"filters": [
{
"id": "edd5ac0e-05e3-e543-d38e-c6df6eed8d46",
"attribute": "NAME",
"type": "NUMBER",
"operator": "EQUAL_LESS",
"value": "123",
"value_list": [
""
]
}
]
}
]
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "6A24D2B5E44F44B28451FE021FCAD51E"
}
{id}/actionsRetrieves the automation’ sequence of actions (including filters)
Path variables
The automation identifier whose actions will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
The automation action identifier
Defines the sequence’s action
The automation adaptor
Approval Requests
Automatic Content Updates
Communications
Order Provision
Service Request Provision
Webhooks
MICROS Simphony Order Provision
NCR Aloha Order Provision
The automation adaptor action (each action is applicable for specific adaptors)
Request Appoval (Approval Requests adaptor)
Update Content (Automatic Content Updates adaptor)
Communicate Customer (Communications adaptor)
Communicate User (Communications adaptor)
Assign To A Specific User (Order Provision & Service Request Provision adaptor)
Fulfilled By Specific Organisation (Order Provision & Service Request Provision adaptor)
Assign To Specific Department (Order Provision adaptor)
Fulfilled By Nearest Location (Order Provision adaptor)
Fulfilled Based On Post Code Coverage (Order Provision adaptor)
POST Webhook (webhooks adaptor)
Put Webhook (webhooks adaptor)
Assign To User Of A Specific Department (Service Request Provision adaptor)
Assign To User Of A Specific User Role (Service Request Provision adaptor)
Fulfilled By User Of A Specific User Role (Service Request Provision adaptor)
Fulfilled By Specific User (Service Request Provision adaptor)
Provision Order To Simphony POS (MICROS Simphony Order Provision adaptor)
Provision Order To Aloha POS (NCR Aloha Order Provision adaptor)
Details about the adaptor’s actions parameters
The parameter identifier
The parameter key
The parameter from value
The parameter to value
The parameter type
The parameter group (used when more than one parameters should be specified for an adaptor’s action)
Details about the filters to be applied (required when type is based on Filter)
The action filter identifier
Details about the applicable filtered attributes
The filter identiifer
The attribute that its value will be compared based on the related operator
The type of the key
The filter operator to compare the attribute actual value with the filtered one
Applicable for type of number/integer/date
Applicable for type of string
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
Applicable for type of number/integer/date
The attribute value to apply the filter condition (either value or value_list should be specified)
The supported list of values (either value or value_list should be specified)
GET https://stagingapi.crm.com/backoffice/v1/automations/6A24D2B5E44F44B28451FE021FCAD51E/actions HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "ACTIONB5E44F44B28451FE021FCAD51E",
"order": 1,
"adaptor": "COMMUNICATIONS",
"adaptor_action": "REQUEST_APPROVAL",
"adaptor_action_parameters": [
{
"id": "4b8e0ae7-0f8a-4313-a1fd-ecc1c0510f55",
"parameter_key": "RICH_CONTENT",
"parameter_from_value": "123",
"parameter_to_value": "1234",
"parameter_type": "SUPPLY_METHOD",
"parameter_group": "1"
}
],
"action_filters": [
{
"filters": [
{
"id": "edd5ac0e-05e3-e543-d38e-c6df6eed8d46",
"attribute": "NAME",
"type": "NUMBER",
"operator": "GREATER",
"value": "123",
"value_list": [
""
]
}
]
}
]
}
]
}
{id}/actions/{action_id}/records/{record_id}{id}/actions/{action_id}/records{id}/actions/{action_id}/records/{record_id}{id}/actions/{action_id}/records/{record_id}Change the value of a specific adaptor action record attribute
Path variables
The approval request identifier that will be updated
The action identifier whoe record will be retrieved
The record identifier that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The record’s key
The record’s value
Responses
Successful Request
Body
The record identifier
POST https://stagingapi.crm.com/backoffice/v1/adaptors/CAD1E31269B76D7A65ACCE45B2E68DFD/actions/CAD1E31269B76D7A65ACCE45B2E68DFQ/records/CAD1E31269B76D7A65ACCE45B2E68DFJ HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"key": "url-endpoint",
"value": "https://crm.com"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}/actions/{action_id}/recordsSearch for an adaptor action’s records (e.g. CRM.COM Apporvals Adaptor approval requests)
Path variables
The adaptor identifier whose actions will be retrieved
The action identifier that will be retrieved
Request parameters
Defines the entitiy type that the search will be applied (required for search_value)
Defines the free text search parameter based on the provided type (required when search_type is specified)
Filter based on automations that triggered such action
Filter based on adapto action that created such record
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The record identifier
Details about the records attributes
The attribute identifier
The record’s attribute key
The record’s attribute label
The record’s attribute type
The record’s attribute value
The page number
The number of records per page
The overal number of records
GET https://stagingapi.crm.com/backoffice/v1/adaptors/82697d43-4970-4dcc-bd35-7df27c72b8f6/actions/1b75a53f-b189-40bb-8db0-39b0578a6aqa/records HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"record_attributes": [
{
"id": "CEEE83D6E0804A30966F684B0269AD9G",
"key": "url-endpoint",
"label": "URL Endpoint",
"type": "string",
"value": "https://crm.com"
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/actions/{action_id}/records/{record_id}Retrieve details for a specifc adaptor action’s records (e.g. CRM.COM WEbhooks Adaptor webhook request)
Path variables
The adaptor identifier whose action’s record will be retrieved
The action identifier whoe record will be retrieved
The record identifier that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The record identifier
Details about the record attributes
The attribute identifier
The record’s attribute key
The record’s attribute label
The record’s attribute type
The record’s attribute value
GET https://stagingapi.crm.com/backoffice/v1/adaptors/82697d43-4970-4dcc-bd35-7df27c72b8f6/actions/1b75a53f-b189-40bb-8db0-39b0578a6aqa/records/1b75a53f-b189-40bb-8db0-39b0578a6a2w HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "be8c05c4-2f97-4b40-a979-42f066db265c",
"record_attributes": [
{
"id": "be8c05c4-2f97-4b40-a979-42f066db26qw",
"key": "url-endpoint",
"label": "URL Endpoint",
"type": "string",
"value": "https://crm.com"
}
]
}
{id}{id}{id}Create a new webhook
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The webhook name
The webhook method type
The webhook url endpoint
Defines how the webhook will be protected
The username that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)
The password that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)
The api key that will auth the webhook requests (applicable if url_auth = API_KEY)
Responses
OK
Body
The webhook identifier
POST https://stagingapi.crm.com/backoffice/v1/webhooks HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"name": "CRMdotCOM Delivery",
"method": "POST",
"url_endpoint": "https://crm.com/delivery",
"url_auth": "NO_AUTH",
"username": "johndoe",
"password": "crm.com",
"api_key": "qwert-12345-qwewerwer-123234234-werwerwr"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "API1E31269B76D7A65ACCE45B2E68DFD"
}
{id}Update an existing webhook
Path variables
The webhook identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The webhook name
The webhook url endpoint
Defines how the webhook will be protected
The username that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)
The password that will auth the webhook requests (applicable if url_auth = USERNAME_PASSWORD)
The api key that will auth the webhook requests (applicable if url_auth = API_KEY)
Responses
OK
Body
The webhook identifier
PUT https://devapi.crm.com/backoffice/v1/webhooks/CAD1E31269B76D7A65ACCE45B2E68WHI HTTP/1.1
Content-Type: application/json
authorization: 4AD9C84FA60F9FE407140E20F707726A
{
"name": "CRMdotCOM Delivery",
"url_endpoint": "https://crm.com/delivery",
"url_auth": "NO_AUTH",
"username": "johndoe",
"password": "crm.com",
"api_key": "qwert-12345-qwewerwer-123234234-werwerwr"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "API1E31269B76D7A65ACCE45B2E68DFD"
}{id}Delete an existing webhook
Path variables
The webhook identifier that will be deleted
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
DELETE https://devapi.crm.com/backoffice/v1/webhooks/CAD1E31269B76D7A65ACCE45B2E68WHI HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK Retrieve all webhooks
Request parameters
The value of the search (case insensitive) across Name, URL Endpoint
Filter based on the name
Filter based on the url endpoint
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
Information about the organisation’ webhooks
The webhook identifier
The webhook name
The webhook method type
The webhook url endpoint
Defines how the webhook url will be protected
The number of pending requests
The number of successful requests
The number of failed requests
The page number
The number of records per page
The overal number of records
GET https://devapi.crm.com/backoffice/v1/webhooks HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "API1E31269B76D7A65ACCE45B2E68DFD",
"name": "Registration Name",
"url_endpoint": "https;//crm.com/delivery",
"url_auth": "API_KEY"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}{id}Get details of a single webhook
Path variables
The webhooks identifier that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
Information about the organisation’ webhooks
The organisation’s webhook identifier
The webhook name
The webhook method type
The webhook url endpoint
Defines how the webhook url will be protected
The webhook auth username (applicable only if url_auth = USERNAME_PASSWORD)
The webhook auth password (applicable only if url_auth = USERNAME_PASSWORD)
Defines the date up until the secret api key will be active
The number of pending requests
The number of successfull requests
The number of failed requests
GET https://devapi.crm.com/backoffice/v1/webhooks/API1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "API1E31269B76D7A65ACCE45B2E68DFD",
"name": "CRMdotCOM Delivery",
"url_endpoint": "https://crm.com/delivery",
"url_auth": "USERNAME_PASSWORD",
"username": "johndoe",
"password": "crm.com",
"api_key": "sdfsdfsdf-32423423423-wefsdfsdfdsf-234234234"
}
]
}
Retrieve webhook requests
Request parameters
The value of the search (case insensitive) across Webhook Name, URL Endpoint
Filter based on the webhook
Filter based on the url endpoint
Filter based on the request state
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
OK
Body
Information about the organisation’ webhook requests
The webhook request identifier
The state of the webhook request
The webhook url endpoint
Defines how the webhook url will be protected
The request body that was sent
The response that was sent
The total number of request retries
The webhook of the request
The webhook identifier
The webhook name
The automation that triggered the webhook
The automation identifier
The automation name
Information about the related entity that the request is created for
The entity type that the webhook request is created for
The entity’s reference name/code/number
The date that such request was made
The page number
The number of records per page
The overal number of records
GET https://devapi.crm.com/backoffice/v1/webhook_requests HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "API1E31269B76D7A65ACCE45B2E68DFD",
"state": "SUCCESS",
"url_endpoint": "https;//crm.com/delivery",
"url_auth": "USERNAME_PASSWORD",
"body": "POST /crm.com/delivery HTTP/1.1 Host: staging.crm.com Content-Type: application/json api_key: 123456789012-1234-1234-1234-123456789012 Content-Type: text/plain { \"contact_id\": \"123456789012-ABCD-ABCD-ABCD-123456789012\", \"amount\": 20.45 }",
"response": "{ \"status\": { \"code\": \"COM.CRM.EXCEPTION.INVALIDTOKENEXCEPTION\", \"description\": \"The specific token is not valid.\", \"message\": \"The token is invalid, please obtain a new one.\" } }",
"retries": 3,
"webhook": {
"id": "API1E31269B76D7A65ACCE45B2E68WIH",
"name": "CRMdotCOM Delivery"
},
"automation": {
"id": "b63ed1ab-0256-453d-82a4-a8a83a02ea8b",
"name": "Share content to delivery system"
},
"entity": {
"type": "CONTACT",
"reference": "ORD1234ER"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Creates a single communication for a speciifc Contact
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Request body
The name of the communication
The GUID of the Contact that the communication will be sent to
The channel that the communication is sent through
The integration that will send the communication
The language of the communication
The recipient’s address or phone according to the channel
The actual subject of the communication sent (applicable for EMAIL and INAPP channels)
The actual content of the communication sent
If set to True then the email and sms opt-out preferences of contact will be ignored
Responses
The request has succeeded
Body
The communication identifier
POST https://stagingapi.crm.com/backoffice/v1/communications HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"name": "Happy Birthday",
"contact_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"channel": "EMAIL",
"integration_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"language": "ENG",
"recipient": "customer@crm.com",
"subject": "New Rewards Offer",
"content": "",
"ignore_preferences": "true"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}Retrieve a specific communication
Path variables
The ID of the communication to be retrieved
Responses
The request has succeeded
Body
The name of the communication
The state of the communication
The channel that the communication is sent through
Has the recipient viewed the communication?
The datetime that the recipient viewed the communication
Has the recipient archived the communication?
The date links in the communication where first clicked by the recipient
The date and time that the communication was created
The language of the communication
The default sender
The email or number of the recipient
The actual subject of the communication sent (if applicable)
The actual content of the communication sent
The contact that the communication was delivered to
The unique identifier of the contact
The full name of the contact
The unique code of the contact
GET https://stagingapi.crm.com/backoffice/v1/communications/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "Happy Birthday",
"life_cycle_state": "PENDING",
"channel": "EMAIL",
"is_viewed": true,
"viewed_on": 1583846861,
"is_archived": true,
"clicked_on": 1583846865,
"created_on": 1583846861,
"language": "ENG",
"sender": "dev@crm.com",
"recipient": "jon@crm.com",
"subject": "",
"content": "",
"contact": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "John Johnson",
"code": "C123"
}
}
Retrieves all available communications
Request parameters
The contact ID for which the communications will be retrieved
The life cycle state of the communications to be retrieved
The channel of the communications to be retrieved
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Responses
The request has succeeded
Body
The communication ID
The name of the communication plan in case this communication was created based on a plan
The state of the communication
The GUID of the Contact
The channel that the communication is sent through
Has the recipient viewed the communication?
The datetime that the recipient viewed the communication
Has the recipient archived the communication?
The date links in the communication where first clicked by the recipient
The date and time that the communication was created
The communication’s language
The default sender
The email or number of the recipient
The actual subject of the communication sent (if applicable)
The actual content of the communication sent
The page number
The number of records per page
The overal number of records
GET https://devapi.crm.com/backoffice/v1/communications HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Happy Birthday",
"life_cycle_state": "PENDING",
"contact_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"channel": "EMAIL",
"is_viewed": true,
"viewed_on": 1583846865,
"is_archived": true,
"clicked_on": 1583846865,
"created_on": 1583846865,
"language": "ENG",
"sender": "dev@crm.com",
"recipient": "jon@crm.com",
"subject": "Welcome to our company",
"content": "Dear sir/madam..."
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Creates a communication template
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Request body
The name of the communication template
The language that the content is provided in (3-digits)
The subject of the communication of the rich content
The content in rich format
The content in plain format
Responses
The request has succeeded
Body
The communication template identifier
POST https://devapi.crm.com/backoffice/v1/communication_templates HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"name": "New Rewards Offer Template",
"contents": [
{
"language": "ENG",
"subject": "",
"rich_content": "",
"plain_content": ""
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}Retrieves all available communication templates
Request parameters
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Retrieves the communication templates based on their names
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Responses
The request has succeeded
Body
The name of the communication template
The language that the content is provided in (3-digits)
The subject of the communication of the rich content
The content in rich format
The content in plain format
The page number
The number of records per page
The overal number of records
GET https://devapi.crm.com/backoffice/v1/communication_templates HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"name": "New Rewards Offer Template",
"contents": [
{
"language": "ENG",
"subject": "",
"rich_content": "",
"plain_content": ""
}
]
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Retrieve a single communication template
Path variables
The communication template id
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Responses
The request has succeeded
Body
The name of the communication template
The language that the content is provided in (3-digits)
The subject of the communication of the rich content
The content in rich format
The content in plain format
GET https://devapi.crm.com/backoffice/v1/communication_templates/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "New Rewards Offer Template",
"contents": [
{
"language": "ENG",
"subject": "",
"rich_content": "",
"plain_content": ""
}
]
}{id}{id}{id}Creates a single communication plan
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Request body
The communication plan’s name
The datetime that the communication plan ends running
The datetime that the communication plan will start running
The channel to send the communication in case the user has enabled more than one channels to receive communications
A list of segments that the communications will be sent to
the segment ID
A list of communication contents set up based on the channels and languages enabled
the IDs of different contents used in this communication plan. Different languages and type of text
The language that the content is provided in (3-digitis)
The subject of the communication of the rich content
The content in rich format
The content in plain format
A list of integrations that will send the emails. One integration/connector per channel should be provided
The repeat frequency provided as a cron expression pattern
The life cycle state of the Communication Plan
Responses
The request has succeeded
Body
The communication plan identifier
POST https://stagingapi.crm.com/backoffice/v1/communication_plans HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"name": "New Reward Offers",
"end_date": 12345678,
"start_date": 12345678,
"preferred_channel": "EMAIL",
"segments": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"contents": [
{
"language": "ENG",
"subject": "",
"rich_content": "",
"plain_content": ""
}
],
"integrations": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"frequency": "0 0 12 * * ?",
"life_cycle_state": "DRAFT"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}Updates an existing communication plan
Path variables
The ID of the communication plan to be updated
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Request body
The communication plan’s name
The datetime that the communication plan ends running
The datetime that the communication plan will start running
The channel to send the communication in case the user has enabled more than one channels to receive communications
A list of segments that the communications will be sent to
the segment ID
A list of communication contents set up based on the channels and languages enabled
the IDs of different contents used in this communication plan. Different languages and type of text
The language that the content is provided in (3-digitis)
The subject of the communication of the rich content
The content in rich format
The content in plain format
A list of integrations that will send the emails. One integration/connector per channel should be provided
The repeat frequency provided as a cron expression pattern
The life cycle state of the Communication Plan
Responses
The request has succeeded
Body
The communication plan identifier
PUT https://stagingapi.crm.com/backoffice/v1/communication_plans/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
Content-Type: application/json
{
"name": "New Reward Offer",
"end_date": 12345678,
"start_date": 112345678,
"preferred_channel": "EMAIL",
"segments": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"contents": [
{
"language": "ENG",
"subject": "",
"rich_content": "",
"plain_content": ""
}
],
"integrations": [
"CAD1E31269B76D7A65ACCE45B2E68DFD"
],
"frequency": "0 0 12 * * ?",
"life_cycle_state": "DRAFT"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}Deletes a single communication plan
Path variables
The ID of the communication plan to be deleted
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Responses
DELETE https://devapi.crm.com/backoffice/v1/communication_plans/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
HTTP/1.1 200 OK Retrieves all available communication plans
Request parameters
The value of the search across the plan name
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The public api key required for API calls to identify the organisation
Responses
The request has succeeded
Body
The communication plan ID
The communication plan name
The datetime that the communication plan ends running
The datetime that the communication plan will start running
The life cycle state of the communication plan
The unique ID
The name of the integration
The Channel
The page number
The number of records per page
The overal number of records
GET https://devapi.crm.com/backoffice/v1/communication_plans HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "New Reward Offers",
"end_date": 12345678,
"start_date": 12345678
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}{id}Retrieves a specific communication plan
Path variables
The unique ID of the communication plan to be retrieved
Responses
The request has succeeded
Body
The name of the communication plan
The datetime that the communication plan ends running
The datetime that the communication plan will start running
The channel to send the communication in case the user has enabled more than one channels to receive communications
A list of segments that the communications will be sent to
the segment ID
The ID of the segment
The name of the segment
A list of communication contents set up based on the channels and languages enabled
the IDs of different contents used in this communication plan. Different languages and type of text
The language that the content is provided in (3-digits)
The subject of the communication of the rich content
The content in rich format
The content in plain format
A list of integrations that will send the communications. One integration/connector per channel should be provided
The unique ID
The name of the integration
The channel
The repeat frequency provided as a cron expression pattern
The life cycle state of the communication plan
GET https://stagingapi.crm.com/backoffice/v1/communication_plans/4AD9C84FA60F9FE407140E20F707726A HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"name": "New Rewards Offer",
"end_date": 12345678,
"start_date": 12345678,
"preferred_channel": "SMS",
"segments": [
{
"id": "4AD9C84FA60F9FE407140E20F707726A",
"name": "VIP Contacts"
}
],
"contents": [
{
"language": "ENG",
"subject": "",
"rich_content": "",
"plain_content": ""
}
],
"integrations": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Connection for Emails",
"channel": "SMS"
}
],
"frequency": "0 0 12 * * ?",
"life_cycle_state": "POSTED"
}
{id}{id}{id}/activity_feed{id}/payment_methodsCreate a new contact, either a new Person or a Company
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The contact identifier. if not supplied one will be generated
User readable code for the contact
Type of contact support types include Person and Company.
Defines whether the contatc is classified as Tax Exempt or not. Defaults to False.
Company Name if the Contact represents a company, required attribute if the type is a Company.
The title of the contact. Applicable only if the type is PERSON
The first name of the contact. Applicable and mandatory only if the type is PERSON
The middle name of the contact. Applicable only if the type is PERSON
The last name of the contact. Applicable and mandatory only if the type is PERSON
The contact’s preferred language for communication
The contact’s unique statutory number
Notes for the contact
The contact setting for receiving sms. Default value is false
The contact setting for receiving emails. Default value is false
If set to true, then a single account is created for the contact usig the system’s default settings and no further input is needed.
The unique ID of the contact’s category
Information about the contact’s demographic. Applicable only if the contact type is PERSON
The gender of the contact
The country code for the country of residence
Information about the contact’s passport
The passport number
The passport’s issue country code
The passport’s expiration date
Information about the contact’s id. Applicable only if the contact is type of PERSON
The id number
The id’s issue country code
The id’s expiration date
The contact’s name day. Applicable only if the contact is type of PERSON
The month of the name day
The day of the name day
Information about the contact’s data of birth. Applicable only if the contact is type of PERSON
The birtdate year
The borthdate month
The borthdate day
Information about the company’s profile. Applicable only if contact_type is COMPANY
The company’s industry unique ID
The company’s industry sectors IDs
The profile year
The annual turnover
The date that the company was established on
The company’s number of employees
The company’s registration number
The company’s registrationc country code
The company’s tax reference number
The company VAT registration numnber
Information about the contact’s addresses
The address type
Primary address for Billing or Communication
The contact’s email address
Optional basic account settings for a financial contact
The account name
Indicates the primary account of the contact
The account classification’s GUID
The custom field’s unique key
The custom field’s value
The contact’s referral code
Responses
The request has succeeded
Body
The contact identifier
Create a contact for a person
POST https://stagingapi.crm.com/backoffice/v1/contacts HTTP/1.1
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"code": "0010202311",
"contact_type": "PERSON",
"is_tax_exempt": "false",
"company_name": "Good Burger",
"title": "Mr",
"first_name": "Louis",
"middle_name": "Aloz",
"last_name": "Kozior",
"preferred_language_code": "ENG",
"statutory_number": "231224-1222000",
"notes": "Notes",
"sms_opt_out": "true",
"email_opt_out": "false",
"create_default_account": true,
"category_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"demographics": {
"gender": "FEMALE",
"country_of_residence": "USA",
"passport": {
"passport_number": "K)123456",
"issue_country_code": "GRC",
"expiration_date": 13423423222
},
"id_details": {
"id_number": "132465",
"issue_country_code": "CYP",
"expiration_date": 1129876567
},
"name_day": {
"month": 4,
"day": 12
},
"date_of_birth": {
"year": 1999,
"month": 12,
"day": 31
}
}
"addresses": [
{
"address_type": "HOME",
"is_primary": "true",
"address_line_1": "",
"address_line_2": "Thomas V",
"state_province_county": "Active",
"town_city": "",
"postal_code": "",
"country_code": "CYP"
}
],
"phones": [
{
"is_primary": true,
"country_code": "CYP",
"number": "238065437"
}
],
"email_address": "bill@gmail.com",
"accounts": [
{
"name": "",
"is_primary": true,
"credit_limit": 250,
"currency_code": "GBP",
"classification_id": ""
}
],
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
],
"referral_code": "REF123",
"loyalty_identifier": "1234567897415"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
{id}Update a Contact, it is possible to supply a partial body so that only supplied items will be updated.
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Company Name if the Contact represents a company, required attribute if the type is a Company.
The title of the contact. Applicable only if the type is PERSON
The first name of the contact. Applicable and mandatory only if the type is PERSON
The middle name of the contact. Applicable and mandatory only if the type is PERSON
The last name of the contact. Applicable and mandatory only if the type is PERSON
The contact’s category ID
A company’s profile. Applicable only if contact_type is COMPANY
The company’s Industry ID
The company’s Industry Sectors.
The custom field’s unique key
The custom field’s value
The contact setting for receiving sms.
The contact setting for receiving emails.
Defines whether the contact is tax exempt or not
Responses
OK
Body
The updated contact’s GUID
PUT https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Content-Type: application/json
{
"company_name": "Good Burger",
"title": "Sir",
"first_name": "Louis",
"middle_name": "Aloz",
"last_name": "Kozior",
"preferred_language_code": "ENG",
"category_id": "4AD9C84FA60F9FE407140E20F707726A",
"notes": "Notes",
"statutory_number": "EF12345",
"demographics": {
"gender": "FEMALE",
"country_of_residence": "",
"passport": {
"passport_number": "",
"issue_country_code": "GRC",
"expiration_date": 129876567
},
"id_details": {
"id_number": "",
"isssue_country_code": "CYP",
"expiration_date": 1
},
"name_day": {
"month": 10,
"day": 4
},
"date_of_birth": {
"year": 2018,
"month": 10,
"day": 16
}
},
"company_profile": {
"industry_id": "4AD9C84FA60F9FE407140E20F707726A",
"industry_sectors": [
"4AD9C84FA60F9FE407140E20F707726A"
],
"profle_year": 1,
"annual_turnover": 1,
"established_on": 1,
"number_of_employees": 1,
"registration_number": "",
"registration_country": "",
"tax_reference_number": "",
"vat_registration_number": ""
},
"addresses": [
{
"id": "",
"address_type": "HOME",
"is_primary": "true",
"address_line_1": "",
"address_line_2": "Thomas V",
"state_province_county": "California",
"town_city": "",
"postal_code": "",
"country_code": "CYP"
}
],
"phones": [
{
"id": "",
"is_primary": true,
"country_code": "44",
"number": "238065437",
"phone_type": "LANDLINE"
}
],
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
],
"email_address": "bill@gmail.com",
"sms_opt_out": true,
"email_opt_out": true,
"is_tax_exempt": "false"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "GUID"
}
Search For Contacts
Request parameters
The page number that should be retrieved
The size (total records) of each page
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The value of the search across Full Name, Company Name, Contact Code, Phone Number and Loyalty Identifier (case insensitive)
Unique Code of Contact
The last name of contact. Applicable only when searching for physical persons
The name of the company. Applicable only when searching for companies
The email address of the contact
The phone number of the contact
The contact’s unique statutory number
The first name of contact. Applicable only when searching for physical persons
If set to true then information about the primary account and wallet will be also retrieved
The customer identification medium
The contact’s loyalty identifier
The date from which the contact was registered
The date unitl which the contact was registered
The unique identifier of the organisation that owns the contact
Defines the additional metrics to be retrieved in the response (comma separated)
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
Body
The contact identifier
The contact code
The contact type
The contact full name
The contact statutory number
The date on which the contact was registered in CRM.COM
Information about the contact’s category
The category identifier
The category name
Details about contact addresses
The address id
The address type
Defines whether the address is the primary one
Details about contact’s phone
The phone identifier
Defines whether the phone is the primary one
The contact’s email
The primary account and primary wallet (if available) of the contact. Available only if “financials” parameter is set to True
The interaction status of the contact, retrieved by REDIS
Retrieves the metrics requested
Defaults to current timestamp
Total number of Subscriptions
Defaults to current timestamp
Total number of Schemes
The Contact’s assigned KYC profile
The ID of the KYC profile
The name of the KYC profile
The status of the KYC profile assigned to Contact
The contact’s loyalty identifiers (cards)
The unique identifier of the loyalty identifier (CIM)
The loyalty identifier
The page number
The number of records per page
The overal number of records
GET https://stagingapi.crm.com/backoffice/v1/contacts HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"contacts": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"code": "ABC-123",
"contact_type": "PERSON",
"contact_name": "John CRM Doe",
"statutory_number": "EF00001231",
"registered_on": 1,
"category": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "VIP"
},
"addresses": [
{
"id": "60bcca96-4965-4d56-8341-cb6f5ae61803",
"address_type": "BUSINESS",
"is_primary": "true",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "7 Stars Tower",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2000",
"country": "CYP"
}
],
"phones": [
{
"id": "60bcca96-4965-4d56-8341-cb6f5ae61803",
"phone_type": "FAX",
"is_primary": "true",
"country_code": "357",
"number": "99999999"
}
],
"email_address": "bill@gmail.com",
"financials": {
"account": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"number": "AR123",
"life_cycle_state": "ACTIVE",
"currency_code": "EUR",
"overdue_amount": 1,
"balance": 200
},
"wallet": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"code": "W132",
"life_cycle_state": "ACTIVE",
"balance": 200,
"alternative_balance": 12,
"wallet_currency_code": "EUR",
"alternative_currency_code": "PTS"
}
},
"interaction_status": "RESTING",
"metrics": {
"subscriptions": {
"timestamp": 1589791784,
"total": 2
},
"schemes": {
"timestamp": 1589791784,
"total": 2
}
},
"kyc_profile": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Standard"
},
"kyc_status": "PENDING"
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Get Contact information for a given Contact
Path variables
The contact identifier (GUID) or code that should be returned
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The contact’s GUID
The contact’s unique code
Type of contact support types include Person and Company.
The name of the company if the contact type is COMPANY
The title of the contact. Applicable only if the type is PERSON
The first name of the contact. Applicable and mandatory only if the type is PERSON
The middle name of the contact. Applicable and mandatory only if the type is PERSON
The last name of the contact. Applicable and mandatory only if the type is PERSON
The full name of the Contact taking into consideration the name display settings
The contact’s preferred language for communication
Notes for the contact
The contact’s unique statutory code
Defines whether the contact is Tax Exempt or not
The category’s GUID
The contact’s dmographic information. Applicable only if the contact type is PERSON
A company’s profile. Applicable only if contact_type is COMPANY
The company’s Industry details
The company’s Industry Sectors
The address’s id
The latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies an address
The phone’s GUID
The custom field’s unique key
The custom field’s value
The contact’s email
The contact’s consent state
Defines whether the contact is anonymized
The contact’s interaction status, retrieved from REDIS
The contact’s total spend amount in the last 12 months, retrieved from REDIS
The Contact’s assigned KYC profile
The ID of the KYC profile
The name of the KYC profile
The status of the KYC profile assigned to Contact
The contact referral code
GET https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"code": "ABC-123",
"contact_type": "PERSON",
"company_name": "Louis Kozior",
"title": "Sir",
"first_name": "Louis",
"middle_name": "Aloz",
"last_name": "Kozior",
"contact_name": "Mark Johnson",
"preferred_language_code": "ENG",
"notes": "Notes",
"statutory_number": "EF-12345",
"is_tax_exempt": "true",
"category": {
"id": "GUID",
"name": "Category A"
},
"demographics": {
"gender": "FEMALE",
"country_of_residence": "",
"passport": {
"passport_number": "",
"issue_country_code": "GRC",
"expiration_date": 129876567
},
"id_details": {
"id_number": "",
"issue_country_code": "CYP",
"expiration_date": 1
},
"name_day": {
"month": 10,
"day": 4
},
"date_of_birth": {
"year": 2018,
"month": 10,
"day": "16"
}
},
"company_profile": {
"industry": {
"id": "",
"name": ""
},
"industry_sectors": [
{
"id": "342343234234",
"name": ""
}
],
"profile_year": 1,
"annual_turnover": 1,
"established_on": 1,
"number_of_employees": 1,
"registration_number": "",
"registration_country": "",
"tax_reference_number": "",
"vat_registration_number": ""
},
"addresses": [
{
"id": "",
"address_type": "HOME",
"is_primary": "true",
"care_of": "",
"address_line_1": "",
"address_line_2": "Thomas V",
"state_province_county": "Active",
"town_city": "",
"postal_code": "",
"country": "CYP",
"lat": 35.157115,
"lon": 33.313719,
"googlePlaceId": "ChIJrTLr-GyuEmsRBfy61i59si0"
}
],
"phones": [
{
"id": "",
"phone_type": "LANDLINE",
"is_primary": true,
"country_code": "44",
"number": "238065437"
}
],
"custom_fields": [
{
"key": "back_office",
"value": "0001-12345"
}
],
"email_address": "bill@gmail.com",
"consent_state": "ACCEPTED",
"is_anonymized": true,
"interaction_status": "DORMANT",
"total_spend": "250",
"sms_opt_out": true,
"email_opt_out": true,
"kyc_profile": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Standard"
},
"kyc_status": "VERIFIED",
"referral_code": "REF123",
"loyalty_identifier": "1234567891234"
}
{id}/activity_feedRetrieves Contact’s activity feed
Path variables
The contact identifier that the activity will be retrieved for
Request parameters
The page number that should be retrieved
The size (total records) of each page
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The activity type
The created date of the activity (no time)
Responses
Successful Request
Body
The activity unique ID
The entity’s number
The entity’s reference number
The entity’s code
The entity’s life cycle state
The date and time where the activity was created
The activity type
The entity’s direction.
The notes of the activity
The entity’s type name
The entity’s total amount
The currency code provided in the entity
The entity’s due date in case of Invoices
The name of the reward offer that provided the Award
The name of the merchant that the activity was performed for
The entity that the topup was performed for
The unique ID of the topup entity
The number or code of the topup entity
The type of the topup entity
The origin entity that the transfer was performed from
The unique ID of the transfer origin entity
The number or code of the transfer origin entity
The type of the transfer origin entity
The destination entity that the transfer was performed for
The unique ID of the transfer destination entity
The number or code of the transfer destination entity
The type of the transfer destination entity
The referred by account details
The referred by account identifer
The referred by account name
The referred by account number
The page number
The number of records per page
The overal number of records
GET https://devapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/activity_feed HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"activity_feed": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"number": "I10003",
"reference_number": "Ref12345678",
"code": "123456789ABE2364",
"state": "POSTED",
"created_date": 1576486645,
"activity_type": "TRANSFER",
"direction": "INCOMING",
"notes": "This Invoice is created for November 2019",
"type": "INVOICE",
"total_amount": 200,
"currency": "EUR",
"due_date": 1576486645,
"reward_offer": "Happy Birthday Offer",
"merchant_name": "Bakery Nicosia",
"topup_entity": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"number": "AC00123 John Johnson",
"type": "WALLET"
},
"transfer_origin_entity": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"number": "AC00123 John Johnson",
"type": "WALLET"
},
"transfer_dest_entity": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"number": "W00123 John Johnson",
"type": "ACCOUNT"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/payment_methodsList of Payment methods allocated to contact.
Path variables
The contact identifier whose payment methods will be retrieved
Request parameters
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The payment method identifier
The payment method that is related with the account
Indicates which payment mehod is the contact’s primary one
Indicates which payment mehod is the contact’s backup one
Notes related to the payment method
The card’s main information. Required and applicable if the payment method type is CARD
The card name
The first 6 digits of the card. Either the card number or the first 6 and last 4 digits must be specified
The last 4 digits of the card. Either the card number or the first 6 and last 4 digits must be specified
Information about the card holder
The name of the card holder
The address related to the card
Additional address information related to the card
The city related to the card
The zip code related to the card address
The state related to the card address
The country related to the card address
If set to True, then the card holder’a address is automatically set using the account’s billing address
Information regarding the card tokenization via a payment gateway
Unique Identifier such as PayPal Username
The payment gateway that tokenized the card
The card token
The page number
The number of records per page
The overal number of records
GET https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/payment_methods HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"payment_method_type": "CARD",
"is_primary": true,
"is_backup": true,
"notes": "Lorem Ipsum",
"card": {
"name": "Default Card",
"first6": "42424242",
"last4": "4242",
"card_holder_details": {
"card_holder_name": "John Alias Doe",
"address_line_1": "Elia Papakyriakou",
"address_line_2": "Tower Stars",
"address_city": "Nicosia",
"address_zip": "2000",
"address_state": "Egkomi",
"address_country": "CY",
"use_billing_address": true
},
"gateway_token": [
{
"gateway_identifier": "",
"gateway": "STRIPE",
"token": "123654789654"
}
]
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
Changes the password for a contact’s identity
Request body
The token that will verify that the client is trusted (required only if the identity is EMAIL based)
The new password
Responses
The request has succeeded
POST https://stagingapi.crm.com/backoffice/v1/contacts/change_password HTTP/1.1
Content-Type: application/json
{
"token": "ABCTKN123456798VGP2020",
"password": "wsxcde421qadfg"
}
HTTP/1.1 200 OK {id}/addresses{id}/addresses/{address_id}{id}/addresses/{address_id}{id}/addressesAdd a new address to an existing contact. A contact can have multiple addresses
Path variables
The contact identifier that the address should be added
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies an address
Responses
Successful Request
Body
The unique identifier of the address
POST https://devapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses HTTP/1.1
Content-Type: application/json
{
"address_type": "HOME",
"care_of": "",
"is_primary": true,
"address_line_1": "",
"address_line_2": "Thomas V",
"state_province_county": "Active",
"town_city": "",
"postal_code": "",
"country_code": "CYP"
}{id}/addresses/{address_id}Update an existing address of a contact
Path variables
The contact identifier that will be updated
The address identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The latitude of the address
The longitude of the address
The Google textual identifier that uniquely identifies an address
Responses
Successful Request
Body
The unique identifier of the address
{id}/addresses/{address_id}Removes a contact address. A single address can be removed at a time
Path variables
The contact identifier that will be updated
The contact identifier that will be removed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/addresses/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
Authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK {id}/kyc{id}/kyc/verify{id}/kycUpdate the contact’s KYC profile
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The id of the KYC to be provided to the contact
Responses
Successful Request
Body
The unique identifier of the contact
PUT https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/kyc HTTP/1.1
Content-Type: application/json
{
"kyc_id": "4AD9C84FA60F9FE407140E20F707726A"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "4AD9C84FA60F9FE407140E20F707726A"
}{id}/kyc/verifySet the KYC profile status of a Contact as Verified
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
Body
The unique identifier of the contact
POST https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/kyc/verify HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}/phones{id}/phones/{phone_id}{id}/phones/{phone_id}{id}/phonesAdd a new phone to an existing contact. A contact can have multiple phones
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
697665675
Responses
Successful Request
Body
The unique identifier of the phone
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones HTTP/1.1
Content-Type: application/json
{
"is_primary": true,
"number": "",
"country_code": "GRC"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": ""
}{id}/phones/{phone_id}Update the phone of an existing contact
Path variables
The contact identifer that will be updated
The phone identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The contact’s phone number
Responses
Successful Request
Body
The unique identifier of the phone
{id}/phones/{phone_id}Removes a contact phone. A single phone can be removed at a time
Path variables
The contact identifier whose phone will be removed
The phone identifier that will be removed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
DELETE /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/phones/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
HTTP/1.1 200 OK {id}/loyalty_identifiers{id}/loyalty_identifiers/{loyalty_id}{id}/loyalty_identifiers{id}/loyalty_identifiersAdd a new loyalty identifier to an existing contact. A contact can have multiple loyalty identifier
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The loyalty identifier
Responses
Successful Request
Body
The unique identifier of the loyalty identifier (CIM)
POST https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/loyalty_identifiers HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"identifier": "123234345624356213"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "891d84dd-4b3b-84b3-ba87-aa63fed3b88a"
}{id}/loyalty_identifiers/{loyalty_id}Removes a contact loyalty identifier. A single loyalty identifier can be removed at a time
Path variables
The contact identifier whose phone will be removed
The loylaty identifier (CIM based) that will be removed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
DELETE https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/loyalty_identifiers/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK {id}/loyalty_identifiersRetrieve the loyalty identifiers for a specific contact
Path variables
The contact identifier that loyalty identiers will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
Body
The unique identifier of the loyalty identifier (CIM)
The loyalty identifier of the customer
GET https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/loyalty_identifiers HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "d8f5ee58-6949-0bd6-6218-d10d9426a04c",
"identifier": "1234567892345"
},
{
"id": "d8f5ee58-6949-0bd6-6218-d10d9426a04Q",
"identifier": "1234567892343"
}
]{id}/applications{id}/applications/{app_id}{id}/applicationsList of applications that are used by a specific contact
Path variables
The contact identifier whose applications usage will be retrieved
Request parameters
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The application usage identifier
The date on which the first uage was recorded
The platform on which the application was downloaded
The payment method that is related with the account
The application identiier
The application name
The page number
The number of records per page
The overal number of records
GET https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/applications HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"first_usage_date": 1598598647,
"platform": "IOS",
"application": {
"id": "af9c61d3-7685-e31f-3387-27c42858e868",
"name": "Best Coffee App"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}/applications/{app_id}Remove an application from a contact
Path variables
The contact identifier whose applications usage will be retrieved
The application usage record identifier that will be removed
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
DELETE https://sandbox.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/applications/57561166-6aa5-3ce5-2269-c38febe7e888 HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK {id}/consents{id}/anonymize{id}/consentsUpdates the Consent state of the Contact
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The consent state to be updated
Responses
Successful Request
Body
The unique identifier of the contact
PUT https://stagingapi.crm.com/backoffice/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/consents HTTP/1.1
Content-Type: application/json
{
"consent_state": "REJECTED"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}{id}/anonymizeAnonymizes a Contact
Path variables
The contact identifier that will be updated
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
Successful Request
Body
The unique identifier of the contact
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/anonymize HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": ""
}{id}/cancel{id}{id}/rewardsCreate a new purchase customer event in posted life cycle state
Notes
Product SKUs and Product Families will be created automatically if they are submitted in a purchase and do not exist in CRM.COM
The supported reduction method should be provided, by specyfing such value on the API’s “reduction_method” attribute
Request headers
The secret api key required for API calls to ensure that the client is trusted
Authorization Token
Request body
The purchase customer event Identifier
The contact identifier that the purchase is created for (customer identification can be made either using contact_ud or cim)
The value for a single contact identification medium representing the customer that the purchase is created for (customer identification can be made either using contact_ud or cim)
The token that will identify the contact
The purchase reference number
The unique identifier of the payment medium used in the purchase e.g. the first 8 digits of a credit card
The date that the customer event was performed
Defines the reduction method that will be applied on spend
The purchased products. Applicable when net/tax/total amounts are not provided
The purchased product sku (semi-optional with product family)
The purchased product name
The purchase product family (semi-optional with product sku)
The purchased product net amount
The purchased product vat amount
The purchased product total amount (net and vat amount)
The purchased product quantity
Information related with the spend request that should be created as part of the purchase
The amount to be spent by the specified spend request in system currency
The merchant transactio acquiring point that the purchase was submitted from (id or code must be specified)
The transaction acquiring point identifier
The transaction acquiring point code
The venue transactio acquiring point that the purchase was submitted from (id or code must be specified)
The transaction acquiring point identifier
The transaction acquiring point code
The discount of the purchase
The purchase net amount. Applicable when products (sku/family) are not provided
The purchase tax amount. Applicable when products (sku/family) are not provided
The purchase total amount (net + tax - discount). Applicable when products (sku/family) are not provided
The purchase classification
The customer event classification identifier
The customer event classification name
Details about the pass
The pass code
The pass one time password (if applicable)
Responses
The request has succeeded
Body
The purchase identifier
The purchase reference number (applicable only for Front-End Reduction)
The total award amount (applicable only for Front-End Reduction)
The sum of all spends (instant discount, auto spends, spends on request). Applicable only for Front End Reduction
The spend related to instant discount. Applicable only for Front End Reduction
The spend related to auto spend requests. Applicable only for Front End Reduction
The actual spend related to requested spend requests. Applicable only for Front End Reduction
POST /purchases HTTP/1.1
Content-Type: application/json
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"cim": "4A30966F684B0269AD91",
"reference_number": "RF000001",
"payment_medium_identifier": "42424242",
"performed_on": 1572423477,
"discount_amount": 1.56,
"reduction_method": "BACK_END",
"products": [
{
"product_sku": "FREDESPR001",
"net_amount": 14.15,
"tax_amount": 1.04,
"total_amount": 15.19,
"quantity": 2
}
],
"spend_request": {
"amount": 2.12
},
"merchant_tap": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"code": "EK123456"
},
"outlet_tap": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"code": "CD123456"
}
}
{
"contact_id": "79adca27-e50d-40d2-b025-e7d4710a1053",
"reference_number": "1234567890",
"payment_medium_identifier": "42424242",
"reduction_method": "FRONT_END",
"products": [
{
"product_sku": "FREDESPR001",
"product_name": "Freddo Espresso",
"product_family": "Chocolates",
"net_amount": 1200,
"tax_amount": 0.00,
"total_amount": 1200,
"quantity": 2
}
],
"merchant_tap": {
"code": "TAP001"
},
"outlet_tap": {
"code": "TAP002"
}
}
{id}/cancelCancel an existing customer’s purchase and as a result any related awards/spends will be reversed
Path variables
The purchase identifier that will be canceled
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The customer event identifier
POST /purchases/CEEE83D6E0804A30966F684B0269AD91/cancel HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CEEE83D6E0804A30966F684B0269AD91"
}Search for purchase customer events
Request parameters
The contact identifier who performed the purchase
The contact code who performed the purchase
The purchase’s reference number
The date from which the purchase was performed.If not specified, then the last 10 purchases will be returned
The date until which the purchase was performed
The life cycle state of the customer event
The organisation that the purchase customer event was performed
The transaction acquiring point that captured the customer event
Filters customer events that have greater or equal total amount as specified
Filters customer events that have less or equal total amount as specified
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The purchase identifier
The purchase’s reference number
Contact details
The contact identifier
The contact full name
The contact code
Account details
The account identifier
The account name
The account number
The purchase’s life cycle state
The reduction method that was applied on the related spend
The purchase event’s classification details
The classification identifier
The classification name
The purchase’s total net amount of all products’ net amount
The purchase’s total tax amount of all products’ tax amount
The purchase’s discount amount
The purchase’s total amount after discount
The organisation details at which the purchase was performed
The organisation identifier at which the purchase was performed
The organisation name at which the purchase was performed
The date on which the purchase was performed
The page number
The number of records per page
The overal number of records
GET https://stagingapi.crm.com/backoffice/v1/purchases HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJmYmNmZjFmNS0zNDE2LTRkZWMtYTk3NC05YjA4MjBhMWQxNmIiLCJmdWxsX25hbWUiOiJHaW9yZ29zIFNha2thcyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJjdXJyZW50X29yZ2FuaXNhdGlvbl9pZCI6IjViZjNmOTkyLTE4ZGQtNGYzYi05ZTc0LTAyYWRkNGU1ZmJkNSIsInByaW1hcnlfb3JnYW5pc2F0aW9uX2lkIjoiNWJmM2Y5OTItMThkZC00ZjNiLTllNzQtMDJhZGQ0ZTVmYmQ1IiwiY3VycmVudF9vcmdhbmlzYXRpb25fbmFtZSI6IlN0YWdpbmciLCJpc3MiOiJodHRwczovL3d3dy5jcm0uY29tIiwiZ3JvdXBzIjpbIlZJRVdfT1JHQU5JU0FUSU9OUyIsIk1BTkFHRV9PUkdBTklTQVRJT05fR1JPVVBTIiwiTUFOQUdFX09SR0FOSVNBVElPTlMiLCJBTExPV19UT19NQVNRVUVSQURFIiwiTUFOQUdFX1VTRVJTIiwiVklFV19VU0VSUk9MRVMiLCJNQU5BR0VfVVNFUlJPTEVTIiwiTUFOQUdFX0FQSUtFWVMiLCJERUxFVEVfUk9MTF9BUElLRVlTIiwiU0VUX1VQX0lOVEVHUkFUSU9OUyIsIlZJRVdfQ09OVEFDVFMiLCJNQU5BR0VfQ09OVEFDVFMiLCJNQU5BR0VfQUNDT1VOVFMiLCJTRVRfVVBfQ09OVEFDVFMiLCJTRVRfVVBfRklOQU5DSUFMUyIsIlZJRVdfRklOQU5DSUFMX1RSQU5TQUNUSU9OUyIsIk1BTkFHRV9GSU5BTkNJQUxfVFJBTlNBQ1RJT05TIiwiU0VUX1VQX0NVU1RPTUVSX0VWRU5UUyIsIlZJRVdfQ1VTVE9NRVJfRVZFTlRTIiwiTUFOQUdFX0NVU1RPTUVSX0VWRU5UUyIsIk1BTkFHRV9XQUxMRVRTIiwiVklFV19XQUxMRVRfVFJBTlNBQ1RJT05TIiwiTUFOQUdFX1dBTExFVF9UUkFOU0FDVElPTlMiLCJTRVRfVVBfUFJPRFVDVFMiLCJWSUVXX1JFV0FSRF9TQ0hFTUVTIiwiTUFOQUdFX1JFV0FSRF9TQ0hFTUVTIiwiVklFV19SRVdBUkRfT0ZGRVJTIiwiTUFOQUdFX1JFV0FSRF9PRkZFUlMiLCJTRVRfVVBfUkVXQVJEUyIsIk1BTkFHRV9QTEFURk9STSJdLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJnX3Nha2thc0Bjcm0uY29tIiwicHJpbWFyeV9vcmdhbmlzYXRpb25fbmFtZSI6IlN0YWdpbmciLCJ0eXBlIjoiYWNjZXNzIiwiZW1haWwiOiJnX3Nha2thc0Bjcm0uY29tIiwiaWF0IjoxNTkxMTc5NjM1LCJhdXRoX3RpbWUiOjE1OTExNzk2MzUsImV4cCI6MTU5MTE4NjgzNSwianRpIjoiYjRlZDk1MmUtNTI4Ny00ZWVmLWE4N2YtN2FhYTIwYmI0OGM5In0.iydf6Yi-H6v9P44Jb8htXayfbsXQxtHMOKquVqChpDM3IrVBolLS6mZ3dPCu7aoMejRK_OgIrriABC54Eh2yX7bgOiClZYhAQbdu3BAnykhiywEgrULD3RXkwS90gtOq-Uu8lE8b9Bm1lBcOr3HRwzlS8pweSh7nGR93i7XzxOwgRmfHMa17IC9t3GNKxVjyanG8gPTpvJI9f1nMvAad-y-rG4T90DiVJQ_uDCKmCJ0eCwgH_v4jQvcRnufW9F_7wI8VbYiIzYMuQC8f0DGZFif57FKl6_HQIYOH22JB6M9bQrJoEGDKWLqjfDEVerLiyyQf05zYvLTHvI_P6Gcn-Q
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"reference_number": "REF1234",
"contact": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "John Doe",
"code": "CO1234"
},
"account": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "ACR1234 John Doe",
"number": "ACR1234"
},
"life_cycle_state": "POSTED",
"reduction_method": "BACK_END",
"classification": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Delivery"
},
"total_net_amount": 1.51,
"total_tax_amount": 0.49,
"discount_amount": 1,
"total_amount": 1,
"organisation": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "Bravo Coffee"
},
"performed_on": 1576486645
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Get details for a single purchase customer event
Path variables
The purchase customer event identifier that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The purchase identifier
The purchase reference number
The purchase’s life cycle state
The reduction method that was applied on the related spend
The unique identifier of the payment medium used in the purchase e.g. the first 8 digits of a credit card
The date on which the purchase was performed
The purchase’s total net amount of all product lines’ net amount
The purchase’s total tax amount of all product lines’ tax amount
The purchase’s discount amount
The purchase’s total amount after discount
The amount in real currency that was requested to be spend via the customer event
Contact details
The contact identifier
The contact full name
The contact code
Account details
The account identifier
The account name
The account number
The organisation from which the purchase was posted
The organisation identifier at which the purchase was performed
The organisation name at which the purchase was performed
The transaction acquiring point that captured the purchase
The transaction acquiring point identifier
The transaction acquiring point name
The transaction acquiring point code
Information (dynamic) about the award/spend amounts
The amount in real currency that was spent via the customer event
The total amount (automatic + instant+ spend on request) in real currency that was spent via the customer event
The total amount in real currency that was spent automatically via the customer event
The total amount in real currency that was spent instantly via the customer event
The total amount in real currency that was actually spent on request via the customer event (may differ than the requested_spend_amount)
Details of ad hoc return of goods
The amount that the customer was debited due to ad hoc return of goods
The date that ad hoc retun of goods was applied
The ad hoc return reference number
The amount that was returned
The currency that the ad hoc return was made
Information about the purchase’s product line items
Information about the product sku
The product identifier
The product sku
The product name
The product description
Information about the product family
The product family identifier
The product family
The quantity of the line item
The net amount of the line item
The tax amount of the line item
The total amount (net + tax) of the line item
Details about the customer event classification
The customer event classification identifier
The customer event classification name
Details about the customer event pass
The pass identifier
The pass code
GET https://devapi.crm.com/backoffice/v1/purchases/CEEE83D6E0804A30966F684B0269AD91 HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"reference_number": "REF001",
"life_cycle_state": "CANCELLED",
"reduction_method": "BACK_END",
"payment_medium_identifer": "424242",
"performed_on": 1576486645,
"total_net_amount": 1.59,
"total_tax_amount": 0.41,
"discount_amount": 0.5,
"total_amount": 1.5,
"requested_spend_amount": 1,
"contact": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "John Doe",
"code": "CO1234"
},
"account": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "ACR1234 John Doe",
"number": "ACR1234"
},
"organisation": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "Bravo Coffee"
},
"tap": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "ePOS",
"code": "TAP00012"
},
"rewards": {
"total_award_amount": 121.99,
"total_spend_amount": 12.22,
"total_automatic_spend_amount": 2.22,
"total_instant_discount_amount": 4.49,
"total_spend_request_amount": 4.51
},
"products": [
{
"product_sku": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"sku": "SKU00012",
"name": "Cappuccino",
"description": "Cappuccino Coffee"
}
"quantity": 1,
"net_amount": 1.08,
"tax_amount": 0.51,
"total_amount": 1.59
},
{
"product_family": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "Chocolates"
},
"quantity": 1,
"net_amount": 1.08,
"tax_amount": 0.51,
"total_amount": 1.59
}
]
}
{id}/rewardsGet reward details (awards/spends) for a specific purchase customer event
Path variables
The purchase identifier whose rewards details will be retrieved
Request parameters
The reward type
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
Details about the reward (award/spend) breakdown
The reward type
Details about the reward offer that triggered the award/spend (spend is related to an offer when is instantly spend)
The reward offer identifier
The reward offer name
The reward spend method
The award/spend amount
GET https://devapi.crm.com/backoffice/v1/purchases/CEEE83D6E0804A30966F684B0269AD91/rewards HTTP/1.1
authorization: 4AD9C84FA60F9FE407140E20F707726A
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"type": "AWARD",
"reward_offer": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "1% cashback on all products"
},
"spend_method": "INSTANT_DISCOUNT",
"amount": 9.99
}
]
}
{id}/cancel{id}{id}/cancelCancel an existing customer’s referral and as a result any related awards will be reversed
Path variables
The referral identifier that will be canceled
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The customer event identifier
POST /referrals/CEEE83D6E0804A30966F684B0269AD91/cancel HTTP/1.1
api_key: 8c54d563-b991-4b76-8a83-557c08166f95
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CEEE83D6E0804A30966F684B0269AD91"
}Search for referral customer events
Request parameters
The referred contact identifier
The referred by contact identifier
The referral’s reference number
The date from which the referral was performed
The date until which the referral was performed
The life cycle state of the customer event
The organisation that the referral customer event was performed
Defines on which attribute the results should be sorted
Defines how the results will be ordered
The page number that should be retrieved
The size (total records) of each page
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The referral identifier
The referral reference number
Details about the referred contact
The contact identifier
The contact full name
The contact code
Details about the referred contact’s account
The account identifier
The account name
The account number
The referral’s life cycle state
The referral event’s classification details
The classification identifier
The classification name
The organisation details at which the referral was performed
The organisation identifier at which the referral was performed
The organisation name at which the referral was performed
The date on which the referral was performed
Details about the referred by contact
The contact identifier
The contact name
The contact code
Details about the referred by contact’s account
The account identifier
The account name
The account number
The page number
The number of records per page
The overal number of records
GET https://stagingapi.crm.com/backoffice/v1/referrals HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"content": [
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"reference_number": "REF1234",
"referred_contact": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "John Doe",
"code": "CO1234"
},
"referred_account": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "ACR1234 John Doe",
"number": "ACR1234"
},
"life_cycle_state": "CANCELLED",
"classification": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Delivery"
},
"organisation": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "Bravo Coffee"
},
"performed_on": 1576486645,
"referred_by_contact": {
"id": "7db94d8b-4cbc-a7cc-9dc8-48ef68f9bf36",
"name": "Jane Doe",
"code": "JD987"
},
"referred_by_account": {
"id": "9a0eab8b-d592-3039-9705-be3708d4f8cf",
"name": "AR456 Jane Doe",
"number": "AR456"
}
}
],
"paging": {
"page": 2,
"size": 20,
"total": 5124
}
}
{id}Get details for a single referral customer event
Path variables
The referral customer event identifier that will be retrieved
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Responses
The request has succeeded
Body
The referral identifier
The referral reference number
The referral’s life cycle state
The date on which the referral was made
Details about the referred contact
The contact identifier
The contact full name
The contact code
Details about the referred contact’s account
The account identifier
The account name
The account number
The organisation from which the purchase was posted
The organisation identifier at which the purchase was performed
The organisation name at which the purchase was performed
Information (dynamic) about the award/spend amounts
The amount in real currency that was spent via the customer event
Details about the customer event classification
The customer event classification identifier
The customer event classification name
Details about the referred by contact
The contact identifier
The contact name
The contact code
Details about the referred by contact’s account
The account identifier
The account name
The account number
GET https://stagingapi.crm.com/backoffice/v1/referrals/CEEE83D6E0804A30966F684B0269AD91 HTTP/1.1
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "CEEE83D6E0804A30966F684B0269AD91",
"reference_number": "REF001",
"life_cycle_state": "CANCELLED",
"performed_on": 1576486645,
"referred_contact": {
"id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
"name": "John Doe",
"code": "CO1234"
},
"referred_account": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "ACR1234 John Doe",
"number": "ACR1234"
},
"organisation": {
"id": "CEEE83D6E0804A30966F684B0269AD91",
"name": "Bravo Coffee"
},
"rewards": {
"total_award_amount": 121.99
},
"classification": {
"id": "c8d83493-3f50-40df-adb0-762ec5f41863",
"name": "Delivery Purchase"
},
"referred_by_contact": {
"id": "b47cc2a3-6e00-b826-6bb5-48849e222e2a",
"name": "Jane Doe",
"code": "45679"
},
"referred_by_account": {
"id": "0a1c62c3-75cc-7b65-d7c8-9ce59f7ad6cc",
"name": "AR567 Jane Doe",
"number": "AR567"
}
}
Estimates how a product will be charged in invoices, quotations, billing without generating any invoices etc. Pricing estimation includes the price, all applicable promotions as well as the taxes to be applied.
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The unique idetifier of the organisation from which the customer purchases prducts
The unique identifier of a product
The unit price of the product. If specified, then the pricing strategy is not applied.
Required if a discount value is specified.
Required if a price is specified as input
Responses
The request has succeeded
Body
POST https://stagingapi.crm.com/backoffice/v1/estimates/invoicing HTTP/1.1
Content-Type: application/json
{
"contact_id": "",
"account_id": "",
"supply_method": "DELIVERY",
"fulfilled_by": "",
"line_items": [
{
"product_id": "",
"bundle_product_id": "",
"quantity": 1,
"price": 9.99,
"discount_value": 1,
"discount_option": "AMOUNT",
"tax_model": "TAX_EXCLUSIVE"
}
]
}Preview order fulfillment information
Notes
The following APIs should be called in order to make an order
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
Preview order based on the supply method
Preview order only for open venues
Preview order based on the postal code
Preview order based on the geo-location (lat/long)
Preview order based on the customer address
Preview order based on a specific organisation as requested by the customer
Preview order based on the date and time at which the customer requests the ordered items to be delivered/picked-uo (Applicable only for ordering ahead/scheduling an order)
The order ahead time
The order ahead time unit
The order ahead date
Responses
The request has succeeded
Body
Details about the organisation (business/merchant/venues) that will fulfill the order
The organisation identifier
The organisation name
The organisation phone number
The organisation address
The address line 1
The address line 2
The address state/province/county
The address town/city
The address postal code
The latitude of the location
The longitude of the location
The Google textual identifier that uniquely identifies a location
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
Details about the parent organisation (business/merchant) of the fulfilled by. Not applicable if the fulfilled by organisation is of type business or merchant
The organisation identifier
The organisation name
The creative identifier
Information about the creative type
The creative width
The creative height
The creative format
The creative content URL
The creative public identifier
Information about the creative transformations
The transformed creative width
The transformed creative height
The transformed creative URL
POST https://sandbox.crm.com/backoffice/v1/estimates/order_fulfillment HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"supply_method": "DELIVERY",
"is_open": true,
"postal_code": "2415",
"lat_lot": "35.157204,33.314151",
"address_id": "28441e3e-767a-b6cc-9a59-6d7705de6428",
"requested_organisation_id": "4456e728-019c-86e4-3e4f-bb7920e2ef75",
"requested_delivery_at": {
"time": 30,
"time_unit": "MINUTES",
"date": 12312323123
}
}
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"fulfilled_by": {
"id": "3FD1E31269B76D7A65ACCE45B2E68DFD",
"name": "Best Burger Egkomi",
"phone": "+6934222321",
"address": {
"address_line_1": "Ilia Papakyriakou 21",
"address_line_2": "7 Stars Tower",
"state_province_county": "Egkomi",
"town_city": "Nicosia",
"postal_code": "2415",
"lat": "35.157115",
"lon": "33.313719",
"googleplaceid": "ChIJrTLr-GyuEmsRBfy61i59si0"
},
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"usage_type": "ATTACHMENT",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/logo.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
}
]
}
],
"parent_organisation": {
"id": "b1607c37-e750-2324-ac49-6591a86f54b8",
"name": "Best Burger",
"creatives": [
{
"id": "CA123456789AQWSXZAQWS1236547896541",
"usage_type": "PROFILEIMAGE",
"width": 2159,
"height": 3075,
"format": "jpg",
"url": "https://assets.crm.com/image/logo.jpg",
"public_id": "crm-com/image",
"media": [
{
"width": 200,
"height": 300,
"url": "https://asset.crm.com/image/offer/c_scale,w_200/logo.jpg"
}
]
}
]
}
}
}
]
Preview order information before making an order including fulfillment and invoice estimations
Notes
The following APIs should be called in order to make an order
Request headers
Authorization Token
The secret api key required for API calls to ensure that the client is trusted
Request body
The supply method for the order
Required for Delivery orders
Responses
The request has succeeded
Body
The uniue identifier of the order’s estimation. To be used to make a new order
POST https://sandbox.crm.com/backoffice/v1/estimates/orders HTTP/1.1
Content-Type: application/json
authorization: eyJraWQiOiIvcHJpdmF0ZUtleS5wZW0iLCJ0eXAiOiJKV
{
"account_id": "1bd3e4d3-5981-209b-787d-352dcd5389a3",
"supply_method": "DELIVERY",
"fulfilled_by": "",
"requested_delivery_at": {
"time": 30,
"time_unit": "MINUTES",
"date": 12312323123
},
"address_id": "84bfd840-b520-5bde-8f0a-b36937a2fce7",
"notes": "",
"line_items": [
{
"id": "7f45ad8a-b164-2a67-eb93-8651c0f1b101",