Quick Start
Follow these steps to complete a full end-to-end integration with the Vendora POS API from your vendor backend.
Demo Storefront vs. Sandbox API
- Demo Storefront — A reference customer journey for demonstration only. It does not process a real payment and is not the vendor's production integration.
- Sandbox API — A non-production version of the Vendora POS API for vendor development and testing. Use only sandbox credentials and test data here.
- Vendor integrations must call
/api/v1/pos/*endpoints directly from a secure vendor backend or POS service. - Vendor API credentials must never be exposed in browser JavaScript, URLs, screenshots, logs or source control.
- The Demo Storefront uses internal Nuxt/Nitro proxy routes such as
/api/storefront/*and/api/vendor-dashboard/*. These are sandbox portal internal proxies — not vendor integration endpoints.
${API_BASE_URL}/api/v1/posConfigured via NUXT_VENDORA_API_BASE_URL. Do not hardcode a domain.Obtain your sandbox credentials securely
Contact your Vendora integration manager to receive your sandbox credentials. Do not attempt to derive credentials from this portal or from any example in this documentation.
Validate credentials
Before building further, confirm your API key is active and inspect the resolved vendor, store, POS terminal and granted scopes. This is a connectivity and configuration check — call it from your vendor backend, not from a browser.
/api/v1/pos/auth/validatescope: nonePOST {API_BASE_URL{'}'}/api/v1/pos/auth/validate
X-Vendora-Api-Key: <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept: application/json
Response 200 — envelope.response:
{
"api_key": {
"name": "Sandbox Key",
"scope_mode": "vendor_wide",
"abilities": ["products:read", "customers:write", "tickets:hold", "sales:write", "sales:read", "etickets:download", "tickets:read", "sms:read", "sms:retry"]
},
"vendor": { "code": "VENDOR01", "name": "Demo Vendor" },
"store": { "code": "STORE01", "name": "Demo Store" },
"pos": null
}Retrieve active products
Fetch the list of active draw products allocated to your store. Products include pricing, quantity limits, draw dates and any active promotional coupon. An empty array is a valid response meaning no draws are currently active.
/api/v1/pos/productsscope: products:readGET {API_BASE_URL{'}'}/api/v1/pos/products
X-Vendora-Api-Key: <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept: application/json
Response 200 — envelope.response.products (array):
{
"product_id": 251,
"product_name": "Grand Lucky Draw",
"series_no": "GLD-2025-A",
"price": 35.00,
"minimal_quantity": 1,
"maximal_quantity": 10,
"available_quantity": 1250,
"draw_date": 1736967600,
"coupon": [{ "id": 900, "name": "Buy 2 Get 1", "buy_x": 2, "get_y": 1 }]
}Upsert the customer
Create or update a customer record in the Vendora system. The returned vendor_customer_id must be stored by your backend and used in all subsequent hold and sale requests for this customer. A customer upsert is required before any promotional hold. Do not submit identity document numbers here — KYC attestation is provided at sale time.
/api/v1/pos/customers/upsertscope: customers:writePOST {API_BASE_URL{'}'}/api/v1/pos/customers/upsert
X-Vendora-Api-Key: <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Content-Type: application/json
Accept: application/json
Request body:
{
"vendor_customer_id": "VENDOR-CUSTOMER-1001",
"first_name": "Ahmed",
"last_name": "Al-Rashid",
"email": "customer_email_here",
"mobile": "501234567",
"mobile_country_id": 217,
"full_mobile": "+971501234567",
"nationality": "AE",
"date_of_birth": "1990-01-15",
"address": {
"country_id": 217,
"state_id": 1,
"city_id": 0,
"address_line_1": "123 Test Street",
"address_line_2": null
}
}
Response 200 (CUSTOMER_MAPPED) — envelope.response:
{
"vendor_customer_id": "VENDOR-CUSTOMER-1001",
"mapping_status": "linked",
"match_method": "created",
"review_required": false
}Retrieve available tickets (optional — ticket-selection mode)
If your integration allows customers to choose specific ticket numbers, fetch the available ticket inventory for the product first. This step is optional for quantity-mode holds.
/api/v1/pos/products/{productId}/available-ticketsscope: tickets:readGET {API_BASE_URL{'}'}/api/v1/pos/products/251/available-tickets?cursor=<next_cursor>
X-Vendora-Api-Key: <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept: application/json
Response 200 — envelope.response:
{
"product": { "product_id": 251, "price": 35.00, "minimal_quantity": 1, "maximal_quantity": 10 },
"tickets": [
{ "ticket_id": 101, "ticket_number": "386216", "lucky_number": null },
{ "ticket_id": 102, "ticket_number": "386217", "lucky_number": null }
],
"available_quantity": 1250,
"pagination": { "next_cursor": 102, "has_more": true },
"availability_checked_at": "2026-10-16T11:30:00.000000Z"
}Create a ticket hold
Reserve tickets temporarily. A hold does not issue tickets or make them valid draw entries — it only reserves inventory while the customer completes payment. The hold expires automatically if not converted to a sale before the backend-configured expiry time. A valid POS code and an Idempotency-Key are required.
/api/v1/pos/ticket-holdsscope: tickets:holdPOST {API_BASE_URL{'}'}/api/v1/pos/ticket-holds
X-Vendora-Api-Key: <your-api-key>
X-Vendora-Store-Code: <your-store-code>
X-Vendora-POS-Code: <your-pos-code>
Idempotency-Key: hold-<stable-uuid-per-logical-hold>
Content-Type: application/json
Accept: application/json
Quantity mode:
{ "product_id": 251, "quantity": 2 }
Ticket-selection mode:
{ "product_id": 251, "ticket_ids": [101, 102] }
Promotional hold:
{ "product_id": 251, "quantity": 3, "coupon_id": 900, "vendor_customer_id": "VENDOR-CUSTOMER-1001" }
Response 201 (TICKETS_HELD) — envelope.response:
{
"hold_reference": "hld_opaque-reference-string",
"product_id": 251,
"quantity": 2,
"expires_at": "2026-10-16T12:10:00+04:00",
"tickets": [
{ "ticket_id": 101, "ticket_number": "386216" },
{ "ticket_id": 102, "ticket_number": "386217" }
],
"promotion": null
}Process payment through the vendor's own payment gateway
Vendora does not process card or cash payments. Your vendor backend or POS system collects payment from the customer and receives a payment result from your payment gateway. Record the payment transaction ID, result status, result code and receipt reference — you must submit these to Vendora in the next step.
Submit the sale
Submit the hold reference(s), confirmed payment result and KYC attestation to create the sale and issue the tickets. Vendora validates the submitted payment amount against the amount protected by the hold. Use a separate, stable Idempotency-Key for the sale — distinct from the hold key. A valid POS code is required.
/api/v1/pos/salesscope: sales:writePOST {API_BASE_URL{'}'}/api/v1/pos/sales
X-Vendora-Api-Key: <your-api-key>
X-Vendora-Store-Code: <your-store-code>
X-Vendora-POS-Code: <your-pos-code>
Idempotency-Key: sale-<stable-uuid-per-logical-sale>
Content-Type: application/json
Accept: application/json
Request body:
{
"hold_references": ["hld_opaque-reference-string"],
"vendor_order_id": "VENDOR-ORDER-1001",
"vendor_order_reference": "VENDOR-RECEIPT-1001",
"vendor_customer_id": "VENDOR-CUSTOMER-1001",
"kyc": {
"attestation_method": "VENDOR_MANUAL",
"attested_at": "2026-10-16T10:15:00+04:00",
"document_type": "PASSPORT",
"document_number": "P12345678",
"document_expiry_date": "2028-06-30",
"document_country_id": 217
},
"payment": {
"provider": "Vendor POS",
"transaction_id": "PAYMENT-1001",
"payment_method": "CARD",
"result_status": "PAID",
"result_code": "00",
"result_message": "Approved",
"amount": 70.00,
"currency": "AED",
"paid_at": "2026-10-16T10:14:30+04:00",
"receipt_reference": "RECEIPT-1001"
}
}
Response 201 (SALE_ISSUED) — envelope.response.sale:
{
"order_reference": "ORD-xyz789",
"payment_status": "PAID",
"ticket_status": "ISSUED",
"ticket_count": 2,
"total_amount": "70.00",
"currency": "AED",
"email_delivery_status": "QUEUED"
}Retrieve the transaction
After the sale, retrieve the full transaction detail to confirm issuance, inspect the ticket breakdown and check delivery status fields.
/api/v1/pos/transactions/{order}scope: sales:readGET {API_BASE_URL{'}'}/api/v1/pos/transactions/ORD-xyz789
X-Vendora-Api-Key: <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept: application/json
Response 200 — envelope.response.transaction (key fields):
{
"order_reference": "ORD-xyz789",
"payment_status": "PAID",
"status": "ISSUED",
"ticket_count": 2,
"total_amount": "70.00",
"currency": "AED",
"email_status": "QUEUED",
"created_at": "2026-10-16T10:15:00.000000Z",
"issued_at": "2026-10-16T10:15:02.000000Z"
}Download the e-ticket PDF
Download the issued e-ticket as a PDF binary. The transaction must be successfully issued. Download is independent of email delivery status — you do not need to wait for email_status to be SENT. The API key must be sent in a request header and must never appear in the download URL.
/api/v1/pos/transactions/{order}/e-ticketscope: etickets:downloadGET {API_BASE_URL{'}'}/api/v1/pos/transactions/ORD-xyz789/e-ticket
X-Vendora-Api-Key: <your-api-key>
X-Vendora-Store-Code: <your-store-code>
Accept: application/pdf
Response 200:
Content-Type: application/pdf
Content-Disposition: attachment; filename="Vendora-e-ticket-ORD-xyz789.pdf"
Cache-Control: no-store, private
<binary PDF data>Check asynchronous delivery status
E-ticket email and SMS delivery are asynchronous background processes. They do not affect whether the sale was successfully issued or whether the PDF can be downloaded. Query the delivery status endpoints separately if you need to surface delivery state to staff or customers.
Check SMS status:
GET {API_BASE_URL{'}'}/api/v1/pos/transactions/ORD-xyz789/sms
Scope: sms:read
Retry SMS if needed:
POST {API_BASE_URL{'}'}/api/v1/pos/transactions/ORD-xyz789/sms/retry
Scope: sms:retry
Response 202 (SMS_RETRY_QUEUED) means the retry was queued — not that the SMS was delivered.
Query the SMS status endpoint after retrying to check the updated delivery state.Release Hold
If a customer cancels checkout, payment fails, or a cart is abandoned, immediately release the hold to return reserved tickets to inventory rather than waiting for automatic timeout expiration.
/api/v1/pos/ticket-holds/{reference}scope: tickets:holdDELETE {API_BASE_URL{'}'}/api/v1/pos/ticket-holds/hld_opaque-reference-string
X-Vendora-Api-Key: <your-api-key>
X-Vendora-Store-Code: <your-store-code>
X-Vendora-POS-Code: <your-pos-code>
Accept: application/json
Response 200 (TICKET_HOLD_RELEASED) — envelope.response:
{
"hold_reference": "hld_opaque-reference-string",
"released_quantity": 2
}X-Vendora-POS-Code) is required. Releasing an already-released, expired or completed hold may return 404 HOLD_NOT_FOUND or 409 HOLD_EXPIRED — treat these as idempotent successes since the hold is no longer active. Vendora Response Envelope
Every Vendora API response wraps business data in a consistent envelope. Business data is always in response, never in data. Preserve the tracing_id for support requests.
{
"status": 200,
"code": "OPERATION_CODE",
"message": "Human-readable description.",
"tracing_id": "req-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"version": "1.0",
"errors": null,
"encrypted_data": null,
"response": { }
}
Notes:
- Business data is always in "response", never in "data".
- "errors" is an array of { code, field, message } objects when status is not 2xx.
- Preserve "tracing_id" in your logs for every request — required for support.
- "code" is an operation-specific string (e.g. TICKETS_HELD, SALE_ISSUED, CUSTOMER_MAPPED).Request Headers Reference
These headers must be set by your vendor backend on every call to the Vendora POS API. They must never be set or read by browser client-side code.
| Header | When Required | Required |
|---|---|---|
X-Vendora-Api-Key | All authenticated endpoints. Identifies and authenticates the vendor integration. | Required |
X-Vendora-Store-Code | All authenticated endpoints. Selects the authorised store for the operation. | Required |
X-Vendora-POS-Code | Required for Create Hold, Release Hold and Create Sale. Selects the authorised POS terminal. | Conditional |
X-Request-ID | Recommended for all requests. A vendor-generated UUID for end-to-end tracing. | Optional |
Idempotency-Key | Required for Create Hold and Create Sale. A stable vendor-generated key per logical operation. Use a new key for a new action; reuse for retries of the same action. | Conditional |
Content-Type | Required for requests with a JSON body (POST/PATCH). Must be application/json. | Conditional |
Accept | application/json for all JSON endpoints. application/pdf for the e-ticket download endpoint. | Required |
Error Handling
All error responses use the standard Vendora envelope with a non-2xx HTTP status and an errors array.
{
"status": 422,
"code": "VALIDATION_ERROR",
"message": "The given data was invalid.",
"tracing_id": "req-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"version": "1.0",
"errors": [
{ "code": "VALIDATION_ERROR", "field": "payment.amount", "message": "The amount must match the hold total." }
],
"encrypted_data": null,
"response": null
}tracing_id from error responses — include it in any support request to the Vendora integration team.