Sitoo Discount Cards SPI
Sitoo Discount Cards SPI is a centrally managed mechanism for providing controlled, reusable discounts to specific groups such as employees, ambassadors, or VIP customers. The SPI enables retailers to offer percentage-based discounts with defined spending limits, ensuring that balances are tracked and reconciled across multiple purchases. Within the Sitoo POS flow, the Discount Cards SPI provides full control over how these discounts interact with existing campaigns and pricing rules. Furthermore, it automates the handling of refunds and returns, allowing for balance adjustments without the need for manual intervention.
Authentication
The calls' authentications are done using the HTTP basic authentication mechanism. Requests to the endpoint will add an Authorization header to the request. Example:
Authorization: Basic c2l0b286ZGlnaXRhbC1yZWNlaXB0cy1zcGktaW50ZWdyYXRpb24tc2VydmVyLXRva2VuPublic Server
The URL used for the service needs to have public access with a valid SSL certificate.
Response Times
It is important to have very low response times, in general response times should never exceed 1 second.
Errors
When a request is not successful, an error object should be returned. It should consist of the request_id, an error_code and
an error_data field. The error code is defined as one of the following strings
- pin-invalid
- bad-request
- unauthorized
- forbidden
- not-found
- too-many-requests
- bad-gateway
- other
Example error message:
{ "error_code": "pin-invalid", "error_data": { "message": "Invalid PIN provided" }, "request_id": "123e4567-e89b-12d3-a456-426614174123"}