Quick start
Register a sale with a single POST request.
bash
curl https://vcr.am/api/v1/sales \
-H "X-API-KEY: $VCR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cashier": { "id": 1 },
"items": [{
"offer": { "externalId": "SKU-001" },
"department": { "id": 1 },
"quantity": 1,
"price": 20000,
"unit": "pc"
}],
"amount": { "nonCash": 20000 },
"buyer": {
"type": "individual",
"receipt": { "email": "buyer@example.com", "language": "en" }
}
}'Built for production integrations
REST over JSON
Stateless JSON endpoints you can call from any language, framework or runtime.
Typed Node.js SDK
End-to-end typed client on npm, ready to drop into your server code.
API-key authentication
Scoped, rotatable API keys managed from your dashboard.
Complete cash-register API
Sales, prepayments, refunds and receipts through a single consistent surface.
What your system must provide
Before integrating, make sure each sale carries the data SRC requires.
Classifier code
Commodity code for goods or activity code for services.
Measurement unit
kg, pcs, m², hour, service, work, etc.
Department ID
Where the sale is registered in your cash register.
Cashier ID
The person registering the sale.
Authentication
Every request must include your API key in the X-API-KEY header.
X-API-KEY: your_api_keyGenerate and rotate API keys in your cash register settings.
Keep your API key private
Never expose it in client-side code, public repositories or shared logs. If it leaks, rotate it immediately from your cash register settings.
Errors
Errors use standard HTTP status codes and a JSON body with the details.
| Status | Name | When it happens |
|---|---|---|
400 | Bad request | Malformed payload or schema validation failed. |
401 | Unauthorized | Missing or invalid API key. |
403 | Forbidden | Access to this resource is not allowed for this key. |
404 | Not found | The requested resource doesn't exist. |
500 | Internal error | Unexpected failure on our side. Retry with exponential backoff. |