Sitoo CRM SPI
Search Customer
get /customersFind a customer in the CRM database. Note! There is also a lookup endpoint which is used to make a lookup in an external database
Key to search for
Type of field to search for
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
Returns a list of customers. Should be one customer or empty list if no customer is found.
[ { "customer_id": "a26d8975-3b86-43c0-9b12-a86401074770", "member_number": "10012", "email": "john.doe@example.com", "name_first": "John", "name_last": "Doe", "mobile": "+46701112233", "invoice_address": { "address": "Street", "city": "City", "zip": "12345", "country_id": "SE" }, "gender": "male", "accepts_communication": [ "email", "mail", "sms" ], "consents": [ "consent_personal_offers" ], "additional_options": [ { "id": "fav-nhl-team", "enum_values": [ "toronto-maple-leafs" ] }, { "id": "fav-mlb-team", "enum_values": [ "seattle-mariners" ] } ], "status": { "color": "green", "text": "" }, "promotions": [ { "name": "10% Off", "promotion_id": "d65804be-1941-4a5b-851a-abd000bfc8bc", "promotion_type": { "type": "cart_percent", "value_int": 10 }, "redeemed": false } ], "bonus_checks": [], "voucher_passwords": [ "member_pricelist" ], "store_id_home": "200", "sections": [ { "title": "Customer Info", "values": [ { "text": "2451", "title": "Bonus Points", "type": "text" } ] } ] }]
HTTP Status Code Summary | |
---|---|
200 | Returns a list of customers. Should be one customer or empty list if no customer is found. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Add Customer
post /customersAdd a new customer.
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
Customer object
{ "member_number": "10012", "email": "john.doe@example.com", "name_first": "John", "name_last": "Doe", "mobile": "+46701112233", "invoice_address": { "address": "Street", "city": "City", "zip": "12345", "country_id": "SE" }, "gender": "male", "accepts_communication": [ "email", "mail", "sms" ], "consents": [], "additional_options": [ { "id": "fav-nhl-team", "enum_values": [ "toronto-maple-leafs" ] }, { "id": "fav-mlb-team", "enum_values": [ "seattle-mariners" ] } ], "status": { "color": "green", "text": "" }, "promotions": [ { "name": "10% Off", "promotion_id": "d65804be-1941-4a5b-851a-abd000bfc8bc", "promotion_type": { "type": "cart_percent", "value_int": 10 }, "redeemed": false } ], "bonus_checks": [], "voucher_passwords": [ "member_pricelist" ], "store_id_home": "200", "sections": [ { "title": "Customer Info", "values": [ { "text": "2451", "title": "Bonus Points", "type": "text" } ] } ]}
{ "customer_id": "a26d8975-3b86-43c0-9b12-a86401074770", "member_number": "10012", "email": "john.doe@example.com", "name_first": "John", "name_last": "Doe", "mobile": "+46701112233", "invoice_address": { "address": "Street", "city": "City", "zip": "12345", "country_id": "SE" }, "gender": "male", "accepts_communication": [ "email", "mail", "sms" ], "consents": [], "additional_options": [ { "id": "fav-nhl-team", "enum_values": [ "toronto-maple-leafs" ] }, { "id": "fav-mlb-team", "enum_values": [ "seattle-mariners" ] } ], "status": { "color": "green", "text": "" }, "promotions": [ { "name": "10% Off", "promotion_id": "d65804be-1941-4a5b-851a-abd000bfc8bc", "promotion_type": { "type": "cart_percent", "value_int": 10 }, "redeemed": false } ], "bonus_checks": [], "voucher_passwords": [ "member_pricelist" ], "store_id_home": "200", "sections": [ { "title": "Customer Info", "values": [ { "text": "2451", "title": "Bonus Points", "type": "text" } ] } ]}
HTTP Status Code Summary | |
---|---|
201 | Customer added OK. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Update Customer
put /customers/{customer_id}Update customer with new data.
ID of the customer
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
Customer object
{ "customer_id": "a26d8975-3b86-43c0-9b12-a86401074770", "member_number": "10012", "email": "john.doe@example.com", "name_first": "John", "name_last": "Doe", "mobile": "+46701112233", "invoice_address": { "address": "Street", "city": "City", "zip": "12345", "country_id": "SE" }, "gender": "male", "accepts_communication": [ "email", "mail", "sms" ], "consents": [ "consent_personal_offers" ], "additional_options": [ { "id": "fav-nhl-team", "enum_values": [ "toronto-maple-leafs" ] }, { "id": "fav-mlb-team", "enum_values": [ "seattle-mariners" ] } ]}
{ "customer_id": "a26d8975-3b86-43c0-9b12-a86401074770", "member_number": "10012", "email": "john.doe@example.com", "name_first": "John", "name_last": "Doe", "mobile": "+46701112233", "invoice_address": { "address": "Street", "city": "City", "zip": "12345", "country_id": "SE" }, "gender": "male", "accepts_communication": [ "email", "mail", "sms" ], "consents": [ "consent_personal_offers" ], "status": { "color": "green", "text": "" }, "additional_options": [ { "id": "fav-nhl-team", "enum_values": [ "toronto-maple-leafs" ] }, { "id": "fav-mlb-team", "enum_values": [ "seattle-mariners" ] } ], "promotions": [ { "name": "10% Off", "promotion_id": "d65804be-1941-4a5b-851a-abd000bfc8bc", "promotion_type": { "type": "cart_percent", "value_int": 10 }, "redeemed": false } ], "bonus_checks": [], "voucher_passwords": [ "member_pricelist" ], "store_id_home": "200", "sections": [ { "title": "Customer Info", "values": [ { "text": "2451", "title": "Bonus Points", "type": "text" } ] } ]}
HTTP Status Code Summary | |
---|---|
200 | Customer updated OK. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Get Customer
get /customers/{customer_id}Get a customer by the customer ID.
ID of the customer
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
{ "customer_id": "a26d8975-3b86-43c0-9b12-a86401074770", "member_number": "10012", "email": "john.doe@example.com", "name_first": "John", "name_last": "Doe", "mobile": "+46701112233", "invoice_address": { "address": "Street", "city": "City", "zip": "12345", "country_id": "SE" }, "gender": "male", "accepts_communication": [ "email", "mail", "sms" ], "consents": [ "consent_personal_offers" ], "additional_options": [ { "id": "fav-nhl-team", "enum_values": [ "toronto-maple-leafs" ] }, { "id": "fav-mlb-team", "enum_values": [ "seattle-mariners" ] } ], "status": { "color": "green", "text": "" }, "promotions": [ { "name": "10% Off", "promotion_id": "d65804be-1941-4a5b-851a-abd000bfc8bc", "promotion_type": { "type": "cart_percent", "value_int": 10 }, "redeemed": false } ], "bonus_checks": [], "voucher_passwords": [ "member_pricelist" ], "store_id_home": "200", "sections": [ { "title": "Customer Info", "values": [ { "text": "2451", "title": "Bonus Points", "type": "text" } ] } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns a customer. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Get Transactions
get /customers/{customer_id}/transactionsGet a list of transactions for the customer.
ID of the customer
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
[ { "date_created": 1637239675, "order_id": 10051, "store_id": "200", "store_name": "Concept Store", "currency_code": "SEK", "items": [ { "discounts": [], "product_name": "Deco Coat B/W", "quantity": 1, "sku": "597330-S", "total": "490.00", "vat": "98.00", "vat_value": 25 } ], "payments": [ { "name": "Cash", "total": "490.00" } ] }]
HTTP Status Code Summary | |
---|---|
200 | Returns a list of transactions for the customer. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Redeem Items
post /customers/{customer_id}/redeemRedeem bonus checks or promotions. Note that this must redeem all items to be successful otherwise no items should be redeemed and status code 409 Can't redeem should be returned.
ID of the customer
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
Redeem object
A redeem object where all items in it were successfully redeemed and with the `redeem_id` property set with the value used to undo a redeem.
{ "bonus_checks": [], "promotions": [ "d65804be-1941-4a5b-851a-abd000bfc8bc" ]}
{ "redeem_id": "64DCDD6D716EA0F470734356665E5730", "bonus_checks": [], "promotions": [ "d65804be-1941-4a5b-851a-abd000bfc8bc" ]}
HTTP Status Code Summary | |
---|---|
200 | A redeem object where all items in it were successfully redeemed and with the `redeem_id` property set with the value used to undo a redeem. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
409 | Can't redeem items. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Undo Redeem Items
delete /customers/{customer_id}/redeem/{redeem_id}Undo a previous redeem operation. All items previously redeemed should be undone.
ID of the customer
The redeem id returned from the redeem. Used to make the rollback.
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
HTTP Status Code Summary | |
---|---|
200 | Successfully undone previously redeemed items. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
409 | Can't undo redeem. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Get Consents
get /consentsGet a list of consents that the customer can agree to, upon registration.
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
[ { "consent_id": "consent_personal_offers", "description": "", "name": "Accepts Personal Offers", "value": false }]
HTTP Status Code Summary | |
---|---|
200 | Returns a list of consents. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Get Additional Options
get /additional-optionsGet a list of sections with additional options that can be configured for the customer.
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
[ { "name": "Favorite Teams", "options": [ { "id": "fav-nhl-team", "name": "NHL", "required": true, "type": "enum-single", "enum_options": [ { "id": "new-york-rangers", "name": "New York Rangers" }, { "id": "toronto-maple-leafs", "name": "Toronto Maple Leafs" } ] }, { "id": "fav-mlb-team", "name": "MLB", "type": "enum-single", "enum_options": [ { "id": "seattle-mariners", "name": "Seattle Mariners" }, { "id": "texas-rangers", "name": "Texas Rangers" } ] } ] }]
HTTP Status Code Summary | |
---|---|
200 | Returns a list of sections with additional options. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Lookup Customer
get /lookup_customersLookup a customer in a global database (not part of the CRM). This can be used when creating a new customer for the CRM.
Key to search for
Type of field to search for
ID of the store (Sitoo clients will send the externalid
property of the store object in Sitoo)
ID of the staff (Sitoo clients will send the externalid
property of the user object in Sitoo)
ID of the register
Returns a list of customers. Should be one customer or empty if no customer is found.
[ { "email": "john.doe@example.com", "name_first": "John", "name_last": "Doe", "mobile": "+46701112233", "invoice_address": { "address": "Street", "city": "City", "zip": "12345", "country_id": "SE" } }]
HTTP Status Code Summary | |
---|---|
200 | Returns a list of customers. Should be one customer or empty if no customer is found. |
400 | Bad Request. Invalid input or other client request error. |
401 | Unauthorized. Authentication is required. |
403 | Forbidden. The client does not have sufficient access rights. |
404 | Not Found. The specified resource was not found. |
429 | Too Many Requests. A request limit has been reached. |
500 | Internal Server Error. An internal error has occurred on the server. |
501 | Not implemented. This request is not implemented. |
502 | Bad Gateway. The request can't be handled by the server. |
503 | Service Unavailable. The service requested is unavailable. |
504 | Gateway Timeout. The server did not respond in time. |
Objects
AdditionalOptionsSectionobject
The name of the section
The array of additional options for the section
AdditionalOptionobject
The ID of the option
The name of the option
The type of option enum-single
An enumerated list of options with possibility to select one value enum-multi
An enumerated list of options with possibility to select multiple values * text
A text field to enter information in
VALUES |
---|
enum-single |
enum-multi |
text |
A bool indicating if the option should be required when adding or editing a customer
The array of possible enumerated values for this option (used for types enum-single
and enum-multi
)
AdditionalOptionEnumValueobject
The ID of the enum option value
The name of the enum option value
Addressobject
Name for the address. Usually the name of the recipient.
The address line 1.
The address line 2.
Zip for the address.
City for the address.
State/Region for the address.
Country id for the address (ISO 3166-1 Alpha2 uppercase)
BonusCheckobject
ID of the bonus check.
Name displayed for the bonus check.
Description of the bonus check.
The amount value of the bonus check.
Boolean value indicating if the bonus check has been redeemed.
Timestamp indicating when the bonus check was redeemed.
CommunicationTypestring
Option for way of communication
email
E-mailsms
SMS (Short Text Message)mail
Mail
Consentobject
ID of the consent.
Name displayed for the consent.
Description of the consent.
Value indicating if the default value when adding a new customer should be to accept the consent or not.
Customerobject
ID of the customer. Created by the CRM. Required in GET.
Member Number for the customer. (This field is used to represent the customer on purchase receipts)
Email for the customer.
First Name of the customer.
Last Name of the customer.
Social Security Number (SSN) for the customer.
Company for the customer.
Company ID for the customer.
Phone Number for the customer. (E.164 format)
Mobile Phone number for the customer. (E.164 format)
The invoice address.
The delivery address.
The gender of the customer
Date of birth for the customer in ISO 8601 format (YYYY-MM-DD). Note Do not include time for the birthday.
Accepted ways of communicating with customer.
Array of ID:s for consents that have been accepted by the customer
An array of additional option values for the customer. Used with the "Get Additional Options" endpoint
Status for the customer
Promotions for this customer.
Bonus checks for this customer.
Passwords for unlocking vouchers for this customer.
ID for the home store of the customer. Read only except for POST. Will be matched against externalid on Store in Sitoo.
Additional sections that the CRM can display for the customer.
CustomerAdditionalOptionobject
The ID of the additional option that the value is for
An array of IDs for selected enum values used for an additional option of type enum-single
and enum-multi
The text stored for an additional option of type text
CustomerSectionobject
Title of the section
Fields that will be shown for this section.
CustomerSectionValueMoneyobject
VALUES |
---|
money |
Title of the field.
The money value to display for the field.
CustomerSectionValueTextobject
VALUES |
---|
text |
Title of the field.
Text value.
CustomerStatusobject
The color to display for the status field.
Status text for the customer.
CustomerStatusColorstring
Color used to indicate status for the customer
red
Redorange
Orangegreen
Green
DecimalQuantitystring
Errorobject
Text describing the error.
A status code for the error.
Genderstring
Gender of the customer
male
Malefemale
Femaleundisclosed
Undisclosed
Moneystring
Promotionobject
ID of the promotion.
The type of promotion
Name of the promotion.
Description of the promotion.
Value indicating if the promotion has been redeemed.
Timestamp indicating when the promotion was redeemed
PromotionCartAmountobject
The type of this promotion.
VALUES |
---|
cart_amount |
Cart amount to discount.
PromotionCartPercentobject
The type of this promotion.
VALUES |
---|
cart_percent |
Percent to discount.
PromotionManualobject
ID of the promotion.
VALUES |
---|
manual |
PromotionOfferobject
The type of promotion.
VALUES |
---|
offer |
Voucher password that can enabled campaigns that already exist in the Sitoo Platform.
Redeemobject
ID of the redeem. Can be used if a rollback is needed.
Array of bonus_check_id
Array of promotion_id
SearchKeyTypestring
Search key type
personal_id
Personal IDmobile
Mobile Phone Numberemail
E-mailmember_number
Member Numbercompany_id
Company ID
Transactionobject
Timestamp for when the transaction was created.
Sitoo Receipt ID for the transaction. (If set, then can be used to perform refund in Sitoo POS)
Sitoo Order ID for the transaction. (If set, then can be used to perform refund in Sitoo POS)
Sitoo Order External ID for the transaction. (If set, then can be used to perform refund in Sitoo POS)
Store ID for transaction. (If set, it can be matched against externalid on Store in Sitoo)
Store Name for the transaction.
Currency used for transaction (3-letter ISO 4217).
Roundoff for the transaction.
Items in transaction.
Payments for transaction.
TransactionItemobject
Stock Keeping Unit (SKU) for transaction item.
Title row 1 for transaction item.
Title row 2 for transaction item.
Quantity for transaction item.
Total amount for item incl VAT (before applying manual discount and discounts)
VAT amount for total
Manual discount for this item incl VAT
VAT amount for manual discount
Name provided for manual discount
VAT percentage for transaction item.
Note for transaction item.
Unit quantity (How much that is included in each unit).
Label for unit of transaction item. (e.g. kg)
Discounts for transaction item