Skip to content
StraventaDocs
API Reference

POS Service API

Stores, registers, shifts, catalog, sales, refunds, offline sync, and owner reporting

The POS Service powers the 505pay register experience — the tablet-first Flutter app at pos.505pay.link and any third-party integrator running their own front-of-house terminal. It exposes a stable HTTP surface for the entire operational loop: bring up a store, open a shift, scan a catalog, take payment, print a receipt, and reconcile the day at close.

Base URLs

EnvironmentHostname
Sandboxhttps://sandbox.505pay.link
Productionhttps://api.505pay.link

All endpoints require an Authorization: Bearer <jwt> issued by the Auth Service. The JWT must carry the pos.* permissions that match the caller's role (typically pos.cashier, pos.shift_manager, or pos.owner).

Domain model

A real-world store is modeled as a small hierarchy. Each level isolates state so two registers at the same store can take sales independently and reconcile cleanly at end-of-day.

  • Store — physical location. Owns the catalog and the staff roster.
  • Register — a single point-of-sale device bound to a store.
  • Shift — the open/close session for a register; every sale rolls up to exactly one shift so cash-drawer math always balances.
  • Sale — a single transaction. Carries one or more line items, a payment method (often a 505pay payment intent), and a printable receipt.
  • Refund — issued against a prior sale; mirrors the original payment method via the Payments service.

A day in the life

Idempotency & offline sync

  • Sale creation accepts an Idempotency-Key header. The same key replays the original response without double-charging. See the Idempotency guide.
  • Tablets running offline buffer sales locally and replay them via POST /sync once connectivity returns. The endpoint accepts a batch of pending operations and returns per-op success/conflict status.

Cash-drawer integrity

Once a shift is closed it is immutable. Mistakes go through the exceptions queue, not by re-opening the shift.


Endpoint reference

Stores

Create and manage physical store locations.

Registers

List registers (terminals) associated with stores.

Shifts

Open, track, and close cashier shifts with float reconciliation.

Catalog

Search SKUs, create products, and process cart checkout.

Sales & refunds

Create sales, fetch details, issue refunds, and print receipts.

Customers

Look up and search customer profiles by phone number.

Offline sync

Replay a batch of offline sales and shift events after connectivity is restored.

Exceptions & owner reporting

Review unresolved exceptions and fetch owner-level KPI snapshots.

Retail analytics

Rollup reports by cashier, category, SKU, and hourly heatmap.

Ungrouped operations

84 operations in the spec are not listed in the groups file. Add their operationIds to content/docs/api/pos.groups.json.

GET/api/pos/v1/catalog/categories

List product categories for the tenant

GET/api/pos/v1/catalog/modifiers

List all modifiers for the tenant (flat, across all variants)

GET/api/pos/v1/catalog/products

List catalog products (management workspace)

GET/api/pos/v1/catalog/products/{id}

Get a single product (management workspace)

GET/api/pos/v1/catalog/stream

Server-Sent Events stream of catalog changes

GET/api/pos/v1/catalog/tax-categories

List tax categories for the tenant

GET/api/pos/v1/catalog/variants/{id}/modifiers

List modifiers attached to a variant

GET/api/pos/v1/catalog/vouchers

List voucher / coupon codes

GET/api/pos/v1/config

Receipt-delivery capability flags (AC-30.3)

GET/api/pos/v1/inventory/low-stock

List low-stock alerts (paginated)

GET/api/pos/v1/inventory/low-stock/summary

Dashboard widget summary (open_count + last_scan_at)

GET/api/pos/v1/inventory/valuation-method

Get the active inventory-valuation method

GET/api/pos/v1/kitchen-stations

List station options for the KDS station picker

GET/api/pos/v1/kitchen-tickets

List KDS tickets for a station

GET/api/pos/v1/purchase-orders

List purchase orders

GET/api/pos/v1/purchase-orders/{id}

Get purchase order with lines

GET/api/pos/v1/reports/consolidated

List POS cross-outlet consolidated report

GET/api/pos/v1/reports/exceptions

Exception report (voids + discounts)

GET/api/pos/v1/reports/gross-margin

Per-variant gross-margin report

GET/api/pos/v1/reports/hq-dashboard

Get POS HQ cross-outlet dashboard

GET/api/pos/v1/reports/kartu-stok

Kartu stok — per-item stock movement card

GET/api/pos/v1/reports/payment-methods

Payment-method breakdown report

GET/api/pos/v1/reports/tax-summary

Get POS tax-summary report (DPP / PPN / PB1 per category)

GET/api/pos/v1/reports/valuation

Persediaan valuation — on-hand value per variant/store

GET/api/pos/v1/shifts/{id}/cash-movements

List a shift's cash drawer movements

GET/api/pos/v1/shifts/{id}/x-report

X-report (mid-shift snapshot) for an open shift

GET/api/pos/v1/shifts/{id}/z-report

Z-report (end-of-day summary) for a closed shift

GET/api/pos/v1/shifts/{id}/zreport.pdf

Z-report as printable PDF

GET/api/pos/v1/stock-counts

List stock-count adjustment movements

GET/api/pos/v1/stores/{store_id}/controls

Get per-outlet anti-fraud control config

GET/api/pos/v1/stores/{store_id}/rounding

Get per-outlet cash-rounding config

GET/api/pos/v1/stores/{store_id}/service-charge

Get per-outlet F&B service-charge config

GET/api/pos/v1/suppliers

List suppliers

GET/api/pos/v1/suppliers/{id}

Get supplier by id

GET/api/pos/v1/tables

List tables for a store

GET/api/pos/v1/tables/{tableID}

Get a table by id

GET/api/pos/v1/transfers

List inter-store transfers

GET/api/pos/v1/transfers/{id}

Get transfer with lines

POST/api/pos/v1/catalog/categories

Create a product category

POST/api/pos/v1/catalog/products/{id}/image

Upload a product image (multipart)

POST/api/pos/v1/catalog/products/bulk

Bulk import products from a multipart CSV upload

POST/api/pos/v1/catalog/products/import

Bulk import products from raw CSV

POST/api/pos/v1/catalog/tax-categories

Create a tax category

POST/api/pos/v1/catalog/variants/{id}/modifiers

Create a modifier on a variant

POST/api/pos/v1/catalog/vouchers

Create a voucher / coupon code

POST/api/pos/v1/orders

Create an open (unpaid) parent order

POST/api/pos/v1/orders/{orderID}/assign-table

Bind an existing order to a table

POST/api/pos/v1/orders/{orderID}/kitchen-send

Send an order to the kitchen (creates / returns a KDS ticket)

POST/api/pos/v1/pairings/claim

Claim a short code from a terminal device

POST/api/pos/v1/pairings/generate

Generate a 6-hex short code for a KDS or customer-display terminal

POST/api/pos/v1/payment_links

Create a payment-link intent from a POS cart (AC-4.4)

POST/api/pos/v1/pin

Set or rotate the caller's cashier PIN

POST/api/pos/v1/pin/verify

Verify a candidate PIN for the caller

POST/api/pos/v1/purchase-orders

Create draft purchase order

POST/api/pos/v1/purchase-orders/{id}/cancel

Cancel a draft or submitted PO

POST/api/pos/v1/purchase-orders/{id}/receive

Receive a submitted purchase order (atomic cascade)

POST/api/pos/v1/purchase-orders/{id}/submit

Submit a draft purchase order

POST/api/pos/v1/sales/{id}/receipt-email

Send a receipt by email (AC-30.3 / AC-CO-1)

POST/api/pos/v1/sales/{id}/receipt-sms

Send a receipt by SMS (AC-30.3 / AC-CO-2)

POST/api/pos/v1/sales/{order_id}/void

Void a completed POS sale and release reserved stock

POST/api/pos/v1/sales/{parent_id}/split

Split a pending sale into child orders

POST/api/pos/v1/shifts/{id}/cash-movements

Record a non-sale cash drawer movement

POST/api/pos/v1/shifts/{id}/no-sale

Record a no-sale (Buka Laci) drawer-open

POST/api/pos/v1/stock-counts

Submit physical stock count (manager-only)

POST/api/pos/v1/suppliers

Create supplier

POST/api/pos/v1/tables

Create a table for a store

POST/api/pos/v1/transfers

Create draft inter-store transfer

POST/api/pos/v1/transfers/{id}/cancel

Cancel a draft or in_transit transfer

POST/api/pos/v1/transfers/{id}/complete

Complete a transfer (atomic dual-leg movements)

POST/api/pos/v1/vouchers/validate

Preview a voucher against an order

PUT/api/pos/v1/inventory/valuation-method

Set the inventory-valuation method (versioned, audited)

PUT/api/pos/v1/stores/{store_id}/controls

Update per-outlet anti-fraud control config

PUT/api/pos/v1/stores/{store_id}/rounding

Update per-outlet cash-rounding config

PUT/api/pos/v1/stores/{store_id}/service-charge

Update per-outlet F&B service-charge config

PUT/api/pos/v1/suppliers/{id}

Update supplier

PATCH/api/pos/v1/catalog/products/{id}

Partially update a product

PATCH/api/pos/v1/catalog/tax-categories/{id}

Partially update a tax category

PATCH/api/pos/v1/catalog/variants/{id}

Partially update a variant (currently reorder_point only)

PATCH/api/pos/v1/kitchen-tickets/{ticketID}

Update a KDS ticket's status

PATCH/api/pos/v1/tables/{tableID}

Update a table's label/capacity/status

DELETE/api/pos/v1/catalog/products/{id}

Soft-delete a product

DELETE/api/pos/v1/catalog/tax-categories/{id}

Soft-delete a tax category

DELETE/api/pos/v1/catalog/vouchers/{id}

Expire / soft-delete a voucher

DELETE/api/pos/v1/suppliers/{id}

Delete supplier (rejected if referenced by PO)

Was this page helpful?

On this page