Self Service

Introduction

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

The CRM.COM API is designed around REST, allowing you to manage subscription and/or rewards commerce in a simple, programmatic way using intuitive URL endpoints, conventional HTTP requests, response codes, authentication and verbs.

Self-Service API is designed with the main focus on developers of Mobile or Web based Applications, while being secure and performant.

For the management API please refer to the Back-Office API documentation that provides access and extensibilty to the functionality found in the CRM.COM.

API Documentation
API Reference

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

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

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

Authentication

The CRM.COM Self Service API uses a JWT token that is returned from a contact authentication call either using username & password or one time password request.

SECURITY NOTICE

All API requests must be made over HTTPS. Any request made over plain HTTP or without authentication will fail. A pubic api key should be provided as part of the header for application identification.

API KEY AUTHORIZATION HEADER EXAMPLE

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

AUTH TOKEN AUTHORIZATION HEADER EXAMPLE

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

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

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

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

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

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

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

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

4XX ERROR RESPONSE EXAMPLE

An example of a customer not found error is as follows

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

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

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Responsive Images

The concept of responsive images is utilized, offering single images that can respond to changes in any screen resolution on any mobile or web-based applications.

DEV TIP

In order to achieve that applications should use an <img> atttribute named srcset. The srcset defines multiple sizes of the same image, allowing the browser to select the appropriate image source based on its current resolution.

Example 1
<img 
    srcset="small.jpg 256w,
            medium.jpg 512w,
            large.jpg 1024w"
    sizes="(max-width: 30em) 25em, 100vw"
    src="medium.jpg"
    alt="responsive image"
/>
Operations
Approvals
GET /contacts/{id}/approval_requests
POST /approval_requests/{id}/actions
POST /approval_requests/accept
POST /approval_requests/reject
List Approval Requests
Approvals
GET /contacts/{id}/approval_requests

Retrieve all approval requests for a specific contact

Path variables

id
string GUID required

The contact (identifier) for which the related approval requests will be retrieved

Example:
b2157d75-7959-83dc-fdfa-cacba764d4d4

Request parameters

state
string optional

Filter based on approval request state

Enumeration:
PENDING
APPROVED
REJECTED
entity_types
array of string optional

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

Collection format: csv
Unique items: YES
sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAMEPOSTED_DATE
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK
Body
Object
content
Array
Object
id
string GUID

The approval request identifier

Example:
8dfc2223-edca-f05d-820b-dc96ba9df2c2
state
string

The approval request state

Enumeration:
PENDING
APPROVED
REJECTED
entity
Object

Details about the entity that such approval request was applied to

id
string GUID

The entity identifier

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

The approval entity type

Enumeration:
ORDER
SERVICE_REQUEST
reference
string

The entity reference name/code/number

Example:
CO1234
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/self-service/v1/contacts/b2157d75-7959-83dc-fdfa-cacba764d4d4/approval_requests HTTP/1.1 

auth_token: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "8dfc2223-edca-f05d-820b-dc96ba9df2c2",
            "state": "APPROVED",
            "entity": {
                "id": "cf010c72-a2cb-48f8-a9fa-1ed99c8d6ec0",
                "type": "ORDER",
                "reference": "CO1234"
            }
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Perform Approval Requests Actions
Approvals
POST /approval_requests/{id}/actions

Update an existing approval request

Path variables

id
string GUID required

The approval request (identifier) that will be updated

Example:
a6ecbc14-5622-0e30-b629-b1289963f7d2

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
action
string required

Defines the action that will be applied on the approval request

Enumeration:
ACCEPT
REJECT

Responses

200 OK
Body
Object
id
string GUID

The approval request identifier

Example:
a6ecbc14-5622-0e30-b629-b1289963f7d2
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/self-service/v1/approval_requests/a6ecbc14-5622-0e30-b629-b1289963f7d2/actions HTTP/1.1 

auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "action": "REJECT"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "a6ecbc14-5622-0e30-b629-b1289963f7d2"
}
Approve an Approval Request
Approvals
POST /approval_requests/accept

Accept a pending approval request

Request body

Object
token
string required

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

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

Responses

200 OK
Body

An HTML based landing page is returned and rendered

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/self-service/v1/approval_requests/64a29ac3-48bb-7493-1e9d-45c1c3299a51/actions HTTP/1.1 

Content-Type: application/json

{
    "token": "367a4c39-d69a-a0e7-7b6f-4eccf65449a3",
    "response": "REJECT"
}

HTTP/1.1 200 OK 
Reject an Approval Request
Approvals
POST /approval_requests/reject

Reject a pending approval request

Request body

Object
token
string required

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

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

Responses

200 OK
Body

An HTML based landing page is returned and rendered

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/self-service/v1/approval_requests/64a29ac3-48bb-7493-1e9d-45c1c3299a51/actions HTTP/1.1 

Content-Type: application/json

{
    "token": "367a4c39-d69a-a0e7-7b6f-4eccf65449a3",
    "response": "REJECT"
}

HTTP/1.1 200 OK 
Attachment Files & Media
Attachment Files
POST /upload/files
DELETE /files/{id}
GET /files/{id}
Upload File
Attachment Files & Media
POST /upload/files

Create an upload signature for a file

Notes

FILE UPLOAD FLOW

Integrating file upload should be based on the following APIs

  1. Upload file signature
  2. Connect file to a module (entity), such as service requests

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
file
string required nullable

File contents provided via multipart/form-data

Example:
file object
Examples

Responses

200 OK

The response succeeded

Body
Object
id
string GUID

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

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

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/self-service/v1/upload/files HTTP/1.1 

auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "file": "file object"
}

HTTP/1.1 200 OK 

Content-Type: application/json

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

Delete a file

Path variables

id
string GUID required

The file identifier to be deleted

Example:
8dfc2223-edca-f05d-820b-dc96ba9df2c2

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
DELETE https://sandbox.crm.com/self-service/v1/service_requests/6b888b83-b418-752f-604d-0653cf65885d/files/8dfc2223-edca-f05d-820b-dc96ba9df2c2 HTTP/1.1 

auth_token: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Get File
Attachment Files & Media
GET /files/{id}

Retrieve a specific file

Path variables

id
string GUID required

The file (identifier) to be retrieved

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

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string

The identifier of the file retrieved

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

Information about the creative type

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

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/self-service/v1/files/3ae9d64a-8a3b-f1e1-eed6-05b307f926fb HTTP/1.1 

auth_token: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "3ae9d64a-8a3b-f1e1-eed6-05b307f926fb",
    "mime": "doc"
}
Authentication

Ability to authenticate customers via a Mobile App or a Portal

POST /contacts/authenticate
POST /contacts/{id}/wifi/authorization
POST /contacts/otp
POST /contacts/email_verification
POST /contacts/validate-otp
POST /contacts/refresh
POST /contacts/forgot_password
POST /contacts/change_password
POST /contacts/{id}/sign_out
GET /contacts/verify_email/{token}
Contact Authentication
POST /contacts/authenticate

Authenticate a contact and provide a token for subsequent API access

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
provider
string

The contact’s identity provider

Enumeration:
EMAIL
FACEBOOK
GOOGLE
MW4

CRM.COM auth server

PHONE
MAC_ADDRESS

WiFi Platforms Authentication

username
string required nullable

The contact’s username (applicable for EMAIL providers). If password not provided then OTP request is triggered.

Example:
johndoe@crm.com
password
string required nullable

The contact’s password (applicable for EMAIL providers)

Example:
password1234
token
string required nullable

The token taken from the oAUTH service provider (applicable for Facebook/Google/MW4 providers)

Example:
234er43ergt34eett34
mac_address
string required nullable

The contact’s device mac address (applicable for MAC_ADDRESS providers)

Example:
01-23-45-67-89-AB
phone_number
string required nullable

The contact’s phone number (applicable for PHONE providers)

Example:
22265566
country_code
string required nullable

The contact’s phone country code (applicable for PHONE providers)

Example:
CYP
application_id
string GUID nullable

The application identifier

Example:
a9c09878-bf26-4969-8a35-61899d64302d
Examples

Responses

200 OK

The request has succeeded

Body
Object
access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
refresh_token
string

Used when access token gets expired in order to refresh

exp
string epoch

The token expiration date

Example:
1572530655
contact
Object

Details about the authorised contact

id
string GUID

The cotnact’s unique identifier

Example:
2f2f9afe-4399-59b7-cbb8-da18c2255064
title
string

The contact’s title

Example:
Mr
first_name
string

The contact’s first name

Example:
John
last_name
string

The contact’s last name

Example:
Doe
company_name
string

The contact’s company name

Example:
CRM
avatar
string

The contact’s avatar

Example:
avatar
is_verified
boolean

Defines whether the used identity is verified

Example:
false
organisations
Array

Details about the organisations that the contact has joined

Object
external_id
string GUID

The organisation’s external identifier

Example:
QWERTY12345671234567324ETFTGBY78
org_type
string

The organisation type

Enumeration:
SERVICE_OWNER
ORGANISATION
name
string

The organisation name

Example:
CRMdotCOM
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
Example 2
Example 3
Example 4

Auth using email and password

POST /contacts/authenticate HTTP/1.1 

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

{
    "provider": "EMAIL",
    "username": "johndoe@crm.com",
    "password": "password1234"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "SERVICE_OWNER",
            "org_relationship": "MERCHANT",
            "name": "CRMdotCOM"
        }
    ]
}

Auth using MAC Address

POST https://sandbox.crm.com/self-service/v1/contacts/authenticate HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "provider": "MAC_ADDRESS",
    "mac_address": "01-23-45-67-89-AB"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "refresh_token": "",
    "exp": "1572530655",
    "contact": {
        "id": "",
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "company_name": "",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "SERVICE_OWNER",
            "name": "CRMdotCOM"
        }
    ]
}

Auth using MW4

POST https://sandbox.crm.com/self-service/v1/contacts/authenticate HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "provider": "MW4",
    "token": "234er43ergt34eett34"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "refresh_token": "",
    "exp": "1572530655",
    "contact": {
        "id": "2f2f9afe-4399-59b7-cbb8-da18c2255064",
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "company_name": "CRM",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "SERVICE_OWNER",
            "name": "CRMdotCOM"
        }
    ]
}

Auth using phone

POST https://sandbox.crm.com/self-service/v1/contacts/authenticate HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "provider": "PHONE",
    "phone_number": "22265566",
    "country_code": "CYP"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "refresh_token": "",
    "exp": "1572530655",
    "contact": {
        "id": "2f2f9afe-4399-59b7-cbb8-da18c2255064",
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "company_name": "CRM",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "ORGANISATION",
            "name": "CRMdotCOM"
        }
    ]
}
Contact WiFi Authorization
POST /contacts/{id}/wifi/authorization

Authenticate a contact over to a WiFi platform

Path variables

id
string GUID required

The contact (identifier) that will be authenticated over to a WiFi platform

Example:
eab82829-b65e-ee5a-b0f8-33b8ad48e04e

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
mac_address
string required

The contat’s device MAC address

Example:
01-23-45-67-89-AB
estimation_id
string GUID required

The usage estimation (identifier) that the contact is authorised for

Example:
0ba7de75-8a68-c19a-3d3a-f4708723a1a4
site_id
string required

The site that the contact is authorised against

Example:
onwuq8y1

Responses

200 OK

The request has succeeded

400 Bad Request

The input request was invalid or incorrect, often due to missing a required parameter OR client has already signed in from anotyher device (ClientAlreadyAuthorizedException)

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/self-service/v1/contacts/eab82829-b65e-ee5a-b0f8-33b8ad48e04e/wifi/authorization HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "integration_id": "6b6d31e9-3603-36e1-be89-76c1e538644b",
    "mac_address": "01-23-45-67-89-AB",
    "estimation_id": "0ba7de75-8a68-c19a-3d3a-f4708723a1a4"
}

HTTP/1.1 200 OK 
Request One Time Password
POST /contacts/otp

Request a one time password for a specific contact. The request will identify the contact details and send an outbound validation number that can be used to verify the contact

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
send_method
string required

How to send the validation code

Enumeration:
EMAIL
SMS
credentials
Array required

Information on how the contact will be identified

Object
name
string required

The predetermined information that will be used to identify the contact

Enumeration:
BIRTHDATE

Lookup on contact details

PASSPORT

Lookup on contact details

ID_NUMBER

Lookup on contact details

CARD

Lookup on contact customer identification medium (if enabled) and then on contact details

PHONE

Lookup on contact identity, then on customer identification medium (if enabled) and last on contact details

EMAIL

Lookup on contact identity, then on customer identification medium (if enabled) and last on contact details

LOYALTY_IDENTIFIER

Lookup on customer identification medium (if enabled) and last on contact details

GIFT_PASS

Lookup on customer identification medium (if enabled) and last on contact details

CONTACT_IDENTITY

Lookup on contact identity

value
string required

The value of the credential to check

Example:
1234567
gift_pass_details
Object

Additional gift pass information. Applicable if name = “GIFT_PASS”

email
string nullable

Email address which will receive the one-time-password, semi-optional - either email_address or phone_number must be provided

Example:
jonf.doe@gmail.com
phone
string nullable

Phone number which will receive the one-time-password, semi-optional - either email_address or phone_number must be provided

Example:
96453423
country_code
string

The phone number country code (required for phone_number)

Example:
CYP
pin
string nullable

The gift pass pin, semi-optional - either pin or last_spend_amount must be provided

Example:
132435
last_spend_amount
number nullable

The last spend amount performed, semi-optional - either pin or last_spend_amount must be provided

Example:
2.5

Responses

200 OK

The request has succeeded

Body
Object
obfuscated_value
string

The obfuscated send method value

Example:
+35799***834
auth_otp
string

The one time password auth id

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

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST /contacts/otp HTTP/1.1 

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

{
    "send_method": "SMS",
    "credentials": [
        {
            "name": "ID_NUMBER",
            "value": "1234567"
        }
    ]
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "obfuscated_value": "+35799***834",
    "auth_otp": "731e4023-4c04-4278-8eb5-240651317e46"
}
Request Email Verification
POST /contacts/email_verification

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
credentials
Array

Information on how the contact will be identified

Object
name
string required

The predetermined information that will be used to identify the contact

Enumeration:
BIRTHDATE

Lookup on contact details

PASSPORT

Lookup on contact details

ID_NUMBER

Lookup on contact details

CARD

Lookup on contact customer identification medium (if enabled) and then on contact details

PHONE

Lookup on contact identity, then on customer identification medium (if enabled) and last on contact details

EMAIL

Lookup on contact identity, then on customer identification medium (if enabled) and last on contact details

LOYALTY_IDENTIFIER

Lookup on customer identification medium (if enabled) and last on contact details

value
string required

The value of the credential to check

Example:
sozosk@gmail.com

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Validate One Time Password
POST /contacts/validate-otp

Verifies an one time password that was requested

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
credentials
Array required

Information on how the contact will be identified

Object
name
string required

Contact identification credentials

Enumeration:
AUTH_OTP

One Time Password Auth Id

EMAIL

The email address that was used to request the otp

PHONE

The phone number that was used to request the otp

ID_NUMBER

The contact’s id number that was used to request the otp

PASSPORT

The contact’s passport that was used to request the otp

BIRTHDATE

The contact’s birthdate that was used to request the otp

CARD

The contact’s card that was used to request the otp

LOYALTY_IDENTIFIER

The contact’s loyalty identifier that was used to request the otp

value
string required

The value of the credential to verify the contact’s authenticity

Example:
12345
code
string required

The OTP that should be used for verification purposes

Example:
123456789
Examples

Responses

200 OK

The request has succeeded

Body
Object
access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
refresh_token
string

Used when access token gets expired in order to refresh

exp
string epoch

The token expiration date

Example:
1572530655
contact
Object

Details about the authorised contact

id
string GUID

The cotnact’s unique identifier

Example:
2f2f9afe-4399-59b7-cbb8-da18c2255064
title
string

The contact’s title

Example:
Mr
first_name
string

The contact’s first name

Example:
John
last_name
string

The contact’s last name

Example:
Doe
company_name
string

The contact’s company name

Example:
CRM
avatar
string

The contact’s avatar

Example:
avatar
is_verified
boolean

Defines whether the used identity is verified

Example:
false
organisations
Array

Details about the organisations that the contact has joined

Object
external_id
string GUID

The organisation’s external identifier

Example:
QWERTY12345671234567324ETFTGBY78
org_type
string

The organisation type

Enumeration:
SERVICE_OWNER
ORGANISATION
name
string

The organisation name

Example:
CRMdotCOM
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST /contacts/validate-otp HTTP/1.1 

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

{
    "credentials": [
        {
            "name": "AUTH_OTP",
            "value": "12345"
        }
    ],
    "code": "123456789"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "SERVICE_OWNER",
            "org_relationship": "SUBSIDIARY",
            "name": "CRMdotCOM"
        }
    ]
}
Refresh Token
POST /contacts/refresh

Authenticate a contact and provide a token for subsequent API access

Request headers

Authorization
string required

Refresh Token supplied when authenticated

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg

Responses

200 OK

The request has succeeded

Body
Object
access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
refresh_token
string

Used when access token gets expired in order to refresh

exp
string epoch

The token expiration date

Example:
1572530655
contact
Object

Details about the authorised contact

id
string GUID

The cotnact’s unique identifier

Example:
2f2f9afe-4399-59b7-cbb8-da18c2255064
title
string

The contact’s title

Example:
Mr
first_name
string

The contact’s first name

Example:
John
last_name
string

The contact’s last name

Example:
Doe
company_name
string

The contact’s company name

Example:
CRM
avatar
string

The contact’s avatar

Example:
avatar
is_verified
boolean

Defines whether the used identity is verified

Example:
false
organisations
Array

Details about the organisations that the contact has joined

Object
external_id
string GUID

The organisation’s external identifier

Example:
QWERTY12345671234567324ETFTGBY78
org_type
string

The organisation type

Enumeration:
SERVICE_OWNER
ORGANISATION
name
string

The organisation name

Example:
CRMdotCOM
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/self-service/v1/contacts/refresh HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "refresh_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "ORGANISATION",
            "org_relationship": "SUBSIDIARY",
            "name": "CRMdotCOM"
        }
    ]
}
Forgot Password
POST /contacts/forgot_password

Requests a password reset for an existing contact

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
username
string required

The username that will be used to request a new password

Example:
johndoe@crm.com
Examples

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST /contacts/forgot_password HTTP/1.1 

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

{
    "username": "johndoe@crm.com"
}

HTTP/1.1 200 OK 
Change Forgotten Password
POST /contacts/change_password

Changes the password for a contact’s identity (EMAIL based)

Request body

Object
token
string required

The token that will verify that the client is trusted (required only if the identity is EMAIL based)

Example:
ABCTKN123456798VGP2020
password
string required

The new password

Example:
wsxcde421qadfg
Examples

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST /contacts/change_password HTTP/1.1 

Content-Type: application/json

{
    "token": "ABCTKN123456798VGP2020",
    "password": "wsxcde421qadfg"
}

HTTP/1.1 200 OK 
Sign Out Contact
POST /contacts/{id}/sign_out

Terminates the contact’ session and will no longer be able to access the client

Path variables

id
string GUID required

The contact (identifier) that will be signed out

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST /contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/sign_out HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Verify Contact Email
GET /contacts/verify_email/{token}

Verify a contact’s email address username

Path variables

token
string required

The token that will used for verifying the contact’s email address

Example:
ABCTKN123456798VGP2020

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/self-service/v1/contacts/verify_email/ABCTKN123456798VGP2020 HTTP/1.1 

HTTP/1.1 200 OK 
Communications
GET /contacts/{id}/communications
GET /communications/{id}
PUT /communications/{id}/actions
List Communications
GET /contacts/{id}/communications

Get a list of a contact’s communications

Path variables

id
string GUID required

The contact (identifier) for which the related communications will be retrieved

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request parameters

sort
string optional

Defines on which attribute the results should be sorted

Allow empty value: true
Examples:
CREATED_DATEUPDATED_DATENAMEPOSTED_DATE
order
string optional

Defines how the results will be ordered

Allow empty value: true
Enumeration:
ASC
DESC
Default:
DESC
page
integer optional

The page number that should be retrieved

Default:
1
Example:
20
size
string optional

The size (total records) of each page

Default:
10
Example:
20
channel
string optional

The type of the communications to be retrieved

Enumeration:
SMS
EMAIL
DEVICE
INAPP
archived
boolean optional

If set to TRUE, only archived communications will be retrieved

Example:
true
viewed
boolean optional

If set to TRUE, only viewed communications will be retrieved

Example:
true

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 200

The request has succeeded

Body
application/json
Object
content
Array

Information about the retrieved communication records

Object
id
string GUID

The communication identifier

Example:
6A24D2B5E44F44B28451FE021FCAD51E
life_cycle_state
string

The state of the communication

Enumeration:
PENDING
COMPLETED
REJECTED
contact_id
string GUID

The contact identifier that communication was sent to

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
is_viewed
boolean

Defines whether the communication has been viewed

Example:
false
viewed_on
integer epoch

The datetime that the recipient viewed the communication

Example:
1583846865
is_archived
boolean

Defines whether the communication has been archived

Example:
true
clicked_on
integer epoch

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

language
string

The language tha the communication was sent in

Example:
ENG
sender
string

The default sender

Example:
dev@crm.com
recipient
string

The email or number of the recipient

Example:
jon@crm.com
subject
string

The actual subject of the communication sent (if applicable)

Example:
Subject Sample
content
string

The actual content of the communication sent

Example:
Content Sample
name
string

The name of the communication plan in case the communication was created from a plan

Example:
Happy Birthday
paging
Object

Information that can be used in order to display large pages

page
integer

The page number

Example:
2
size
integer

The number of records per page

Default:
10
Example:
20
total
integer

The total number of records

Example:
1124
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/communications HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "content": [
        {
            "id": "6A24D2B5E44F44B28451FE021FCAD51E",
            "life_cycle_state": "PENDING",
            "contact_id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
            "channel": "EMAIL",
            "is_viewed": true,
            "viewed_on": 1583846865,
            "is_archived": true,
            "clicked_on": 1,
            "language": "ENG",
            "sender": "dev@crm.com",
            "recipient": "jon@crm.com",
            "content": "",
            "subject": "",
            "name": "Happy Birthday"
        }
    ],
    "paging": {
        "page": 2,
        "size": 20,
        "total": 1124
    }
}
Get Communications
GET /communications/{id}

Get a specific contact’s communication

Path variables

id
string GUID required

The communication identifier that should be returned

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 200

The request has succeeded

Body
application/json
Object
life_cycle_state
string

The state of the communication

Enumeration:
PENDING
COMPLETED
REJECTED
contact
Object

Details about the communication contact

id
string GUID

The unique identifier of the contact

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
name
string

The full name of the contact

Example:
John Johnson
code
string

The unique code of the contact

Example:
C123
channel
string

The channel that the communication is sent through

Enumeration:
SMS
EMAIL
DEVICE
INAPP
is_viewed
boolean

Defines whether the communication has been viewed

Example:
false
viewed_on
integer epoch

The datetime that the recipient viewed the communication

Example:
1583846865
is_archived
boolean

Defines whether the communication has been archived

Example:
true
clicked_on
integer epoch

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

language
string

The language tha the communication was sent in

Example:
ENG
sender
string

The default sender

Example:
dev@crm.com
recipient
string

The communication’s recipient information

Example:
jon@crm.com
subject
string

The actual subject of the communication sent (if applicable)

Example:
Award Provided
content
string

The actual content of the communication sent

Example:
You have been awarded!
name
string

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

Example:
Happy Birthday
created_on
integer epoch

The date and time that the communication was created

Example:
1583846865
title
string

Title of push notification (applicable for INAPP channels)

Example:
New Festive Beverages
subtitle
string

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

Example:
20% discount for December
in_app_image_url
string

Image for push notification

in_app_click_link_url
string

Push notification URL (deep linking)

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
GET https://sandbox.crm.com/self-service/v1/communications/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

auth_token: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "life_cycle_state": "PENDING",
    "contact": {
        "id": "CAD1E31269B76D7A65ACCE45B2E68DFD",
        "name": "John Johnson",
        "code": "C123"
    },
    "channel": "EMAIL",
    "is_viewed": true,
    "viewed_on": 1583846865,
    "is_archived": true,
    "clicked_on": 1,
    "language": "ENG",
    "sender": "dev@crm.com",
    "recipient": "jon@crm.com",
    "subject": "Award Provided",
    "content": "You have been awarded!",
    "name": "Happy Birthday",
    "created_on": 1583846865,
    "title": "New Festive Beverages",
    "subtitle": "20% discount for December",
    "in_app_image_url": "",
    "in_app_click_link_url": ""
}
Communications Actions
PUT /communications/{id}/actions

Mark an existing communication as viewed and/or archived

Path variables

id
string GUID required

The communication identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
viewed
boolean required nullable

Sets the communication as viewed

Example:
true
archived
boolean required nullable

Sets the communication as archived

Example:
true

Responses

200 200

The request has succeeded

Body
application/json
Object
id
string GUID

The communication identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
PUT https://sandbox.crm.com/self-service/v1/communications/CAD1E31269B76D7A65ACCE45B2E68DFD/actions HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "viewed": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "CAD1E31269B76D7A65ACCE45B2E68DFD"
}
Printout
POST /printout
Printout
POST /printout

Request (and retrieve) a printout for an invoice or order

Notes

PRINTOUT FLOW

Integrating printout export for Contacts should be based on the following APIs

  1. Printout
  2. Get (Printout) File

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
format
string required

Defines the format on which the printout will be created to

Enumeration:
PDF

Printout will be generated as pdf

EMAIL

Printout will be sent to the contact’s email address

Example:
PDF
entity
Object required

Defines the entity based on which the printout will be created

type
string required

The entity type

Enumeration:
INVOICE
ORDERS
PAYMENT
CREDIT_NOTE
REFUND
PAYOUT
Example:
INVOICE
id
string GUID required

The entity identifier

Example:
b97d4488-e9c1-a338-8420-b831147b648f

Responses

201 Created

The request has succeeded (applicable if printout is PDF based)

Body
Object
id
string GUID

The printout identifier that will be exported

Example:
e1c67e12-6bae-53c7-f1a1-0a26aa4b27a2
204 No Content

The request has succeeded (applicable if printout is EMAIL based)

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
POST https://sandbox.crm.com/self-service/v1/printout HTTP/1.1 

auth_token: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "format": "PDF",
    "entity": {
        "type": "INVOICE",
        "id": "b97d4488-e9c1-a338-8420-b831147b648f"
    }
}

HTTP/1.1 201 Created 

Content-Type: application/json

{
    "id": "e1c67e12-6bae-53c7-f1a1-0a26aa4b27a2"
}
Contact

Contact Management

POST /contacts/register
DELETE /contacts/{id}
PUT /contacts/{id}
PUT /contacts/{id}/consents
GET /contacts/{id}
GET /contacts/{id}/demographics
POST /contacts/{id}/preferences
GET /contacts/{id}/preferences
Register Contact
POST /contacts/register

Create a new contact (of type person)

Request headers

api_key
string required

The publishable api key for application identification

Example:
ab5f8b2e-092f-4848-8f46-31df1c014060

Request body

Object
first_name
string required nullable

The contact first name (required for EMAIL and PHONE providers)

Example:
John
last_name
string required nullable

The contact last name (required for EMAIL and PHONE providers)

Example:
Doe
identity
Object required

Details about the customer’s identity

provider
string

The contact’s identity provider

Enumeration:
EMAIL
FACEBOOK
GOOGLE
MW4

CRM.COM auth server

PHONE
username
string required nullable

The contact’s username (required for EMAIL). If password not provided then OTP request is triggered.

Example:
johndoe@crm.com
password
string nullable

The contact’s password (applicable for EMAIL).

Example:
12345
validation_required
boolean required nullable

Defines whether the email requires verification (applicable when username and password are provided)

Example:
true
phone_number
string required nullable

The contact’s phone number (required for PHONE). OTP request is triggered.

Example:
2265577
country_code
string required nullable

The contact’s phone number country code (required for PHONE)

Example:
CYP
application_id
string required nullable

Application ID requesting register

Example:
3c33dcc6-3958-4e7d-ae0e-592948627711
token
string required nullable

The token taken from the oAUTH service provider (required for Facebook and Google)

Example:
YOJDAKEb9l1U0sUzrskM6X4emzrSeXqb
service_acceptance
boolean nullable

Defines whether the contact has accepted the client service

Default:
true
Example:
true
email_opt_out
boolean nullable

The contact setting for receiving emails

Default:
false
Example:
true
sms_opt_out
boolean nullable

The contact setting for receiving sms

Default:
false
Example:
true
consent_state
string nullable

The contact setting for consent

Enumeration:
PENDING
ACCEPTED
REJECTED
WITHDRAWN
referral_code
string nullable

The code that the contact was referred with in order to register

Example:
1234
country_agreement
string nullable

The country code that the contact agreed to register to

Example:
CYP
custom_fields
Array nullable
Object
key
string

The custom field’s unique key

Example:
custom_key
value
string

The custom field’s value

Example:
0001-345
pass_code
string

Pass code to be redeemed - optionally used on Landing page registration flow, if pass code is invalid then contact registration will not proceed

Example:
HHNSU32LNK
Examples

Responses

200 OK

The request has succeeded

Body
Object
access_token
string

The token that can be used in subsequent API calls

Example:
eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg
exp
string epoch

The token expiration date

Example:
1572530655
contact
Object

Details about the authorised contact

title
string

The contact’s title

Example:
Mr
first_name
string

The contact’s first name

Example:
John
last_name
string

The contact’s last name

Example:
Doe
avatar
string

The contact’s avatar

Example:
avatar
is_verified
boolean

Defines whether the used identity is verified

organisations
Array

Details about the organisations that the contact has joined

Object
external_id
string GUID

The organisation’s external identifier

Example:
QWERTY12345671234567324ETFTGBY78
org_type
string

The organisation type

Example:
ORGANISATION
org_relationship
string

The organisation relationship

Example:
MERCHANT
name
string

The organisation name

Example:
CRMdotCOM
obfuscated_value
string

The obfuscated send method value (applicable only when provider is EMAIL or PHONE and an OTP is generated)

Examples:
+35799***834so****@gmail.com
auth_otp
string

The one time password auth id (applicable only when provider is EMAIL or PHONE and an OTP is generated)

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

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1
Example 2
Example 3
POST /contacts/register HTTP/1.1 

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

{
    "first_name": "John",
    "last_name": "Doe",
    "identity": {
        "provider": "EMAIL",
        "username": "johndoe@crm.com",
        "password": "12345",
        "validation_required": false
    },
    "service_acceptance": "true",
    "email_opt_out": "true",
    "sms_opt_out": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "avatar": "avatar",
        "is_verified": "false"
    }
}
POST /contacts/register HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "first_name": "John",
    "last_name": "Doe",
    "identity": {
        "provider": "PHONE",
        "phone_number": "22265577",
        "country_code": "CYP"
    },
    "service_acceptance": "true",
    "email_opt_out": "true",
    "sms_opt_out": "true"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "obfuscated_value": "+35799***834",
    "auth_otp": "731e4023-4c04-4278-8eb5-240651317e46"
}

Contact registration including a pass code from a Landing page

POST https://sandbox.crm.com/self-service/v1/contacts/register HTTP/1.1 

api_key: ab5f8b2e-092f-4848-8f46-31df1c014060
Content-Type: application/json

{
    "first_name": "John",
    "last_name": "Doe",
    "identity": {
        "provider": "PHONE",
        "phone_number": "2265577",
        "country_code": "CYP",
        "application_id": "3c33dcc6-3958-4e7d-ae0e-592948627711",
        "token": "YOJDAKEb9l1U0sUzrskM6X4emzrSeXqb"
    },
    "pass_code": "HHNSU32LNK"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "access_token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhMjc4ZDNlNS05YjhlLTQzNmUtOTIzMC03MGYzZTJkZjFjYTUiLCJleHAiOjE1Njg1NTQxMjJ9.LemqPPThkqfakkKS6CdkNvV1Lnc88CWirEpHOPnWjJPQz02zgkKSwfbvrEsl3OmR2LUhDILsOXf4x-GPFmNJCg",
    "exp": "1572530655",
    "contact": {
        "first_name": "John",
        "last_name": "Doe",
     },
    "organisations": [
        {
            "external_id": "QWERTY12345671234567324ETFTGBY78",
            "org_type": "ORGANISATION",
            "org_relationship": "MERCHANT",
            "name": "CRMdotCOM"
        }
    ],
    "obfuscated_value": "+35799***834",
}
Unregister Contact
DELETE /contacts/{id}

Unregisters a contact from an organisation

Path variables

id
string GUID required

The id of the contact to unregister

Example:
e18ee2bc-c6f3-49e1-8e05-763386378017

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1

Remove an existing contact address

DELETE https://sandbox.crm.com/self-service/v1/contacts/e18ee2bc-c6f3-49e1-8e05-763386378017 HTTP/1.1 

auth_token: 4AD9C84FA60F9FE407140E20F707726A

HTTP/1.1 200 OK 
Update Contact
PUT /contacts/{id}

Updates an existing contact

Path variables

id
string GUID required

The contact (identifier) that will be updated

Example:
e2ade504-9b90-92be-0adb-3258475ff695

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
company_name
string nullable

Company Name if the Contact represents a company, required attribute if the type is a Company.

Example:
Alpha Bravo
title
string nullable

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

Example:
Sir
first_name
string nullable

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

Example:
John
middle_name
string nullable

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

Example:
Alias
last_name
string nullable

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

Example:
Doe
preferred_language_code
string nullable

The contact preferred language

Example:
ENG
category_id
string GUID

The contact’s category ID

Example:
4AD9C84FA60F9FE407140E20F707726A
statutory_number
string nullable

The contact statutory number

Example:
EF-12345
demographics
Object nullable

Information about the person demographics

gender
string nullable

The person gender

Enumeration:
MALE
FEMALE
passport
Object nullable

Information about the person passport

passport_number
string

The passport number

Example:
123456
issue_country_code
string

The country that issued the passport

Example:
CYP
expiration_date
integer epoch

The passport expiration date

Example:
129876567
id_details
Object nullable

Information about the person id

id_number
string

The id number

Example:
K123456
issue_country_code
string

The country that issued the id

Example:
CYP
expiration_date
integer epoch

The id expiration date

Example:
129876567
name_day
Object nullable

Information about the person nameday

month
integer required

The nameday month

Example:
10
day
integer required

The nameday day

Example:
4
date_of_birth
Object nullable

Information about the person birthdate

year
integer required

The birth year

Example:
2018
month
integer required

The birth month

Example:
10
day
string required

The birth day

Example:
16
company_profle
Object nullable

A company’s profile. Applicable only if contact_type is COMPANY

profile_year
integer epoch

The company’s profile year

Example:
129876567
annual_turnover
number

The annual turnover

Example:
1568.14
established_on
integer epoch

The date that the company was established on

Example:
129876567
number_of_employees
integer

The company’s number of employees

Example:
1
registration_number
string

The company registration number

Example:
123456
registration_country
string

The country that the company is registered to

Example:
CYP
tax_reference_number
string

The company tax reference number

Example:
123456
vat_registration_number
string

The company vat registration number

Example:
123456
industry_id
string GUID

The company’s Industry ID

Example:
4AD9C84FA60F9FE407140E20F707726A
industry_sectors
Array

The company’s Industry Sectors.

string GUID
Example:
4AD9C84FA60F9FE407140E20F707726A
email_address
string nullable

The contact’s email address

Example:
bill@gmail.com
sms_opt_out
boolean nullable

The contact setting for receiving sms

Example:
false
email_opt_out
boolean nullable

The contact setting for receiving email

Example:
false
is_tax_exempt
boolean nullable

Defiens whether the contact is tax exempt or not

Example:
false
custom_fields
Array nullable
Object
key
string

The custom field’s unique key

Example:
custom_key
value
string

The custom field’s value

Example:
0001-345
avatar_url
string

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
658AB90A6A77437091D158FD8E697B11
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1

Update contact

PUT https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "company_name": "Alpha Bravo",
    "title": "Sir",
    "first_name": "John",
    "middle_name": "Alias",
    "last_name": "Doe",
    "preferred_language_code": "ENG",
    "category_id": "4AD9C84FA60F9FE407140E20F707726A",
    "statutory_number": "EF-12345",
    "demographics": {
        "gender": "MALE",
        "passport": {
            "passport_number": "123456",
            "issue_country_code": "CYP",
            "expiration_date": 129876567
        },
        "id_details": {
            "id_number": "K123456",
            "issue_country_code": "CYP",
            "expiration_date": 129876567
        },
        "name_day": {
            "month": 10,
            "day": 4
        },
        "date_of_birth": {
            "year": 2018,
            "month": 10,
            "day": "16"
        }
    },
    "company_profle": {
        "profile_year": 129876567,
        "annual_turnover": 1568.14,
        "established_on": 129876567,
        "number_of_employees": 1,
        "registration_number": "123456",
        "registration_country": "CYP",
        "tax_reference_number": "123456",
        "vat_registration_number": "123456",
        "industry_id": "4AD9C84FA60F9FE407140E20F707726A",
        "industry_sectors": [
            "4AD9C84FA60F9FE407140E20F707726A"
        ]
    },
    "email_address": "bill@gmail.com",
    "sms_opt_out": "false",
    "email_opt_out": "false",
    "is_tax_exempt": "false",
    "consent_state": "ACCEPTED"
}
PUT /contacts/{id}/consents

Updates the Consent state of the Contact

Path variables

id
string GUID required

The contact identifier that will be updated

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Request body

Object
consent_state
string required

The contact setting for consent

Enumeration:
PENDING
ACCEPTED
REJECTED
WITHDRAWN

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
658AB90A6A77437091D158FD8E697B11
400 Bad Request

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

401 Unauthorized

The provided API Key or Token is invalid

403 Forbidden

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

404 Not Found

The requested resource does not exist

500 Internal Server Error

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

502 Bad Gateway

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

503 Service Unavailable

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

504 Gateway Timeout

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

Example 1

Update contact

PUT https://sandbox.crm.com/self-service/v1/contacts/CAD1E31269B76D7A65ACCE45B2E68DFD/consents HTTP/1.1 

Authorization: 4AD9C84FA60F9FE407140E20F707726A
Content-Type: application/json

{
    "consent_state": "ACCEPTED"
}

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "id": "658AB90A6A77437091D158FD8E697B11"
}
Get Contact
GET /contacts/{id}

Retrieve basic details for a specific contact

Path variables

id
string GUID required

The contact identifier that should be returned

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD

Request headers

auth_token
string required

Authorization Token

Example:
4AD9C84FA60F9FE407140E20F707726A

Responses

200 OK

The request has succeeded

Body
Object
id
string GUID

The contact identifier

Example:
CAD1E31269B76D7A65ACCE45B2E68DFD
code
string

The contact code

Example:
ABC-123
type
string

Tje contact type

Enumeration:
PERSON
COMPANY
title
string

The contact title

Example:
Sir
first_name
string

The contact first name

Example:
John
middle_name
string

The contact middle name

Example:
Alias
last_name
string

The contact last name

Example:
Doe
preferred_language_code
string

The contact preferred language

Example:
ENG
avatar_url
string

The contact URL of Avatar

email
string

The contact email address

Example: