Contacts
Add Contact
post /contactsUsed for adding a new contact to the external CRM.
{ "email": "", "membernumber": "", "namefirst": "Steve", "namelast": "Johnson", "personalid": "", "company": "", "companyid": "", "phone": "", "mobile": "+11223334455", "invoice_address": "", "invoice_address2": "", "invoice_zip": "", "invoice_city": "", "invoice_state": "", "invoice_countryid": "", "delivery_address": "", "delivery_address2": "", "delivery_zip": "", "delivery_city": "", "delivery_state": "", "delivery_countryid": "", "gender": "male", "birthday": "1986-05-15T00:00:00Z", "accepts_email": true, "accepts_sms": true, "accepts_mail": true, "acceptedconsents": [ "1", "2" ]}
""255934461""
HTTP Status Code Summary | |
---|---|
200 | Returns contactid |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
500 | Internal Server Error. |
Find Contact
get /contactsUsed for finding a contact in the external CRM. See CrmContact for fields.
Key for filtering an exact match of a contact. The response array should contain exactly one contact if key is found or an empty if key is not found.
Boolean indicating if extended fields for contact should be included in response.
Returns an array with 1 item of type CrmContact or an empty array if no contact could be found for the key provided.
[ { "contactid": "123456789", "email": "laura.smith@example.com", "membernumber": "12345", "namefirst": "Laura", "namelast": "Smith", "personalid": "", "company": "", "companyid": "", "phone": "", "mobile": "", "invoice_address": "10 Main St.", "invoice_address2": "", "invoice_zip": "", "invoice_city": "Townsville", "invoice_state": "", "invoice_countryid": "", "delivery_address": "", "delivery_address2": "", "delivery_zip": "", "delivery_city": "", "delivery_state": "", "delivery_countryid": "", "gender": "female", "birthday": "1986-05-15T00:00:00Z", "accepts_email": true, "accepts_sms": true, "accepts_mail": true, "acceptedconsents": [ "1", "2" ], "voucherpasswords": [], "storeexternalid": null }]
HTTP Status Code Summary | |
---|---|
200 | Returns an array with 1 item of type CrmContact or an empty array if no contact could be found for the key provided. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
500 | Internal Server Error. |
Get Contact
get /contacts/{contactid}Used for getting a contact from the external CRM using contactid (primary key).
Boolean indicating if extended fields for contact should be included in response.
{ "contactid": "123456789", "email": "laura.smith@example.com", "membernumber": "12345", "namefirst": "Laura", "namelast": "Smith", "personalid": "", "company": "", "companyid": "", "phone": "", "mobile": "", "invoice_address": "10 Main St.", "invoice_address2": "", "invoice_zip": "", "invoice_city": "Townsville", "invoice_state": "", "invoice_countryid": "", "delivery_address": "", "delivery_address2": "", "delivery_zip": "", "delivery_city": "", "delivery_state": "", "delivery_countryid": "", "gender": "female", "birthday": "1986-05-15T00:00:00Z", "accepts_email": true, "accepts_sms": true, "accepts_mail": true, "acceptedconsents": [ "1", "2" ], "status_color": "orange", "status_text": "Phone number not registered.", "promotions": [ { "promotionid": "1", "promotiontype": { "type": "manual" }, "name": "Promotion", "description": "Promotional giveaway for members", "redeemed": false, "dateredeemed": null }, { "promotionid": "2", "promotiontype": { "type": "cart_percent", "value_int": 50 }, "name": "50% Discount", "description": "50 percent off during spring sale", "redeemed": false, "dateredeemed": null }, { "promotionid": "3", "promotiontype": { "type": "cart_amount", "value_money": "200.00" }, "name": "200 Discount", "description": "200 off for our valued members", "redeemed": false, "dateredeemed": null }, { "promotionid": "4", "promotiontype": { "type": "offer", "value_string": "SPRINGDISCOUNT" }, "name": "Spring Offer", "description": "Spring offer for new members", "redeemed": false, "dateredeemed": null } ], "bonuschecks": [ { "bonuscheckid": "1", "name": "Bonus Check", "description": "", "cartamount": "100.00", "redeemed": false, "dateredeemed": null } ], "transactions": [ { "transactionid": "123456789", "receiptid": "ST01CH010000100112345", "orderid": 112233, "orderexternalid": null, "datecreated": 1525767472, "storeid": "999", "storename": "Sitoo Concept Store", "items": [ { "itemid": "1", "sku": "7768-01", "productname": "Box", "productname2": null, "note": "", "productgroupname": "Standard", "brand": "", "custom1": null, "custom2": null, "custom3": null, "custom4": null, "custom5": null, "vatvalue": 25, "total": "200.00", "vat": "40.00", "manual_discount": "0.00", "manual_discountvat": "0.00", "manual_discountname": null, "quantity": 2, "unitsize": null, "unitlabel": null, "discounts": [ { "name": "40% discount", "total": "80.00", "vat": "16.00", "discountid": "1010", "discountcode": "PRO123" } ] }, { "itemid": "2", "sku": "6449-01", "productname": "Envelope", "productname2": null, "note": "", "productgroupname": "Standard", "brand": "", "custom1": null, "custom2": null, "custom3": null, "custom4": null, "custom5": null, "vatvalue": 25, "total": "500.00", "vat": "100.00", "manual_discount": "0.00", "manual_discountvat": "0.00", "manual_discountname": null, "quantity": 1, "unitsize": null, "unitlabel": null, "discounts": [] } ], "payments": [ { "paymentid": "1", "name": "Card", "total": "620.00" } ], "redeemedbonuschecks": null, "redeemedpromotions": null, "currencycode": "USD" } ], "voucherpasswords": [], "storeexternalid": null}
HTTP Status Code Summary | |
---|---|
200 | Returns a CrmContact. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
500 | Internal Server Error. |
Update Contact
put /contacts/{contactid}Used for updating an existing contact in the external CRM.
{ "email": "laura.smith@example.com", "membernumber": "", "namefirst": "Laura", "namelast": "Smith", "personalid": "", "company": "", "companyid": "", "phone": "", "mobile": "+22334445566", "invoice_address": "", "invoice_address2": "", "invoice_zip": "", "invoice_city": "", "invoice_state": "", "invoice_countryid": "", "delivery_address": "", "delivery_address2": "", "delivery_zip": "", "delivery_city": "", "delivery_state": "", "delivery_countryid": "", "gender": "male", "birthday": "1986-05-15T00:00:00Z", "accepts_email": true, "accepts_sms": true, "accepts_mail": true, "acceptedconsents": [ "1", "2" ]}
HTTP Status Code Summary | |
---|---|
200 | |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
500 | Internal Server Error. |
Add Transaction
post /contacts/{contactid}/transactionsUsed for registering a transaction for an existing contact in the external CRM. NOTE! It is possible for the same transaction to be sent more than once, so the endpoint needs to handle that case.
{ "receiptid": "ST01CH010000100112345", "orderid": 112233, "datecreated": 1526386290, "storeid": "1", "storename": "Sitoo Concept Store", "storeexternalid": "999", "posid": "ST01CH0100001001", "items": [ { "itemid": "1", "sku": "7768-01", "productname": "Box", "productgroupname": "Standard", "vatvalue": 25, "total": "200.00", "vat": "40.00", "manual_discount": "0.00", "manual_discountvat": "0.00", "manual_discountname": null, "quantity": 2, "discounts": [ { "discountcode": "MEMBER", "discountid": "1010", "name": "40% discount", "total": "80.00", "vat": "16.00" } ] }, { "itemid": "2", "sku": "6449-01", "productname": "Envelope", "productgroupname": "Standard", "vatvalue": 25, "total": "50.00", "vat": "10.00", "manual_discount": "0.00", "manual_discountvat": "0.00", "manual_discountname": null, "quantity": 1, "discounts": [] } ], "payments": [ { "paymentid": "1", "name": "Card", "total": "170.00" } ], "redeemedpromotions": [ "1" ], "currencycode": "USD"}
""517475574""
HTTP Status Code Summary | |
---|---|
200 | Returns transactionid |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
500 | Internal Server Error. |
Objects
crmbonuscheckobject
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
Optional. Timestamp indicating when the bonus check was redeemed
crmcontactobject
ID of the contact.
Member Number for the contact. (This field is used to represent the customer on purchase receipts)
Email for the contact.
First Name of the contact.
Last Name of the contact.
Social Security Number (SSN) for the contact.
Company for the contact.
Company ID for the contact.
Phone Number for the contact.
Mobile Phone number for the contact.
Address for the contact (invoice).
Address line 2 for the contact (invoice).
Zip Code for the contact (invoice).
City for the contact (invoice).
State/Region for the contact (invoice).
2 character country code according to ISO 3166-1 standard for the contact (invoice).
Address for the contact (delivery).
Address line 2 for the contact (delivery).
Zip Code for the contact (delivery).
City for the contact (delivery).
State/Region for the contact (delivery).
2 character country code according to ISO 3166-1 standard for the contact (delivery).
Optional. Enumerated value for gender of the contact.
Optional. Date of birth for the contact in ISO 8601 format.
Boolean value indicating if contact accepts communication via email.
Boolean value indicating if contact accepts communication via text messaging (SMS).
Boolean value indicating if contact accepts communication via postal service.
Array of accepted consents (consentid) for the contact.
Extended. Optional. Enumerated value indicating status color for the contact.
Extended. Optional. Status Text for the contact.
Extended. Optional. Array of CrmPromotion for the contact.
Extended. Optional. Array of CrmBonusCheck for the contact.
Extended. Optional. Array of CrmTransaction for the contact.
Optional. Associated voucher passwords, used to activate campaigns for contact in Sitoo POS.
Optional. Store External ID from where the contact was created.
crmpromotionobject
ID of the promotion.
Enumerated value for type of promotion.
Name of the promotion.
Description of the promotion.
Boolean value indicating if the promotion has been redeemed
Optional. Timestamp indicating when the promotion was redeemed
crmtransactionobject
ID of the transaction.
Optional. Sitoo Receipt ID for the transaction. (If set, then can be used to perform refund in Sitoo POS)
Optional. Sitoo Order ID for the transaction. (If set, then can be used to perform refund in Sitoo POS)
Optional. Sitoo Order External ID for the transaction. (If set, then can be used to perform refund in Sitoo POS)
Timestamp for when the transaction was created.
Store ID for the transaction.
Store Name for the transaction.
Optional. Store External ID for the transaction.
Optional. POS ID for the transaction.
Optional. Round Off for the transaction.
Items in this transaction. Array of CrmTransactionItem.
Payments for this transaction. Array of CrmTransactionPayment.
Optional. Array with ID for promotions used in this transaction.
Optional. Array with ID for bonus checks used in this transaction.
Optional. Currency used for this transaction (3-letter ISO 4217).
crmtransactionitemobject
ID of transaction item.
Stock Keeping Unit (SKU) for transaction item.
Title row 1 for transaction item.
Optional. Title row 2 for transaction item.
Optional. Note for transaction item.
Name of product group for transaction item.
Optional. Brand for transaction item.
Optional. Custom field 1 for transaction item.
Optional. Custom field 2 for transaction item.
Optional. Custom field 3 for transaction item.
Optional. Custom field 4 for transaction item.
Optional. Custom field 5 for transaction item.
VAT percentage for transaction item.
Total amount for item incl VAT (before applying manual discount and discounts)
VAT amount for total.
Manual discount incl VAT
VAT amount for manual discount
Optional. Name provided for manual discount
Quantity for transaction item.
Optional. Unit Size (How much that is included in each unit).
Optional. Label for unit of transaction item. (e.g. kg)
Array of CrmTransactionItemDiscount.
crmtransactionitemdiscountobject
crmtransactionpaymentobject
ID of the payment.
Name of the payment.
Amount for the payment.
decimalquantity
genderstring
female
Femalemale
Maleundisclosed
Undisclosed
moneystring
promotiontypeobject
The type of promotion
promotiontypecartamountobject
The type of this promotion.
VALUES |
---|
cart_amount |
Cart amount to discount.
promotiontypecartpercentobject
The type of this promotion.
VALUES |
---|
cart_percent |
Percent to discount.
promotiontypemanualobject
The type of this promotion.
VALUES |
---|
manual |
promotiontypeofferobject
The type of this promotion.
VALUES |
---|
offer |
Voucher password that can enable campaigns that already exist in the Sitoo Platform.
status_colorstring
green
Greenorange
Orangered
Red