Overview
Base URL:
https://api.referrizer.com
Welcome to Referrizer API! The API is organized around REST. All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON.
You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Authentication
To authorize, add a token to the Authorization header:
-H 'Authorization: Bearer {apiToken}'
Authorization: Bearer {apiToken}
An access token is required when making API requests. The access token should be supplied by using an HTTP header:
Authorization: Bearer {apiToken}
Your API token is placed inside the backend on Apps / Integration page.
Pagination
Requests that return multiple items will be paginated to 30 items by default. You can specify further pages with the ?page
parameter. You can also set a custom page size up to 100 with the ?perPage
parameter.
GET /contacts?page=2&perPage=100
Note that page numbering is 1-based and that omitting the ?page
parameter will return the first page.
The total number of resources is always included in the X-Total-Count
HTTP header.
Timestamps and timezones
All timestamps are represented in ISO 8601 format:
YYYY-MM-DDTHH:MM:SS.SSSZ
All timestamps are returned in UTC.
Errors
Our API returns standard HTTP success or error status codes. For errors, we will also include extra information about what went wrong encoded in the response as JSON.
The errorCode
parameter will indicate a CAPS_CASE constant error code that you can programmatically consume to make resolution decisions from. The message
parameter will indicate a human-readable description of the error.
HTTP CODE | ERROR CODE |
---|---|
400 | MISSING_REQUIRED_FIELD |
400 | RESOURCE_ALREADY_EXISTS |
400 | CONTACT_ALREADY_CHECKED_IN |
400 | NOT_UNIQUE |
400 | ILLEGAL_ARGUMENT |
400 | INSUFFICIENT_LOYALTY_POINTS |
400 | NOT_AVAILABLE |
400 | VISIT_DATE_IN_FUTURE |
400 | INVALID_CUSTOM_FIELD_NAME |
401 | MISSING_TOKEN |
401 | INVALID_TOKEN |
404 | RESOURCE_NOT_FOUND |
429 | TOO_MANY_REQUESTS |
Contacts
Contacts allow you to send automated messages and to track visits or engagement that is associated with the same customer when pulled to the Referrizer system. The API allows you to create, update and delete your contacts. You can retrieve individual contacts as well as a list of all your contacts.
The contact object
Example response:
{
"id" : "9f596879a36f1d83f5cfd1f156acc20f",
"source" : "Customers Page",
"firstName" : "Lazar",
"lastName" : "",
"phone" : "19547896027",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2018-11-18T20:02:53.000Z",
"firstVisitDate" : "2018-11-26T20:01:29.000Z",
"lastVisitDate" : "2018-12-24T11:20:18.000Z",
"visitsCount" : 3,
"loyaltyPointsCount" : 6,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "d078bb3a23d069d8eade85ade1b0ed8a",
"type" : "text",
"value" : "James"
} ]
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 693
{
"id" : "9f596879a36f1d83f5cfd1f156acc20f",
"source" : "Customers Page",
"firstName" : "Lazar",
"lastName" : "",
"phone" : "19547896027",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2018-11-18T20:02:53.000Z",
"firstVisitDate" : "2018-11-26T20:01:29.000Z",
"lastVisitDate" : "2018-12-24T11:20:18.000Z",
"visitsCount" : 3,
"loyaltyPointsCount" : 6,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "d078bb3a23d069d8eade85ade1b0ed8a",
"type" : "text",
"value" : "James"
} ]
}
Attribute | Description |
---|---|
id String |
Unique identifier for the object. |
firstName String |
Contact's first name. |
lastName String |
Contact's last name. |
phone String |
Phone number. This field is required if there is no email address provided. |
email String |
Email address. This field is required if there is no phone number provided. |
birthDate String |
Birth date in timestamp. |
registrationDate String |
Date when contact is created. |
firstVisitDate String |
Date of the first visit (first check in). |
lastVisitDate String |
Date of the last visit (last check in). |
visitsCount Number |
Total number of visits. |
loyaltyPointsCount Number |
Number of loyalty points. |
type String |
Contact's type. Can be ACTIVE (Current customer), PASSIVE (Past customer) or POTENTIAL (Lead) |
description String |
An arbitrary string that you can attach to a contact. It is displayed in the Contact details page. |
refererId String |
Unique identifier of the referer. |
referrerFirstName String |
First name of the referer. |
referrerLastName String |
Last Name of the referer. |
referralDate String |
Date of the referer. |
source String |
Source from which customer was created |
labels Array |
Array of contact's labels. |
customFields Array |
Array of contact's custom fields. |
customFields[0].id String |
Array of contact's custom created fields. Unique identifier for the custom field. |
customFields[0].value String |
Custom field value. |
customFields[0].type String |
Custom field value type. 'text','number','date','single_select' and 'multi_select'. |
Create a contact
POST /v1/contacts
Example request:
$ curl 'https://api.referrizer.com/v1/contacts' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"firstName" : "Joe",
"lastName" : "Doe",
"phone" : "19547806028",
"type" : "POTENTIAL",
"customFields" : [ {
"id" : "e1dcb19ba8bda889de0c93e9de76327e",
"type" : "text",
"value" : "Kobe"
} ]
}'
POST /v1/contacts HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 217
Host: api.referrizer.com
{
"firstName" : "Joe",
"lastName" : "Doe",
"phone" : "19547806028",
"type" : "POTENTIAL",
"customFields" : [ {
"id" : "e1dcb19ba8bda889de0c93e9de76327e",
"type" : "text",
"value" : "Kobe"
} ]
}
Example response:
{
"id" : "0dcc07581c4192a546a8992c2969a8fb",
"source" : "API",
"firstName" : "Joe",
"lastName" : "Doe",
"phone" : "19547806028",
"email" : null,
"birthDate" : null,
"registrationDate" : "2024-11-18T15:52:29.000Z",
"firstVisitDate" : null,
"lastVisitDate" : null,
"visitsCount" : 0,
"loyaltyPointsCount" : 0,
"type" : "POTENTIAL",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "e1dcb19ba8bda889de0c93e9de76327e",
"type" : "text",
"value" : "Kobe"
} ]
}
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 623
{
"id" : "0dcc07581c4192a546a8992c2969a8fb",
"source" : "API",
"firstName" : "Joe",
"lastName" : "Doe",
"phone" : "19547806028",
"email" : null,
"birthDate" : null,
"registrationDate" : "2024-11-18T15:52:29.000Z",
"firstVisitDate" : null,
"lastVisitDate" : null,
"visitsCount" : 0,
"loyaltyPointsCount" : 0,
"type" : "POTENTIAL",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "e1dcb19ba8bda889de0c93e9de76327e",
"type" : "text",
"value" : "Kobe"
} ]
}
Creates a new contact object.
Request arguments
Argument | Description |
---|---|
firstName String optional |
Contact's first name. |
lastName String optional |
Contact's last name. |
phone String required |
Phone number. This field is required if there is no email address provided. |
email String required |
Email address. This field is required if there is no phone number provided. |
birthDate String optional |
Birth date in timestamp. |
type String optional |
Contact's type. Can be ACTIVE (Current customer), PASSIVE (Past customer) or POTENTIAL (Lead). Default value is ACTIVE. |
description String optional |
An arbitrary string that you can attach to a contact. It is displayed in the Contact details page. |
labels Array optional |
Array of contact's labels. |
shouldSendNotification Boolean optional |
Option to send registration notification (email/text) to the contact, if email/phone is provided. By default, notification will not be sent. To see or change text template visit Loyalty settings page. Email template can be changed on Email templates page. |
customFields Array optional |
Array of contact's custom created fields. |
customFields[0].id String optional |
Unique identifier for the custom field. |
customFields[0].value String optional |
Custom field value. |
customFields[0].type String optional |
Custom field value type. 'text','number','date','single_select' and 'multi_select'. |
Returns
Returns a contact object if the call succeeded. If neither the phone number nor the email address has been provided, the call will return an error. If a contact with provided phone/email already exists, the call will return an error.
Retrieve a contact
Retrieves the details of an existing contact. You only need to supply the unique contact identifier that was returned upon contact creation.
GET /v1/contacts/{id}
Example request:
$ curl 'https://api.referrizer.com/v1/contacts/9f596879a36f1d83f5cfd1f156acc20f' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/contacts/9f596879a36f1d83f5cfd1f156acc20f HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
{
"id" : "9f596879a36f1d83f5cfd1f156acc20f",
"source" : "Customers Page",
"firstName" : "Lazar",
"lastName" : "",
"phone" : "19547896027",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2018-11-18T20:02:53.000Z",
"firstVisitDate" : "2018-11-26T20:01:29.000Z",
"lastVisitDate" : "2018-12-24T11:20:18.000Z",
"visitsCount" : 3,
"loyaltyPointsCount" : 6,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "d078bb3a23d069d8eade85ade1b0ed8a",
"type" : "text",
"value" : "James"
} ]
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 693
{
"id" : "9f596879a36f1d83f5cfd1f156acc20f",
"source" : "Customers Page",
"firstName" : "Lazar",
"lastName" : "",
"phone" : "19547896027",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2018-11-18T20:02:53.000Z",
"firstVisitDate" : "2018-11-26T20:01:29.000Z",
"lastVisitDate" : "2018-12-24T11:20:18.000Z",
"visitsCount" : 3,
"loyaltyPointsCount" : 6,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "d078bb3a23d069d8eade85ade1b0ed8a",
"type" : "text",
"value" : "James"
} ]
}
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the contact. |
Returns
Returns a contact object if a valid identifier was provided.
Update a contact
PUT /v1/contacts/{id}
Example request:
$ curl 'https://api.referrizer.com/v1/contacts/9f596879a36f1d83f5cfd1f156acc20f' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"id" : "9f596879a36f1d83f5cfd1f156acc20f",
"source" : "Customers Page",
"firstName" : "Lazar",
"lastName" : "",
"phone" : "19547896027",
"email" : "[email protected]",
"registrationDate" : "2018-11-18T20:02:53.000Z",
"firstVisitDate" : "2018-11-26T20:01:29.000Z",
"lastVisitDate" : "2018-12-24T11:20:18.000Z",
"visitsCount" : 3,
"loyaltyPointsCount" : 6,
"type" : "ACTIVE",
"labels" : [ ],
"customFields" : [ {
"id" : "e9d74221f8df3047885e1862b18ee9cb",
"type" : "text",
"value" : "Kobe"
} ]
}'
PUT /v1/contacts/9f596879a36f1d83f5cfd1f156acc20f HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 540
Host: api.referrizer.com
{
"id" : "9f596879a36f1d83f5cfd1f156acc20f",
"source" : "Customers Page",
"firstName" : "Lazar",
"lastName" : "",
"phone" : "19547896027",
"email" : "[email protected]",
"registrationDate" : "2018-11-18T20:02:53.000Z",
"firstVisitDate" : "2018-11-26T20:01:29.000Z",
"lastVisitDate" : "2018-12-24T11:20:18.000Z",
"visitsCount" : 3,
"loyaltyPointsCount" : 6,
"type" : "ACTIVE",
"labels" : [ ],
"customFields" : [ {
"id" : "e9d74221f8df3047885e1862b18ee9cb",
"type" : "text",
"value" : "Kobe"
} ]
}
Example response:
{
"id" : "9f596879a36f1d83f5cfd1f156acc20f",
"source" : "Customers Page",
"firstName" : "Lazar",
"lastName" : "",
"phone" : "19547896027",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2018-11-18T20:02:53.000Z",
"firstVisitDate" : "2018-11-26T20:01:29.000Z",
"lastVisitDate" : "2018-12-24T11:20:18.000Z",
"visitsCount" : 3,
"loyaltyPointsCount" : 6,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "e9d74221f8df3047885e1862b18ee9cb",
"type" : "text",
"value" : "Kobe"
} ]
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 692
{
"id" : "9f596879a36f1d83f5cfd1f156acc20f",
"source" : "Customers Page",
"firstName" : "Lazar",
"lastName" : "",
"phone" : "19547896027",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2018-11-18T20:02:53.000Z",
"firstVisitDate" : "2018-11-26T20:01:29.000Z",
"lastVisitDate" : "2018-12-24T11:20:18.000Z",
"visitsCount" : 3,
"loyaltyPointsCount" : 6,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "e9d74221f8df3047885e1862b18ee9cb",
"type" : "text",
"value" : "Kobe"
} ]
}
Updates the specified contact by setting the values of the parameters passed. Any parameters not provided will be set to null
, except for custom fields. Only the provided custom field will be updated, while the rest remain unchanged.
This request accepts mostly the same arguments as the contact creation call. Note that you can pass the whole object returned from the GET request, non-updatable arguments will be ignored.
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the contact. |
Request arguments
Argument | Description |
---|---|
firstName String optional |
Contact's first name. |
lastName String optional |
Contact's last name. |
phone String required |
Phone number. This field is required if there is no email address provided. |
email String required |
Email address. This field is required if there is no phone number provided. |
birthDate String optional |
Birth date in timestamp. |
type String optional |
Contact's type. Can be ACTIVE (Current customer), PASSIVE (Past customer) or POTENTIAL (Lead). Default value is ACTIVE. |
description String optional |
An arbitrary string that you can attach to a contact. It is displayed in the Contact details page. |
labels Array optional |
Array of contact's labels. |
customFields Array optional |
Array of contact's custom created fields. |
customFields[0].id String optional |
Unique identifier for the custom field. |
customFields[0].value String optional |
Custom field value.For single and multi select provide option id and that field will be selected. For multi u can pass id like "value" : "2e1e950d25acc56fe7ceb238c46122b0, 610d609808610824ddd7685ff83827e7" . |
Returns
Returns the contact object if the update succeeded. Returns an error if update parameters are invalid (e.g. specifying an invalid type).
Delete a contact
Permanently deletes a contact. It cannot be undone.
DELETE /v1/contacts/{id}
Example request:
$ curl 'https://api.referrizer.com/v1/contacts/9d4f787d2a9145c06fd68470ae128688' -i -X DELETE \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
DELETE /v1/contacts/9d4f787d2a9145c06fd68470ae128688 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
{
"id" : "9d4f787d2a9145c06fd68470ae128688",
"userId" : "5bb61337d65f53566992ee70ef50c4a6",
"source" : "Customers Page",
"firstName" : "Lazar444",
"lastName" : "",
"phone" : "19546806028",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2018-11-17T18:23:35.000Z",
"firstVisitDate" : "2021-05-31T20:30:00.000Z",
"lastVisitDate" : "2021-05-31T20:30:00.000Z",
"visitsCount" : 1,
"loyaltyPointsCount" : 0,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "e1dcb19ba8bda889de0c93e9de76327e",
"type" : "text",
"value" : "James"
} ]
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 752
{
"id" : "9d4f787d2a9145c06fd68470ae128688",
"userId" : "5bb61337d65f53566992ee70ef50c4a6",
"source" : "Customers Page",
"firstName" : "Lazar444",
"lastName" : "",
"phone" : "19546806028",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2018-11-17T18:23:35.000Z",
"firstVisitDate" : "2021-05-31T20:30:00.000Z",
"lastVisitDate" : "2021-05-31T20:30:00.000Z",
"visitsCount" : 1,
"loyaltyPointsCount" : 0,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "e1dcb19ba8bda889de0c93e9de76327e",
"type" : "text",
"value" : "James"
} ]
}
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the contact. |
Returns
Returns a deleted object. If the contact ID does not exist, this call returns an error.
List all contacts
Returns a list of your contacts. The contacts are returned sorted by registration date, with the most recent contacts appearing first.
GET /v1/contacts
Example request:
$ curl 'https://api.referrizer.com/v1/contacts?perPage=2' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/contacts?perPage=2 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
[ {
"id" : "0dcc07581c4192a546a8992c2969a8fb",
"source" : "API",
"firstName" : "Joe",
"lastName" : "Doe",
"phone" : "19547806028",
"email" : null,
"birthDate" : null,
"registrationDate" : "2024-11-18T15:52:29.000Z",
"firstVisitDate" : null,
"lastVisitDate" : null,
"visitsCount" : 0,
"loyaltyPointsCount" : 0,
"type" : "POTENTIAL",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "e1dcb19ba8bda889de0c93e9de76327e",
"type" : "text",
"value" : "Kobe"
} ]
}, {
"id" : "b16ef693d51f1c964741b0da9116602e",
"source" : "Customers Page",
"firstName" : "Ada",
"lastName" : "Kuphal",
"phone" : "1-513-925-6268 x6010",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2024-11-18T15:52:06.000Z",
"firstVisitDate" : null,
"lastVisitDate" : null,
"visitsCount" : 0,
"loyaltyPointsCount" : -1,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ ]
} ]
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Total-Count: 7
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 1200
[ {
"id" : "0dcc07581c4192a546a8992c2969a8fb",
"source" : "API",
"firstName" : "Joe",
"lastName" : "Doe",
"phone" : "19547806028",
"email" : null,
"birthDate" : null,
"registrationDate" : "2024-11-18T15:52:29.000Z",
"firstVisitDate" : null,
"lastVisitDate" : null,
"visitsCount" : 0,
"loyaltyPointsCount" : 0,
"type" : "POTENTIAL",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ {
"id" : "e1dcb19ba8bda889de0c93e9de76327e",
"type" : "text",
"value" : "Kobe"
} ]
}, {
"id" : "b16ef693d51f1c964741b0da9116602e",
"source" : "Customers Page",
"firstName" : "Ada",
"lastName" : "Kuphal",
"phone" : "1-513-925-6268 x6010",
"email" : "[email protected]",
"birthDate" : null,
"registrationDate" : "2024-11-18T15:52:06.000Z",
"firstVisitDate" : null,
"lastVisitDate" : null,
"visitsCount" : 0,
"loyaltyPointsCount" : -1,
"type" : "ACTIVE",
"description" : null,
"refererId" : null,
"referrerFirstName" : null,
"referrerLastName" : null,
"referralDate" : null,
"labels" : [ ],
"customFields" : [ ]
} ]
Request parameters
Parameter | Description |
---|---|
email optional |
A filter on the list based on the contact’s email field. |
phone optional |
A filter on the list based on the contact’s phone field. You should not provide more than one filter argument. |
page optional |
Current page of the collection. Default is 1. |
perPage optional |
Maximum number of items to be returned in result set. Default is 30. |
Returns
An array of up to perPage
contacts. Passing an optional phone
or email
will result in filtering to contacts with only that exact phone/email. Each entry in the array is a separate contact object. If no more contacts are available, the resulting array will be empty. This request should never return an error.
Create a custom field
Creates a new custom field object.
POST /v1/custom-fields
Example request:
$ curl 'https://api.referrizer.com/v1/contacts/custom-fields' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"name" : "CustomFieldName",
"type" : "single_select",
"options" : [ {
"value" : "Option1"
}, {
"value" : "Option2"
}, {
"value" : "Option3"
} ]
}'
POST /v1/contacts/custom-fields HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 171
Host: api.referrizer.com
{
"name" : "CustomFieldName",
"type" : "single_select",
"options" : [ {
"value" : "Option1"
}, {
"value" : "Option2"
}, {
"value" : "Option3"
} ]
}
Example response:
{
"id" : "e946d5b4c30102878994ee6b1f6be2aa",
"name" : "CustomFieldName",
"type" : "single_select",
"options" : [ {
"id" : "2069c355d8f7ab878583fa7483719ad7",
"value" : "Option1"
}, {
"id" : "2231b1f398c249780931239cd707ec80",
"value" : "Option2"
}, {
"id" : "007162f1e26ef2ccbbd99fc71223f715",
"value" : "Option3"
} ]
}
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 357
{
"id" : "e946d5b4c30102878994ee6b1f6be2aa",
"name" : "CustomFieldName",
"type" : "single_select",
"options" : [ {
"id" : "2069c355d8f7ab878583fa7483719ad7",
"value" : "Option1"
}, {
"id" : "2231b1f398c249780931239cd707ec80",
"value" : "Option2"
}, {
"id" : "007162f1e26ef2ccbbd99fc71223f715",
"value" : "Option3"
} ]
}
Request arguments
Argument | Description |
---|---|
name String required |
Name of the custom field. Must be unique. |
type String required |
Type of custom field. Can be 'text', 'number', 'date', 'single_select' or 'multi_select'. |
options[0].value String optional |
Option value as list of option Object. options : [{"value":"Option 1"},{"value":"Option 2"}, ...] it is used for 'single_select' and 'multi_select' in other types option will be ignored. |
Returns
The created custom field object if the call succeeded. If the name or type has not been provided, the call will return an error. If a custom field with the provided name already exists, the call will return an error.
List all custom fields
Custom fields can be described as specific contact field. Custom fields let you store arbitrary data on contacts. This endpoint returns a list of your custom fields.
GET /v1/custom-fields
Example request:
$ curl 'https://api.referrizer.com/v1/contacts/custom-fields' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/contacts/custom-fields HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
[ {
"id" : "920edb5bc8b4161b93e76b6773e5a887",
"name" : "Active Intro Offer End Date",
"type" : "multi_select",
"options" : [ {
"id" : "20930395b691efae7682d6c9b8ae585c",
"value" : "Black"
} ]
}, {
"id" : "bb8618f05f695691fbac639f63d85c99",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "20930395b691efae7682d6c9b8ae585c",
"value" : "Option 1"
}, {
"id" : "6cf6d4a80f1b0e0e81105b19ed0d5e1c",
"value" : "Option 2"
}, {
"id" : "5f9f27a393beb77453bbc56bc98b11a4",
"value" : "Option 3"
} ]
}, {
"id" : "e946d5b4c30102878994ee6b1f6be2aa",
"name" : "CustomFieldName",
"type" : "single_select",
"options" : [ {
"id" : "2069c355d8f7ab878583fa7483719ad7",
"value" : "Option1"
}, {
"id" : "2231b1f398c249780931239cd707ec80",
"value" : "Option2"
}, {
"id" : "007162f1e26ef2ccbbd99fc71223f715",
"value" : "Option3"
} ]
}, {
"id" : "e1852b933a0122481ff5e7bcfd4e66ef",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "711d7beb473096fab147a75762409a86",
"value" : "Option 2"
}, {
"id" : "bef14153c952c214173ed98636634d37",
"value" : "Option 3"
}, {
"id" : "1a0de28de9f6adabcb7f781233998693",
"value" : "Create New Option"
}, {
"id" : "00e4d991e8dfb3b25d68860f4ffcc40a",
"value" : "Update New Option"
} ]
}, {
"id" : "477922a5bf66e70a4eee45436c8a1795",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "c1384f5cda4987de13adc7c01d821443",
"value" : "Option 1"
}, {
"id" : "d50c185294ad5218c036375419c78dbc",
"value" : "Option 2"
}, {
"id" : "d5c3d6d6dc0e2f4fb00b94cd097a4621",
"value" : "Option 3"
} ]
}, {
"id" : "f1bebbbfc28b26fb87ea0111086c2dcc",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "53c46210ad0cfa2cc53e8a19102816e0",
"value" : "Option 1"
}, {
"id" : "4103ca8c3b618eeee78691a1ecf77a51",
"value" : "Option 2"
}, {
"id" : "db9825d0e018f96a66b1700c8a11e93a",
"value" : "Option 3"
} ]
}, {
"id" : "802ac30bd665c3cc22e8a61005f78513",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "ef497664d56682283084c84355ee1ca8",
"value" : "Option 1"
}, {
"id" : "ac90eae46b54fe6f4cb8fee035241ccc",
"value" : "Option 2"
}, {
"id" : "59683e14785e0b55870768871a979088",
"value" : "Option 3"
} ]
}, {
"id" : "811a6c041f4acd41ff69c34430c0d9db",
"name" : "Parent Name",
"type" : "text"
}, {
"id" : "488f606559614c90447dd472af9c876f",
"name" : "Favorite Food",
"type" : "text"
}, {
"id" : "cb86b0f9c6589d964839c5372756b2c5",
"name" : "Favorite Food",
"type" : "text"
}, {
"id" : "f8f2c579409cba0c176ce4f7a95156a0",
"name" : "Favorite Food",
"type" : "text"
}, {
"id" : "fa5c9b05922cabca82e1ee339591b229",
"name" : "Parent Name",
"type" : "text"
}, {
"id" : "31659c2abb583d9b35d07a909fbef864",
"name" : "New Name",
"type" : "text"
}, {
"id" : "3690a40e2ff92b87c15b099c11a54f3f",
"name" : "Favorite Food",
"type" : "text"
}, {
"id" : "6a9392c3af7877aea86f7ecb67c782c9",
"name" : "Parent Name",
"type" : "text"
}, {
"id" : "f3bab02b830166c1d10672ad7246ae99",
"name" : "Parent Name",
"type" : "text"
}, {
"id" : "f512312735ebab838c4bdc2ffa3b53f4",
"name" : "Favorite Food",
"type" : "text"
} ]
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 3417
[ {
"id" : "920edb5bc8b4161b93e76b6773e5a887",
"name" : "Active Intro Offer End Date",
"type" : "multi_select",
"options" : [ {
"id" : "20930395b691efae7682d6c9b8ae585c",
"value" : "Black"
} ]
}, {
"id" : "bb8618f05f695691fbac639f63d85c99",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "20930395b691efae7682d6c9b8ae585c",
"value" : "Option 1"
}, {
"id" : "6cf6d4a80f1b0e0e81105b19ed0d5e1c",
"value" : "Option 2"
}, {
"id" : "5f9f27a393beb77453bbc56bc98b11a4",
"value" : "Option 3"
} ]
}, {
"id" : "e946d5b4c30102878994ee6b1f6be2aa",
"name" : "CustomFieldName",
"type" : "single_select",
"options" : [ {
"id" : "2069c355d8f7ab878583fa7483719ad7",
"value" : "Option1"
}, {
"id" : "2231b1f398c249780931239cd707ec80",
"value" : "Option2"
}, {
"id" : "007162f1e26ef2ccbbd99fc71223f715",
"value" : "Option3"
} ]
}, {
"id" : "e1852b933a0122481ff5e7bcfd4e66ef",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "711d7beb473096fab147a75762409a86",
"value" : "Option 2"
}, {
"id" : "bef14153c952c214173ed98636634d37",
"value" : "Option 3"
}, {
"id" : "1a0de28de9f6adabcb7f781233998693",
"value" : "Create New Option"
}, {
"id" : "00e4d991e8dfb3b25d68860f4ffcc40a",
"value" : "Update New Option"
} ]
}, {
"id" : "477922a5bf66e70a4eee45436c8a1795",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "c1384f5cda4987de13adc7c01d821443",
"value" : "Option 1"
}, {
"id" : "d50c185294ad5218c036375419c78dbc",
"value" : "Option 2"
}, {
"id" : "d5c3d6d6dc0e2f4fb00b94cd097a4621",
"value" : "Option 3"
} ]
}, {
"id" : "f1bebbbfc28b26fb87ea0111086c2dcc",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "53c46210ad0cfa2cc53e8a19102816e0",
"value" : "Option 1"
}, {
"id" : "4103ca8c3b618eeee78691a1ecf77a51",
"value" : "Option 2"
}, {
"id" : "db9825d0e018f96a66b1700c8a11e93a",
"value" : "Option 3"
} ]
}, {
"id" : "802ac30bd665c3cc22e8a61005f78513",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "ef497664d56682283084c84355ee1ca8",
"value" : "Option 1"
}, {
"id" : "ac90eae46b54fe6f4cb8fee035241ccc",
"value" : "Option 2"
}, {
"id" : "59683e14785e0b55870768871a979088",
"value" : "Option 3"
} ]
}, {
"id" : "811a6c041f4acd41ff69c34430c0d9db",
"name" : "Parent Name",
"type" : "text"
}, {
"id" : "488f606559614c90447dd472af9c876f",
"name" : "Favorite Food",
"type" : "text"
}, {
"id" : "cb86b0f9c6589d964839c5372756b2c5",
"name" : "Favorite Food",
"type" : "text"
}, {
"id" : "f8f2c579409cba0c176ce4f7a95156a0",
"name" : "Favorite Food",
"type" : "text"
}, {
"id" : "fa5c9b05922cabca82e1ee339591b229",
"name" : "Parent Name",
"type" : "text"
}, {
"id" : "31659c2abb583d9b35d07a909fbef864",
"name" : "New Name",
"type" : "text"
}, {
"id" : "3690a40e2ff92b87c15b099c11a54f3f",
"name" : "Favorite Food",
"type" : "text"
}, {
"id" : "6a9392c3af7877aea86f7ecb67c782c9",
"name" : "Parent Name",
"type" : "text"
}, {
"id" : "f3bab02b830166c1d10672ad7246ae99",
"name" : "Parent Name",
"type" : "text"
}, {
"id" : "f512312735ebab838c4bdc2ffa3b53f4",
"name" : "Favorite Food",
"type" : "text"
} ]
Returns
An array of custom fields. Each entry in the array is a separate custom field object. This request should never return an error.
Update custom field name
Custom fields name can be changed and must be uniq.
PUT /v1/custom-fields/{id}/name
Example request:
$ curl 'https://api.referrizer.com/v1/contacts/custom-fields/31659c2abb583d9b35d07a909fbef864/name' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '"New Name"'
PUT /v1/contacts/custom-fields/31659c2abb583d9b35d07a909fbef864/name HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 10
Host: api.referrizer.com
"New Name"
Example response:
"Name successfully updated to New Name."
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 40
"Name successfully updated to New Name."
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the custom field. |
Returns
Name successfully updated to "New Name".If a custom field with the provided name already exists, the call will return an error.
Update custom field options
Options for custom field single or multi select can be added or update. If user pass object with ID that option if exist will be updated, otherwise options will be created. Option value must be unique and can't be null.
PUT /v1/custom-fields/{id}/option
Example request:
$ curl 'https://api.referrizer.com/v1/contacts/custom-fields/e1852b933a0122481ff5e7bcfd4e66ef/options' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"options" : [ {
"value" : "Create New Option"
}, {
"value" : "Update New Option",
"id" : "00e4d991e8dfb3b25d68860f4ffcc40a"
} ]
}'
PUT /v1/contacts/custom-fields/e1852b933a0122481ff5e7bcfd4e66ef/options HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 149
Host: api.referrizer.com
{
"options" : [ {
"value" : "Create New Option"
}, {
"value" : "Update New Option",
"id" : "00e4d991e8dfb3b25d68860f4ffcc40a"
} ]
}
Example response:
{
"id" : "e1852b933a0122481ff5e7bcfd4e66ef",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "711d7beb473096fab147a75762409a86",
"value" : "Option 2"
}, {
"id" : "bef14153c952c214173ed98636634d37",
"value" : "Option 3"
}, {
"id" : "1a0de28de9f6adabcb7f781233998693",
"value" : "Create New Option"
}, {
"id" : "00e4d991e8dfb3b25d68860f4ffcc40a",
"value" : "Update New Option"
} ]
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 455
{
"id" : "e1852b933a0122481ff5e7bcfd4e66ef",
"name" : "Single Select",
"type" : "single_select",
"options" : [ {
"id" : "711d7beb473096fab147a75762409a86",
"value" : "Option 2"
}, {
"id" : "bef14153c952c214173ed98636634d37",
"value" : "Option 3"
}, {
"id" : "1a0de28de9f6adabcb7f781233998693",
"value" : "Create New Option"
}, {
"id" : "00e4d991e8dfb3b25d68860f4ffcc40a",
"value" : "Update New Option"
} ]
}
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the custom field. |
Request arguments
Argument | Description |
---|---|
value String required |
Value of the custom option field. Can't be null and must be uniq. If passed without ID it will be created new options. |
id String optional |
Unique identifier for option field. If provided option will be updated. |
Returns
An array of custom fields. Each entry in the array is a separate custom field object.If a custom field option with the provided value already exists, the call will return an error.
Update loyalty points
PUT /v1/contacts/{id}/loyalty-points
Example request:
$ curl 'https://api.referrizer.com/v1/contacts/9f596879a36f1d83f5cfd1f156acc20f/loyalty-points' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"pointsValue" : 3
}'
PUT /v1/contacts/9f596879a36f1d83f5cfd1f156acc20f/loyalty-points HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 23
Host: api.referrizer.com
{
"pointsValue" : 3
}
Example response:
{
"message" : "Loyalty points successfully updated.",
"code" : 201
}
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 72
{
"message" : "Loyalty points successfully updated.",
"code" : 201
}
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the contact. |
Request arguments
Argument | Description |
---|---|
pointsValue Number required |
Value which will be added to the total loyalty points value from contact. Can be positive or negative number. Points after transaction can not be less than 0. |
employeePin String optional |
Employee's PIN. It's required if you want to assign someone (employee) to the action. |
note String optional |
An arbitrary string that you can attach to a transaction. |
Returns
Returns status code 201
if the update succeeded.
Visits
Visits can be described as Appointments, Classes or Sessions attended. This will allow the push or pull of information based on attendance or action.
The visit object
Example response:
{
"id" : "95d265b5be92247f9bf58030f18efca6",
"date" : "2021-05-31T20:30:00.000Z",
"points" : 0,
"contactId" : "9d4f787d2a9145c06fd68470ae128688",
"checkinSource" : "Checkin from MBO"
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 194
{
"id" : "95d265b5be92247f9bf58030f18efca6",
"date" : "2021-05-31T20:30:00.000Z",
"points" : 0,
"contactId" : "9d4f787d2a9145c06fd68470ae128688",
"checkinSource" : "Checkin from MBO"
}
Attribute | Description |
---|---|
id String |
Unique identifier for the object. |
date String |
Date of the visit. |
points Number |
Number of earned loyalty points. |
contactId String |
The ID of the contact. |
checkinSource String |
From where. |
Create a visit
POST /v1/visits
Example request:
$ curl 'https://api.referrizer.com/v1/visits' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"contactId" : "f45773f9ce03c6b024757ce73c085dd0"
}'
POST /v1/visits HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 54
Host: api.referrizer.com
{
"contactId" : "f45773f9ce03c6b024757ce73c085dd0"
}
Example response:
{
"id" : "654eacc553c39e0cf4676b5070d51216",
"date" : "2024-11-18T15:51:17.000Z",
"points" : 2,
"contactId" : "f45773f9ce03c6b024757ce73c085dd0",
"checkinSource" : "Checkin from API"
}
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 194
{
"id" : "654eacc553c39e0cf4676b5070d51216",
"date" : "2024-11-18T15:51:17.000Z",
"points" : 2,
"contactId" : "f45773f9ce03c6b024757ce73c085dd0",
"checkinSource" : "Checkin from API"
}
Creates a new visit object.
Request arguments
Argument | Description |
---|---|
contactId String required |
The ID of an existing contact that will get visit in this request. |
points Number optional |
Loyalty points to be earned. If not provided, the number of earned points will depend on your Loyalty settings. |
amountSpent Number optional |
Dollar amount spent connected to Earning Points value. E.g. if $1 is 1pts and when contact spent $25 they will get 25pts. This is related to loyalty settings value 'pointsPerDollar'. |
date String optional |
Date and time of the visit in this request with the format 'YYYY-MM-DDTHH:MM:SS.SSSZ'. E.g. 2022-01-19T16:16:24.000Z. Date must be in the past. If the date is set a notification for the visit will not be sent. |
Returns
Returns a visit object if the call succeeded. If the contact's ID has not been provided, the call will return an error. If a contact with provided ID does not exist, the call will return an error. If the date is set but in the wrong format or in the future the call will return an error.
Create a visits bulk
POST /v1/visits/all
Example request:
$ curl 'https://api.referrizer.com/v1/visits/all' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '[ {
"contactId" : "c56e454b94da6108d0bbdc170ae2e420"
} ]'
POST /v1/visits/all HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 58
Host: api.referrizer.com
[ {
"contactId" : "c56e454b94da6108d0bbdc170ae2e420"
} ]
Example response:
[ {
"id" : "c57987b2eeda422b79ec7bc4e9f5478b",
"date" : "2024-11-18T15:51:22.000Z",
"points" : 2,
"contactId" : "c56e454b94da6108d0bbdc170ae2e420",
"checkinSource" : "Checkin from API"
} ]
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 198
[ {
"id" : "c57987b2eeda422b79ec7bc4e9f5478b",
"date" : "2024-11-18T15:51:22.000Z",
"points" : 2,
"contactId" : "c56e454b94da6108d0bbdc170ae2e420",
"checkinSource" : "Checkin from API"
} ]
Creates a new visits array objects.
Request arguments
Argument | Description |
---|---|
[0].contactId String required |
The ID of an existing contact that will get visit in this request. |
[0].points Number optional |
Loyalty points to be earned. If not provided, the number of earned points will depend on your Loyalty settings. |
[0].amountSpent Number optional |
Dollar amount spent connected to Earning Points value. E.g. if $1 is 1pts and when contact spent $25 they will get 25pts. This is related to loyalty settings value 'pointsPerDollar'. |
[0].date String optional |
Date and time of the visit in this request with the format 'YYYY-MM-DDTHH:MM:SS.SSSZ'. E.g. 2022-01-19T16:16:24.000Z. Date must be in the past. If the date is set a notification for the visit will not be sent. |
Returns
Returns a list of visits objects if the call succeeded. If the contact's ID has not been provided, the call will return empty array list. If a contact with provided ID does not exist, the call will return empty array list.
Retrieve a visit
Retrieves the details of a visit. You only need to supply the unique visit identifier that was returned upon visit creation.
GET /v1/visits/{id}
Example request:
$ curl 'https://api.referrizer.com/v1/visits/95d265b5be92247f9bf58030f18efca6' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/visits/95d265b5be92247f9bf58030f18efca6 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
{
"id" : "95d265b5be92247f9bf58030f18efca6",
"date" : "2021-05-31T20:30:00.000Z",
"points" : 0,
"contactId" : "9d4f787d2a9145c06fd68470ae128688",
"checkinSource" : "Checkin from MBO"
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 194
{
"id" : "95d265b5be92247f9bf58030f18efca6",
"date" : "2021-05-31T20:30:00.000Z",
"points" : 0,
"contactId" : "9d4f787d2a9145c06fd68470ae128688",
"checkinSource" : "Checkin from MBO"
}
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the visit. |
Returns
Returns a visit object if a valid identifier was provided.
List all visits
Returns a list of your visits. The visits are returned sorted by visit date, with the most recent visits appearing first.
GET /v1/visits
Example request:
$ curl 'https://api.referrizer.com/v1/visits?contactId=1f819dece8628a620b2cfbd608106b37' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/visits?contactId=1f819dece8628a620b2cfbd608106b37 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
[ ]
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Total-Count: 2
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 3
[ ]
Request parameters
Parameter | Description |
---|---|
contactId optional |
A filter on the list based on the contact’s ID. |
page optional |
Current page of the collection. Default is 1. |
perPage optional |
Maximum number of items to be returned in result set. Default is 30. |
Returns
An array of up to perPage
visits. Passing an optional contactId
will result in filtering visits only from that contact. Each entry in the array is a separate visit object. If no more visits are available, the resulting array will be empty. This request should never return an error.
Labels
Labels can be described as specific groupings. This will allow Contacts to be filtered together based on titles or tags assigned to them.
The label object
Example response:
{
"id" : "b8012b28d7f692dd5ef74e40f421741e",
"name" : "Win back",
"color" : "RED"
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 89
{
"id" : "b8012b28d7f692dd5ef74e40f421741e",
"name" : "Win back",
"color" : "RED"
}
Attribute | Description |
---|---|
id String |
Unique identifier for the object. |
name String |
Name of the label. |
color String |
Label color. |
Create a label
POST /v1/labels
Example request:
$ curl 'https://api.referrizer.com/v1/labels' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"name" : "Win back",
"color" : "RED"
}'
POST /v1/labels HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 44
Host: api.referrizer.com
{
"name" : "Win back",
"color" : "RED"
}
Example response:
{
"id" : "b8012b28d7f692dd5ef74e40f421741e",
"name" : "Win back",
"color" : "RED"
}
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 89
{
"id" : "b8012b28d7f692dd5ef74e40f421741e",
"name" : "Win back",
"color" : "RED"
}
Creates a new label object.
Request arguments
Argument | Description |
---|---|
name String required |
Name of the label. Must be unique. |
color String optional |
Label color. Possible values are RED, PINK, PURPLE, DEEP_PURPLE, INDIGO, LIGHT_BLUE, CYAN, TEAL, LIME, AMBER, ORANGE, DEEP_ORANGE, BROWN, GREY or BLUE_GREY. Default is GREY. |
Returns
Returns a label object if the call succeeded. If the name has not been provided or a label with the given name already exists, the call will return an error. If a color code does not exist, the call will return an error.
Retrieve a label
Retrieves the details of a label. You only need to supply the unique visit identifier that was returned upon label creation.
GET /v1/labels/{id}
Example request:
$ curl 'https://api.referrizer.com/v1/labels/b8012b28d7f692dd5ef74e40f421741e' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/labels/b8012b28d7f692dd5ef74e40f421741e HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
{
"id" : "b8012b28d7f692dd5ef74e40f421741e",
"name" : "Win back",
"color" : "RED"
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 89
{
"id" : "b8012b28d7f692dd5ef74e40f421741e",
"name" : "Win back",
"color" : "RED"
}
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the label. |
Returns
Returns a label object if a valid identifier was provided.
List all label
Returns a list of your labels.
GET /v1/labels
Example request:
$ curl 'https://api.referrizer.com/v1/labels?perPage=2' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/labels?perPage=2 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
[ {
"id" : "b8012b28d7f692dd5ef74e40f421741e",
"name" : "Win back",
"color" : "RED"
} ]
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Total-Count: 1
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 93
[ {
"id" : "b8012b28d7f692dd5ef74e40f421741e",
"name" : "Win back",
"color" : "RED"
} ]
Request parameters
Parameter | Description |
---|---|
page optional |
Current page of the collection. Default is 1. |
perPage optional |
Maximum number of items to be returned in result set. Default is 30. |
Returns
An array of up to perPage
visits. Each entry in the array is a separate label object. If no more labels are available, the resulting array will be empty. This request should never return an error.
Loyalty rewards
A well-thought-out Loyalty Program helps drive repeat visits and purchase to the business. With the API you can create, retrieve, update and delete your loyalty rewards.
The loyalty reward object
Example response:
{
"id" : "e20f3f82b5f9fd43c458d55c74b2b4b3",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : {
"total" : null,
"perContact" : null
},
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 358
{
"id" : "e20f3f82b5f9fd43c458d55c74b2b4b3",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : {
"total" : null,
"perContact" : null
},
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
}
Attribute | Description |
---|---|
id String |
Unique identifier for the object. |
title String |
Title of the loyalty reward. |
points Number |
Reward's worth in loyalty points. |
quantity.total Number |
Total quantity of the reward. If NULL , there is no limit. |
quantity.perContact Number |
Quantity that represents how many times each contact (customer) can redeem the reward. If NULL , there is no limit. |
available.total Number |
Total available of the reward. If NULL , there is no limit. |
available.perContact Number |
Remaining availability for the contact. Returned only when contactId is provided. If NULL , there is no limit. |
contactId String |
The ID of the contact. |
startDate String |
Start date of loyalty reward. |
expiredDate String |
Expiration date of loyalty reward. |
expires Boolean |
Reward can expire or not |
type String |
Loyalty Reward’s type. Can be ITEM, CASH_DISCOUNT, PERCENT_DISCOUNT. Default is ITEM. |
value Number |
Value represent cash value (x dollars) or percent discount (0-100%). |
itemId String |
This field can be used for 3rd party integrations like POS terminal, online shop, etc. |
itemName String |
This field can be used for 3rd party integrations like POS terminal, online shop, etc. |
Create a loyalty reward
POST /v1/loyalty-rewards
Example request:
$ curl 'https://api.referrizer.com/v1/loyalty-rewards' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"title" : "Burrito",
"points" : 10,
"quantity" : {
"total" : 500
}
}'
POST /v1/loyalty-rewards HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 82
Host: api.referrizer.com
{
"title" : "Burrito",
"points" : 10,
"quantity" : {
"total" : 500
}
}
Example response:
{
"id" : "d6af6fcf62006a9f17ce3066eec0a3b2",
"title" : "Burrito",
"points" : 10,
"quantity" : {
"total" : 500,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : "ITEM",
"value" : null,
"itemId" : null,
"itemName" : null
}
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 318
{
"id" : "d6af6fcf62006a9f17ce3066eec0a3b2",
"title" : "Burrito",
"points" : 10,
"quantity" : {
"total" : 500,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : "ITEM",
"value" : null,
"itemId" : null,
"itemName" : null
}
Creates a new loyalty reward object.
Request arguments
Argument | Description |
---|---|
title String required |
Title of the loyalty reward. |
points Number required |
Reward's worth in loyalty points. |
quantity.total Number optional |
Total quantity of the reward. By default, value will be NULL , i.e. unlimited. |
quantity.perContact Number optional |
Quantity that represents how many times each contact (customer) can redeem the reward. By default, value will be NULL , i.e. unlimited. |
startDate String optional |
Start date of loyalty reward. |
expiredDate String optional |
Expiration date of loyalty reward. |
expires Boolean optional |
Reward can expire or not |
type String optional |
Loyalty Reward’s type. Can be ITEM, CASH_DISCOUNT, PERCENT_DISCOUNT. Default is ITEM. |
value Number optional |
Value represent cash value (x dollars) or percent discount (0-100%). Should be provided if loyalty reward type is CASH_DISCOUNT or PERCENT_DISCOUNT. |
itemId String optional |
This field can be used for 3rd party integrations like POS terminal, online shop, etc. |
itemName String optional |
This field can be used for 3rd party integrations like POS terminal, online shop, etc. |
Returns
Returns a loyalty reward object if the call succeeded.
Retrieve a loyalty reward
Retrieves the details of a loyalty reward. You only need to supply the unique reward identifier that was returned upon reward creation.
GET /v1/loyalty-rewards/{id}
Example request:
$ curl 'https://api.referrizer.com/v1/loyalty-rewards/e20f3f82b5f9fd43c458d55c74b2b4b3' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/loyalty-rewards/e20f3f82b5f9fd43c458d55c74b2b4b3 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
{
"id" : "e20f3f82b5f9fd43c458d55c74b2b4b3",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : {
"total" : null,
"perContact" : null
},
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 358
{
"id" : "e20f3f82b5f9fd43c458d55c74b2b4b3",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : {
"total" : null,
"perContact" : null
},
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
}
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the loyalty reward. |
Request parameters
Parameter | Description |
---|---|
contactId optional |
Loyalty reward availability per contact’s ID. |
Returns
Returns a loyalty reward object if a valid identifier was provided. Passing an optional contactId
will retrieve loyalty reward availability per contact - perContact
Update a loyalty reward
PUT /v1/loyalty-rewards/{id}
Example request:
$ curl 'https://api.referrizer.com/v1/loyalty-rewards/3fd6984c834d00f1a0235242d4446721' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"id" : "3fd6984c834d00f1a0235242d4446721",
"title" : "test",
"points" : 16,
"quantity" : { },
"available" : { },
"expires" : false
}'
PUT /v1/loyalty-rewards/3fd6984c834d00f1a0235242d4446721 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 146
Host: api.referrizer.com
{
"id" : "3fd6984c834d00f1a0235242d4446721",
"title" : "test",
"points" : 16,
"quantity" : { },
"available" : { },
"expires" : false
}
Example response:
{
"id" : "3fd6984c834d00f1a0235242d4446721",
"title" : "test",
"points" : 16,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : "ITEM",
"value" : null,
"itemId" : null,
"itemName" : null
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 316
{
"id" : "3fd6984c834d00f1a0235242d4446721",
"title" : "test",
"points" : 16,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : "ITEM",
"value" : null,
"itemId" : null,
"itemName" : null
}
Updates the specified loyalty reward by setting the values of the parameters passed. Any parameters not provided will be set to null
. The reward's title is not updatable. Note that you can pass the whole object returned from the GET request, non-updatable arguments will be ignored.
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the loyalty reward. |
Request arguments
Argument | Description |
---|---|
points Number required |
Reward's worth in loyalty points. |
quantity.total Number optional |
Total quantity of the reward. By default, value will be NULL , i.e. unlimited. |
quantity.perContact Number optional |
Quantity that represents how many times each contact (customer) can redeem the reward. By default, value will be NULL , i.e. unlimited. |
startDate String optional |
Start date of loyalty reward. |
expiredDate String optional |
Expiration date of loyalty reward. |
expires Boolean optional |
Reward can expire or not |
type String optional |
Loyalty Reward’s type. Can be ITEM, CASH_DISCOUNT, PERCENT_DISCOUNT. Default is ITEM. |
value Number optional |
Value represent cash value (x dollars) or percent discount (0-100%). Should be provided if loyalty reward type is CASH_DISCOUNT or PERCENT_DISCOUNT. |
itemId String optional |
This field can be used for 3rd party integrations like POS terminal, online shop, etc. |
itemName String optional |
This field can be used for 3rd party integrations like POS terminal, online shop, etc. |
Returns
Returns the loyalty reward object if the update succeeded. Returns an error if update parameters are invalid (e.g. negative points
value).
Delete a loyalty reward
Permanently deletes a loyalty reward. It cannot be undone.
DELETE /v1/loyalty-rewards/{id}
Example request:
$ curl 'https://api.referrizer.com/v1/loyalty-rewards/03a33150f390a16d4287a5e4921d581e' -i -X DELETE \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
DELETE /v1/loyalty-rewards/03a33150f390a16d4287a5e4921d581e HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
{
"id" : "03a33150f390a16d4287a5e4921d581e",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 313
{
"id" : "03a33150f390a16d4287a5e4921d581e",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
}
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the loyalty reward. |
Returns
Returns a deleted object. If the loyalty reward ID does not exist, this call returns an error.
List all loyalty reward
Returns a list of your loyalty reward. The rewards are returned sorted by loyalty points, with the smaller rewards appearing first.
GET /v1/loyalty-rewards
Example request:
$ curl 'https://api.referrizer.com/v1/loyalty-rewards?perPage=2' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/loyalty-rewards?perPage=2 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
[ {
"id" : "046b5408d380e0562e9d32cf1596573f",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
}, {
"id" : "574ccbc5b44be8adef5c83a5207a3df6",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
} ]
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Total-Count: 10
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 632
[ {
"id" : "046b5408d380e0562e9d32cf1596573f",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
}, {
"id" : "574ccbc5b44be8adef5c83a5207a3df6",
"title" : "test",
"points" : 1,
"quantity" : {
"total" : null,
"perContact" : null
},
"available" : null,
"startDate" : null,
"expiredDate" : null,
"expires" : false,
"type" : null,
"value" : null,
"itemId" : null,
"itemName" : null
} ]
Request parameters
Parameter | Description |
---|---|
page optional |
Current page of the collection. Default is 1. |
perPage optional |
Maximum number of items to be returned in result set. Default is 30. |
Returns
An array of up to perPage
rewards. Each entry in the array is a separate loyalty reward object. If no more rewards are available, the resulting array will be empty. This request should never return an error.
Redeem a loyalty reward
POST /v1/loyalty-rewards/{id}/redeem
Example request:
$ curl 'https://api.referrizer.com/v1/loyalty-rewards/257558bd775df708b8cc18e342db5a15/redeem' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"contactId" : "b16ef693d51f1c964741b0da9116602e",
"pin" : "0000"
}'
POST /v1/loyalty-rewards/257558bd775df708b8cc18e342db5a15/redeem HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 72
Host: api.referrizer.com
{
"contactId" : "b16ef693d51f1c964741b0da9116602e",
"pin" : "0000"
}
Example response:
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Path parameters
Parameter | Description |
---|---|
id | Unique identifier for the loyalty reward. |
Request arguments
Argument | Description |
---|---|
contactId String required |
The ID of an existing contact that will redeem reward. |
pin String optional |
Employee's PIN. It's required if you set it so in Loyalty Settings. |
note String optional |
An arbitrary string that you can attach to a transaction. |
Returns
Returns status code 204
if the redemption succeeded.
List all redeemed loyalty rewards
Returns a list of all redeemed loyalty rewards. If loyaltyRewardId
is provided then the result is a filtered list of redeems only for the specific loyalty reward.
GET /v1/loyalty-rewards/redeems
Example request:
$ curl 'https://api.referrizer.com/v1/loyalty-rewards/redeems?perPage=2' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/loyalty-rewards/redeems?perPage=2 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
[ {
"loyaltyRewardId" : "257558bd775df708b8cc18e342db5a15",
"contactId" : "b16ef693d51f1c964741b0da9116602e",
"points" : 1,
"date" : "2024-11-18T15:52:07.108Z",
"employeeId" : "54827d7aefd33e3a10366d38219d73b6",
"note" : null
} ]
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Total-Count: 1
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 241
[ {
"loyaltyRewardId" : "257558bd775df708b8cc18e342db5a15",
"contactId" : "b16ef693d51f1c964741b0da9116602e",
"points" : 1,
"date" : "2024-11-18T15:52:07.108Z",
"employeeId" : "54827d7aefd33e3a10366d38219d73b6",
"note" : null
} ]
Request parameters
Parameter | Description |
---|---|
loyaltyRewardId optional |
If provided returns filtered list of redeems only for specific loyalty reward, if not provided returns all redeemed loyalty rewards for given account. |
contactId optional |
If provided returns filtered list of redeems only for specific contact, if not provided returns all redeemed loyalty rewards for given account. |
page optional |
Current page of the collection. Default is 1. |
perPage optional |
Maximum number of items to be returned in result set. Default is 30. |
Returns
An array of up to perPage
redeems. Each entry in the array is a separate loyalty transaction object - redeem.
Loyalty settings
With our advanced Loyalty Program, your customers are not just motivated to visit repeatedly, but they are also incentivized to share on social media and post reviews. With the API you can retrieve and update your loyalty settings.
The loyalty settings object
Example response:
{
"checkin" : 2,
"share" : 3,
"review" : 5,
"pointsPerDollar" : 100.0
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 79
{
"checkin" : 2,
"share" : 3,
"review" : 5,
"pointsPerDollar" : 100.0
}
Attribute | Description |
---|---|
checkin Number |
Points for check-in (every visit). |
share Number |
Points for sharing on social media. |
review Number |
Points for posting a review. |
pointsPerDollar Number |
Points per dollar spent in your business. This requires 3rd party integration. |
Retrieve loyalty settings
Returns a loyalty program setup object which represents award points for each customer action.
GET /v1/loyalty-rewards/loyalty-settings
Example request:
$ curl 'https://api.referrizer.com/v1/loyalty-rewards/loyalty-settings' -i -X GET \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json'
GET /v1/loyalty-rewards/loyalty-settings HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Host: api.referrizer.com
Example response:
{
"checkin" : 2,
"share" : 3,
"review" : 5,
"pointsPerDollar" : 100.0
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 79
{
"checkin" : 2,
"share" : 3,
"review" : 5,
"pointsPerDollar" : 100.0
}
Update loyalty settings
Updates the loyalty setup by setting the values of the parameters passed. Any parameters not provided will be ignored.
PUT /v1/loyalty-rewards/loyalty-settings
Example request:
$ curl 'https://api.referrizer.com/v1/loyalty-rewards/loyalty-settings' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA' \
-H 'Accept: application/json' \
-d '{
"checkin" : 2,
"share" : 3,
"review" : 5,
"pointsPerDollar" : 100.0
}'
PUT /v1/loyalty-rewards/loyalty-settings HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNTUxYmE3NzM0ZjdiMzkwOWZkZmY1ZmI4NjUwMGE3YiIsImV4cCI6NDg4NTUyNzA3NH0.fVSz_CaLohAk0VBYc8oZi8Ks2-9ESaaAVdRiRZzw3OcsLdfuAmBFU-aYvNX6END2iDsC_Mi8KgsPh83jga46hA
Accept: application/json
Content-Length: 79
Host: api.referrizer.com
{
"checkin" : 2,
"share" : 3,
"review" : 5,
"pointsPerDollar" : 100.0
}
Example response:
{
"checkin" : 2,
"share" : 3,
"review" : 5,
"pointsPerDollar" : 100.0
}
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 79
{
"checkin" : 2,
"share" : 3,
"review" : 5,
"pointsPerDollar" : 100.0
}
Request arguments
Argument | Description |
---|---|
checkin Number optional |
Points for check-in (every visit). |
share Number optional |
Points for sharing on social media. |
review Number optional |
Points for posting a review. |
pointsPerDollar Number optional |
Points per dollar spent in your business. This requires 3rd party integration. |
Returns
Returns the updated loyalty setup object.