API Documentation
The Decimal API provides programmatic access to manage orders, products, invoices, customers, sale records, vendors, and vendor bills in your point-of-sale system. This RESTful API uses JSON for all requests and responses.
Base URL
Code
Authentication
All API requests require authentication using an API key in the request header:
Code
Important: You can only access orders created with your API key, invoices generated from those orders, and customers associated with those orders. The same goes for vendor bills: you see the bills created with your API key, and an own-access key can look up only the vendors it has a bill with. Listing every customer (
GET /customers) or vendor (GET /vendors) requires theallaccess level. Products are globally accessible. Sale records (GET /salerecords) are limited to items on this key's permission list (GET /permissionlist). A key whose permission list is empty gets403.
Example Request:
Code
Permission Scopes
API access is controlled by permission scopes assigned to your API key. Each scope determines which endpoints and operations you can access.
Key Points:
- Requests without required scopes return
403 Forbidden - Your usage plan can limit you further: on the SMS-only plan only text messages work, and every other endpoint returns
402 - Only store owners can modify API key permission scopes
- View and manage permissions in the API Keys section
Tip: If you receive 403 errors with valid authentication, verify your API key has the required scope for that endpoint.
Endpoint Scope Reference
The following table shows which scope is required for each API endpoint:
| Endpoint ↑ | Method | Scope | Access | Cost | Description |
|---|---|---|---|---|---|
| /bills | GET | bill:get | own | 0 | GET Bills. |
| /bills | POST | createbill:post | own | 18 | POST Bill. |
| /bills | GET | bill:get | own | 0 | GET Bill by id. |
| /bills | GET | bill:get | own | 0 | GET Bills by vendor + invoice number. |
| /customers | GET | customer:get | ⚠️ all | 1 | GET All Customers. |
| /customers | GET | customercard:get | own⚠️ all | 0 | Get customer credit cards. |
| /customers | POST | customercard:post | own⚠️ all | 1 | Save a customer credit card. |
| /customers | GET | customercard:get | own⚠️ all | 0 | Get customer credit card by ID. |
| /customers | POST | customercharge:post | own⚠️ all | 18 | Charge customer credit card. |
| /customers | GET | customer:get | own⚠️ all | 1 | GET Customer by id. |
| /customers | GET | customerbalance:get | own⚠️ all | 1 | GET Customer balance by ID. |
| /customers | GET | customer:get | own⚠️ all | 1 | GET Customer by phone number |
| /customers | GET | customerbalance:get | own⚠️ all | 1 | GET Customer balance by phone. |
| /customers | GET | customerid:get | ⚠️ all | 1 | GET Customer ID by phone number |
| /images | GET | images | own | 0 | Get upload status. |
| /invoices | POST | invoice:post | own | 18 | POST Create a new invoice. |
| /invoices | GET | invoice:get | own | 0 | GET Invoice by external (legacy) |
| /invoices | GET | invoice:get | own | 0 | GET Invoice by externalInvoiceId |
| /invoices | GET | invoice:get | own | 0 | GET Invoice by externalOrderId. |
| /invoices | GET | invoice:get | own | 0 | GET Invoice by id. |
| /invoices | GET | invoice:get | own | 0 | GET Invoice by order id. |
| /orders | POST | order:post | own | 18 | POST Order. |
| /orders | GET | order:get | own | 0 | GET Order by externalOrderId. |
| /orders | PUT | order:put | own | 18 | PUT Order by externalOrderId. |
| /orders | PATCH | order:patch | own | 0 | PATCH Order by externalOrderId. |
| /orders | GET | order:get | own | 0 | GET Order by id. |
| /orders | PATCH | order:patch | own | 0 | PATCH Order by id. |
| /payment-terms | GET | paymentterms:get | own⚠️ all | 1 | GET Payment terms. |
| /permissionlist | GET | permissionlist:get | ⚠️ all | 0 | Permission list |
| /products | GET | product:get | ⚠️ all | 1 | GET Products. |
| /products | GET | product:get | ⚠️ all | 1 | GET Products by code. |
| /products | POST | images:write | own | 0 | Upload an image. |
| /products | GET | product:get | ⚠️ all | 1 | GET Products by id. |
| /products | GET | images | own | 2 / item | Get image URLs. |
| /routes | GET | deliveryroute:get | own⚠️ all | 1 | GET Routes. |
| /salerecords | GET | salerecord:get | ⚠️ all | 0.1 / row | Sale records for one item code |
| /sms | POST | sms | 1.45 / segment | Send an SMS. | |
| /vendors | GET | vendor:get | ⚠️ all | 1 | GET Vendors. |
| /vendors | GET | vendor:get | own⚠️ all | 1 | GET Vendor by id. |
| /vendors | GET | vendorproduct:get | own⚠️ all | 1 | GET Vendor products. |
Each endpoint requires the corresponding scope. Access shows allowed levels: own = your data only, all = all account data. Cost is credits per request; a / row or / item suffix means credits per returned row or item, and / segment means credits per text-message segment.
Additional Scopes
The following scopes are for actions not tied to specific API endpoints:
| Scope | Cost | Description |
|---|---|---|
giftcards* | 12 | Sell gift cards, check their balance, and redeem them at checkout |
sms | 1.45 / segment | Send text messages from your store's number |
* Gift cards: when processed through a non-Decimal POS, that POS may apply additional charges, separate from the gift card credits shown here.
Access Levels
Scopes can have different access levels that determine data visibility:
- own — Access only data created by or associated with your API key
- all — ⚠️ Access all data in the account (sensitive)
For example, with customer:get:own you can only read customers associated with orders created by your API key, while customer:get:all allows reading every customer in the account. Some endpoints accept only one level: orders and bills are always own.
API Key Bundles
When creating an API key, you can choose a predefined bundle or configure custom scopes:
Customer PIN
A few endpoints touch customer money or payment instruments directly and require a second factor on top of your API key: the customer's PIN. This is a short code (max 8 characters) that the customer has configured on their POS account. Your API key authenticates your application; the PIN authenticates the customer behind the request.
Send the PIN in the X-Customer-Pin request header:
Code
When is the PIN required?
| Endpoint | PIN Requirement |
|---|---|
GET /customers/id/{id}/balance | Always |
GET /customers/phonenumber/{phoneNumber}/balance | Always |
POST /customers/id/{customerId}/charges | Always |
POST /orders, PUT /orders/external/{externalOrderId}, PATCH /orders/… | Conditional — required when payment.method is OnAccount or when paying with a stored credit card (cardId). Not required for a one-time card (card), cash, Food Stamps, Webhook payments, or an order with no payment. |
Requests missing or failing the PIN check return 401 Unauthorized, for example {"error": "Customer PIN required."}. A customer with no PIN on file cannot pass the check, so these endpoints always return 401 for them until a PIN is set at the POS.
Security
- Never log or persist a customer's PIN on your side beyond the scope of the single request.
- Do not accept the PIN from a URL query string — always collect it through a secure input and pass it only in the request header.
- The PIN is verified at the POS, after the customer lookup: an unknown customer, or one your key cannot access, returns
404; an existing customer with a wrong PIN returns401.
Content Type
All requests and responses use application/json:
- Include
Content-Type: application/jsonheader in POST/PUT requests - All responses return JSON format
Rate Limiting
The API implements rate limiting to ensure service stability. Exceeding the current limit returns a 429 Too Many Requests response.
Response Headers
When a request is throttled, the response includes a Retry-After header telling you how long to wait before retrying:
| Header | Example | Description |
|---|---|---|
Retry-After | Retry-After: 60 | Number of seconds to wait before sending another request. |
Example 429 Response:
Code
Handling 429 Responses
Follow these steps when you receive a 429:
- Read the
Retry-Afterheader to determine how many seconds to wait. It is returned in delay-seconds format (a whole number of seconds). - Pause before retrying. Wait at least the number of seconds indicated by
Retry-Afterbefore sending the request again. - Use exponential backoff with jitter for repeated failures, so retries don't all fire at the same moment.
- Avoid tight retry loops. Blindly retrying without honoring
Retry-Afterwill keep you throttled and may extend the block.
Recommended Retry Strategy
Respect Retry-After when it is present, and fall back to exponential backoff (e.g. 1s, 2s, 4s, 8s …) with a small random jitter when it is not. Cap the maximum delay and number of retries so requests fail gracefully instead of hanging indefinitely.
Example (JavaScript):
Code
Pagination
List endpoints (GET /products, GET /customers, GET /permissionlist, GET /salerecords, GET /vendors, GET /vendors/id/{id}/products, GET /bills) use cursor-based pagination.
- Each page returns
results(the records),hasMore,cursor(pass it to get the next page), and on the first pagetotal takesets the page size: default 20, between 1 and 100. A value outside that range returns400- The
totalcount is only on the first request (nocursor) GET /salerecordsnever includestotal- Use the
cursorfrom the response to fetch the next page — do not invent or edit it - Cursors are short-lived — page through promptly. If a cursor is rejected as expired (
409), restart from the first page withoutcursor - You must include all original query parameters (e.g.,
take,lastMod) alongside thecursor - Stop when
hasMoreis false, or when nocursoris returned
Error Handling
The API uses standard HTTP status codes:
- 200 OK - Request succeeded
- 400 Bad Request - Invalid request parameters
- 401 Unauthorized - Missing or invalid API key, or a missing or wrong customer PIN
- 402 Payment Required - No active usage plan, or your plan doesn't cover this endpoint (the SMS-only plan covers text messages only). On a charge, the card was declined
- 403 Forbidden - Valid API key but insufficient permissions
- 404 Not Found - Resource not found, or not accessible with your API key
- 409 Conflict - Duplicate external ID, an order that can no longer be edited or is busy, or an expired pagination cursor
- 429 Too Many Requests - Rate limit exceeded
- 500 Internal Server Error - Server error
- 503 Service Unavailable - The store's POS server (or the payment gateway) can't be reached. Nothing was changed; retry after the
Retry-Afterseconds
Error bodies are JSON in one of four shapes. Check the status code first; the body explains it.
| Shape | When | Example |
|---|---|---|
error | Most rejections from the POS: not found, conflicts, PIN, permission list | {"error": "Bill not found."} |
errors | Invalid request fields, one entry per problem | {"errors": [{"field": "ticket", "message": "The value 'abc' is not valid."}]} |
success / message | Rejected by the gateway: missing scope or access level, no usage plan, store unreachable | {"success": false, "error": "Forbidden", "message": "This API key does not have permission for any of the required scopes: bill:get"} |
| problem+json | Missing or invalid API key, rate limit | {"title": "Too Many Requests", "status": 429, "detail": "You have exceeded the rate limit."} |
Understanding Orders vs Invoices
The Decimal system follows a structured workflow from order creation to completed transaction.
Order Lifecycle
1. Order Creation
Create an order via POST /orders to capture the customer's purchase intent:
- Represents items the customer wants to purchase
- Records quantities and prices
- Exists in a pre-checkout state
- No payment has been processed
2. Order Fulfillment
The order moves through fulfillment:
- Staff prepares the items for the customer
- Order is readied for checkout
- Its
statusmoves fromOrderEntered/UnpickedthroughPicked(orPartiallyPicked,InProgress) toDone
3. Checkout & Invoice Generation
At checkout, the order converts to an invoice:
- Invoice represents the completed transaction
- The order is paid through your payment webhook; the invoice is marked paid or stays unpaid based on the result
Best Practice: Always include a
paymentEndpointin order requests. Without one, the invoice stays unpaid and requires manual processing.
Endpoints
Orders
Note: You can only access orders created with your API key.
Create Order
Endpoint: POST /orders
order:postMay Require Customer PIN
POST /orders requires the X-Customer-Pin header when the order's payment is OnAccount or uses a stored credit card (by cardId). It is not required for a one-time card (card), cash, Food Stamps, or Webhook payments. See Customer PIN.
Send a price on every line
Include unitPrice on each item. A line sent without one is saved at 0.00. The Decimal picking app applies the catalog price when the order is picked, but an order brought straight into a register without the picking app keeps the 0.00 price.
Headers:
| Header | Type | Required | Description |
|---|---|---|---|
| X-Customer-Pin | string (≤8) | Conditional | Customer PIN, required when paying OnAccount or with a stored card |
Request Body:
See the request body schema for POST /orders in the API Reference.
OrderMethod Values:
PickupDelivery
Rules:
- Required:
externalOrderId(1–20 characters, unique),items(at least one),orderMethod, and eithercustomerIdorcustomer. If both are sent,customerIdwins andcustomeris ignored. statuscan beOrderEntered(default),Unpicked, orPicked.- Items on
POSTmust not carry anid; ids are assigned by us. routemust be a code fromGET /routes. It defaults to the customer's route.paymentandpaymentEndpointcannot be sent together.OnAccountpayments are refused when the customer's credit is not enabled, over its limit, overdue, or stopped. A customer with a negative balance (the store owes them) can always pay on account.
Errors:
400— Invalid fields, an unknownproductCodeorroute,paymentsent withpaymentEndpoint, or a declined one-time card401— Missing or wrongX-Customer-Pinwhen one is required404— UnknowncustomerIdor saved card409—externalOrderIdalready used by any order, invoice, bill, or charge in the store, including ones created by other API keys, or the customer's phone number belongs to another customer503— The store or the payment gateway can't be reached; retry later
Response:
A successful order creation returns:
- Status Code:
201 Created - Location Header: Contains the URL to retrieve the created order (e.g.,
/orders/id/15007763)
Example Response Headers:
Code
Payment Webhooks
Overview
The payment webhook is how an order gets paid at checkout. Include a paymentEndpoint when you create the order. At checkout we POST a settlement request to it, you charge the customer and reply, and the invoice is marked paid. Without a webhook, the invoice stays unpaid and requires manual processing.
Two contracts exist. The contract is chosen per order with paymentEndpoint.version:
version | Contract | When to use |
|---|---|---|
2 | Prepaid. prepayments[] + chargesRequested[]. Money you already took at order creation is applied at checkout, and only the balance is charged. | All new integrations. Required if you take any money up front (online orders, Food Stamps). |
1 (default when absent) | Deprecated. totalAmountDue + charges[]. Every charge happens at checkout. | Existing integrations. |
Contract v1 is deprecated
Contract v1 is still active and fully supported: existing integrations keep working unchanged. It will be removed at a future date. No retirement date has been set yet; when one is, we will post it and update this documentation. New integrations should use v2.
Orders keep settling under the contract they were created with, so you can migrate by sending version: 2 on new orders while orders already in flight finish on v1.
Webhook Configuration
Include the paymentEndpoint object in your order creation request:
Code
| Field | Required | Description |
|---|---|---|
url | Yes | Endpoint we POST the settlement request to. Must be an absolute https URL with a public host name. IP addresses, localhost, and names that resolve to private addresses are refused. |
headers | Yes | Headers sent with every request; use them for your auth token. Names must be valid HTTP header names and values cannot contain line breaks. Host, Content-Length, and Transfer-Encoding are set by us and cannot be sent. |
version | No | 1 or 2. Absent means 1. Any other value returns 400. |
Supplying a paymentEndpoint sets the order's payment method to Webhook. It cannot be combined with a payment block.
Common rules (both contracts)
- Your endpoint must respond within 30 seconds with a
2xxstatus. statusisacceptedorrejected. Anything else is treated asrejected.externalOrderIdis added by us from the order. Echo it back in your response.
When settlement fails
The invoice stays unpaid and requires manual processing if:
- The order has no
paymentEndpoint - Your endpoint does not respond within 30 seconds
- Your endpoint returns a non-
2xxstatus, or a2xxbody that is not valid JSON - Your endpoint responds
rejected - The order's
versiondoes not match the contract the register settles with - The
urlresolves to a private or loopback address at checkout
In every one of these cases nothing is captured and no pre-payment is applied.
Contract v2 (prepaid)
Use v2 for every new integration. If your platform takes money at order creation, report it as prePayments[] on POST /orders (see Pre-payments).
The settlement request carries two separate lists:
prepayments[]: apply and release. Money you already took. It cannot fail; it is an instruction, not an authorization request. For each one we tell you how much covers this sale (appliedAmount). You release the rest back to the customer.chargesRequested[]: charge now. The balance the pre-payments did not cover. This is the only part that can fail.
How the amounts are decided. The register works out the split before it calls you:
- Food Stamps pre-payments are applied first, up to the Food Stamps–eligible amount of the sale.
- Credit card pre-payments are applied next, up to what is still due.
- Whatever is still due becomes one
CreditCardentry inchargesRequested[].
A pre-payment that is not needed gets appliedAmount: 0.00, meaning release all of it. The sale total itself is never sent.
Request (we POST this to paymentEndpoint.url):
Code
| Field | Meaning |
|---|---|
prepayments[].prepaidAmount | What you took at order creation, echoed from your prePayments[]. |
prepayments[].appliedAmount | How much of it covers this sale. Release the remainder (prepaidAmount - appliedAmount) to the customer. |
prepayments[].processorPaymentId / processorReference | Your own identifiers from the prePayments[] entry. Use them to find the pre-payment on your side. |
chargesRequested[].requestedAmount | Balance to charge now. Credit card only. |
An empty or absent chargesRequested[] is a valid call, meaning "commit the pre-payments, charge nothing". It happens whenever the pre-payments cover the whole sale. We still call you, because this is when you apply and release.
Worked example. A $75 sale, of which $40 is Food Stamps–eligible. Food Stamps was prepaid $50: $40 is applied and $10 is released. A card was prepaid $10 and is fully applied. The remaining $25 is charged to a card now. The register books three tenders: 40 + 10 + 25 = 75.
Response
Respond with a 2xx status and:
Code
payments[]is new charges only. Do not echo the applied pre-payments; we already have them and add them to the register's tender list ourselves. Echoing them double-tenders the sale.- Each new charge carries a fresh
processorPaymentId/processorReference, distinct from any pre-payment's. - The outcome is all-or-nothing.
acceptedmeans every listed pre-payment was applied and every requested charge landed.rejectedmeans nothing was captured and no pre-payment was applied. There is no partial state.
Rejected example:
Code
On rejected, populate errorCode and errorDescription; payments[] is ignored. The pre-payments are neither applied nor released: they stay on the order as they were. The cashier can try again, which sends a new settlement request, or close the sale without charging it. If the sale is closed uncharged, you get no further request for that order, so the pre-payments stay held on your side until you release them.
Contract v1 (deprecated)
Deprecated, still active
Contract v1 is still active and fully supported, and it will be removed at a future date. When a retirement date is set, we will post it and update this documentation. New integrations should use v2. v1 never applies pre-payments.
Request (we POST this to paymentEndpoint.url):
The eligibleChargeAmount represents the maximum chargeable amount for each payment method, not a suggested amount. Because of this, the combined total across all payment methods may exceed the totalAmountDue. The invoice number is provided for reconciliation.
Payment Method Values:
CreditCardFoodStamps
Code
Response
Respond with a 2xx status and the following structure:
Code
- Each
payments[]line is one settled payment.chargeAmountis what actually landed. - A
chargeAmountof0.00is ignored. Do not use it to mean "nothing to charge"; respondrejectedinstead.
Pre-payments
Money you already took when the order was created (online orders, Food Stamps orders charged up front). Report each one in prePayments[] on POST /orders. They are applied at checkout through the v2 webhook contract; a v1 endpoint never sees them.
Code
| Field | Required | Description |
|---|---|---|
paymentMethod | Yes | CreditCard or FoodStamps |
prepaidAmount | Yes | What you took at order creation. More than 0, at most 2 decimals. Authoritative: never re-verified by us. |
processorPaymentId | Yes, max 50 | Your processor's payment id. Accepts a string or a number; returned as a string. |
processorReference | Yes, max 50 | Your processor's reference (authorization or transaction id). |
processorPaymentIdandprocessorReferencetogether identify the pre-payment. They come back to you on the v2 settlement request so you can find it on your side.- An empty
prePayments[]is the same as omitting it. - An order with pre-payments needs a
paymentEndpointwithversion: 2; otherwise the request returns400. - No two pre-payments on one order can share a
processorPaymentId(400).
Get Order by ID
Endpoint: GET /orders/id/{id}
order:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| id | string (≤8) | Internal order identifier |
Returns 404 when the order does not exist or was not created with your API key.
Example:
Code
Get Order by External ID
Endpoint: GET /orders/external/{externalOrderId}
order:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| externalOrderId | string (≤20) | External order identifier |
Returns 404 when the order does not exist or was not created with your API key.
Example:
Code
Update Order
Endpoints: PATCH /orders/id/{id} · PATCH /orders/external/{externalOrderId}
order:patchChanges only the fields you send; omitted fields keep their current values. Returns 200 with the updated order.
items, when sent, is the order's full item list (1–999 lines, numbered in the order sent). An item with anid(from the order'sitems) updates that line in place, and fields you omit on it, includingunitPrice, keep the line's values. An item without anidis added, and lines left out are removed. Omititemsto leave the lines untouched.- An unknown or repeated
id, anidsent with a different product, or an emptyitemslist returns400. prePayments, when sent, replaces the list (an empty list clears it).paymentandpaymentEndpointeach replace the order's payment and cannot be sent together.
409 means the order cannot be changed right now:
- It is no longer
OrderEnteredorUnpicked, or it has been checked out. This is final. - It is open on a POS station, or being changed elsewhere. Retry after a short wait.
X-Customer-Pin is required when payment.method is OnAccount or the payment uses a stored card (see Customer PIN).
Example:
Code
Create or Replace Order by External ID
Endpoint: PUT /orders/external/{externalOrderId}
order:putSafe to retry with the same body. The body's externalOrderId must match the path.
- No such order: created exactly like
POST /orders; returns201with aLocationheader. Costs 18 credits. - Order exists: replaced with the body and returned with
200. Not billed. Omitted optional fields are cleared or defaulted asPOSTwould.itemsworks as on PATCH. The customer cannot change:customeris ignored, and a differentcustomerIdreturns400. The same409rules as PATCH apply. - External ID used by another caller:
409.
Get Delivery Routes
Endpoint: GET /routes
deliveryroute:getReturns every delivery route configured for the store, as code + description. Use a code as the route field when creating an order. The list is empty when the store does not use routes.
Code
Products
Get Products
Retrieve a paginated list of products with optional filtering. Results are sorted by product ID. With lastSold or lastMod, they are sorted by that date first (oldest first), then by ID.
Endpoint: GET /products
product:getQuery Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
| take | integer | 20 | Records to return (max 100) |
| cursor | string | - | Cursor for pagination (returned from previous request) |
| lastMod | datetime | - | Filter by products updated since this date (ISO 8601) |
| lastSold | datetime | - | Filter by products sold since this date (ISO 8601) |
| includeInactive | boolean | false | Include inactive products in results |
lastMod and lastSold include records at or after the given time, and cannot be in the future (400).
Understanding lastMod
The lastMod (last modified) timestamp on a product is updated whenever any change occurs to the product record, including:
- Changes to exposed fields (price, description, inventory, etc.)
- Changes to internal fields not yet exposed via the API
This means lastMod may update even if no visible field in the API response has changed. Use lastMod for reliable incremental syncing to catch all product updates.
Example:
Code
Incremental Sync Pattern:
- Store the highest
lastModifiedvalue from the products of your previous sync - Send it as
lastModto retrieve only products changed since. The filter is inclusive, so the last product of the previous sync comes back once more - Paginate through results using the
cursorreturned in the response - Include all original parameters (
take,lastMod, etc.) with each cursor request - Continue until
hasMoreis false. If a cursor has expired (409), restart from the first page
Example Workflow:
Code
Get Product by ID
Endpoint: GET /products/id/{id}
product:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| id | string (≤8) | Numeric product identifier, or any of the product's aliases |
Example:
Code
Get Product by Code
Endpoint: GET /products/code/{code}
product:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| code | string (≤12) | Product SKU or item code |
Example:
Code
Understanding Product Pricing
A product's prices are in prices[]. Each entry has a priceType (Regular, Special, Case, Special2), a price, and a qty: the price is for qty units (a qty of 0 means 1).
Code
Example: price: 10.00, qty: 2 → $5.00 per unit ("2 for $10").
priceQtyType says when the price applies:
priceQtyType | Applies to |
|---|---|
Bulk | Any quantity, at the unit price. Items sold by weight (byMeasure: true) are always Bulk. |
Pack | Only whole multiples of qty. Units left over are charged at another price. |
Minimum | Only when at least qty units are bought. |
Other fields can limit a price further: priceFrom / priceTill (dates), priceTimeFrom / priceTimeTill and daysOfWeek, membersOnly, cashAndCarryOnly (not on account), and maxQty (how many times it can be applied).
Invoices
Note: You can only access invoices generated from orders created with your API key, and invoices you created with
POST /invoices.
Create Invoice
Endpoint: POST /invoices
invoice:postCreate a new invoice directly. You must provide either a customerId (existing customer) or a customer object. If both are sent, customerId wins and customer is ignored. A customer whose phone matches an existing customer uses that customer; otherwise a new one is created.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
| externalInvoiceId | string | Yes | External invoice identifier (max 20 chars) |
| invoiceDate | datetime | Yes | Date the invoice was created (ISO 8601) |
| orderMethod | string | Yes | Pickup or Delivery |
| taxAmount | number | Yes | Total tax amount |
| items | array | Yes | Invoice line items (see below) |
| customerId | string | Conditional | Existing customer ID (provide this OR customer) |
| customer | object | Conditional | New customer details (provide this OR customerId) |
| payments | array | No | Payments applied to this invoice |
| taxableAmount | number | No | Total taxable amount before tax |
| memo | string | No | Memo for the invoice |
Invoice Line Item Fields:
| Field | Type | Required | Description |
|---|---|---|---|
| productId | string (≤8) | Conditional | Product ID (provide this OR productCode) |
| productCode | string (≤12) | Conditional | Product code/SKU (provide this OR productId) |
| quantity | number | Yes | Quantity of the product |
| unitPrice | number | Yes | Unit price of the product |
| subtotal | number | Yes | Subtotal before tax/discounts, 0 or more |
| isTaxable | boolean | Yes | Whether the item is taxable |
| discountAmount | number | Yes | Discount amount applied, 0 or more. A non-zero discount must be at least 0.005% of subtotal, so a discount on a 0 subtotal returns 400 |
| isFoodStampItem | boolean | No (send it) | Whether the item is Food Stamps–eligible. Will become required in a future version; start sending it now |
| priceType | string | No | Regular, Special, Case, or Special2 |
| priceQty | integer | No | Price quantity multiplier |
Customer Object Fields (when sending customer):
| Field | Type | Required | Description |
|---|---|---|---|
| lastName | string (≤18) | Yes | Last name |
| firstName | string (≤12) | No | First name |
| phone | string | Yes | 10 digits |
| string (≤35) | No | Email address | |
| address | object | Yes | addressLine1 (≤30, required), addressLine2 (≤30), city (≤15, required), state (2 letters, required), zipCode (5 digits, required) |
Payment Fields:
| Field | Type | Required | Description |
|---|---|---|---|
| paymentMethod | string | Yes | APICreditCard or APIFoodStamp |
| amount | number | Yes | Payment amount |
| referenceNo | string | Yes | Reference number (max 15 chars) |
| dateTime | datetime | Yes | Payment date/time (ISO 8601) |
| maskedCreditCardNumber | string (≤20) | No | Masked card number |
| cardholderName | string (≤25) | No | Cardholder name |
| authorizationCode | string (≤10) | No | Bank authorization code |
Example:
Code
Response:
- Status Code:
201 Created, with no response body. Look the invoice up withGET /invoices/externalinvoiceid/{externalInvoiceId} - 400 - Invalid request parameters or product not found
- 403 - The API key's scopes don't allow it
- 404 - Customer not found
- 409 - The external ID is already used, or the new customer's phone number belongs to another customer
Get Invoice by ID
Endpoint: GET /invoices/id/{id}
invoice:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| id | string | Invoice identifier |
Example:
Code
Get Invoice by Order ID
Endpoint: GET /invoices/order/{orderId}
invoice:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| orderId | string (≤8) | Order identifier |
Returns 404 until the order has been checked out into an invoice.
Example:
Code
Get Invoice by External Invoice ID
Endpoint: GET /invoices/externalinvoiceid/{externalInvoiceId}
invoice:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| externalInvoiceId | string | External invoice identifier |
Example:
Code
Get Invoice by External Order ID
Endpoint: GET /invoices/externalorderid/{externalOrderId}
invoice:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| externalOrderId | string | External order identifier |
Example:
Code
Deprecated Endpoint
GET /invoices/external/{externalOrderId} is deprecated. Use GET /invoices/externalorderid/{externalOrderId} instead.
Customers
Note: With the
customer:get:ownscope, you can only access customers associated with orders created by your API key.To access all customers in the account, use the
customer:get:allscope. ⚠️ This is a sensitive scope — only request it if your application genuinely needs access to all customer data, and ensure you handle personal information responsibly.
Get All Customers
Retrieve a paginated list of all customers with optional filtering by last modified date.
Endpoint: GET /customers
customer:getQuery Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
| take | integer | 20 | Records to return (max 100) |
| cursor | string | - | Cursor for pagination (returned from previous request) |
| lastMod | datetime | - | Filter by last modified date (ISO 8601). Includes records at or after this time; cannot be in the future (400) |
Requires the all access level: a customer:get:own key gets 403. With lastMod, results are sorted by last-modified date, then ID. Paging works as described in Pagination, including the expired-cursor 409.
Example:
Code
Get Customer by ID
Endpoint: GET /customers/id/{id}
customer:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| id | string | Customer identifier |
Example:
Code
Get Customer by Phone Number
Endpoint: GET /customers/phonenumber/{phoneNumber}
customer:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| phoneNumber | string | Customer phone number (10 digits; anything else returns 400) |
Matches the customer's primary or secondary phone. The response's phone is the number that matched, and phones[] lists both.
Example:
Code
Get Customer ID by Phone Number
Endpoint: GET /customers/phonenumber/{phoneNumber}/id
customerid:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| phoneNumber | string | Customer phone number (10 digits) |
Example:
Code
Customer Credit Cards
Note: Card endpoints never return full card numbers — only masked values, expiration, and issuer.
Get All Cards for a Customer
Retrieve all credit cards on file for a customer.
Endpoint: GET /customers/id/{customerId}/cards
customercard:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| customerId | string | Customer identifier |
Example:
Code
Response:
Code
masked shows the first digit and the last four. issuer is derived from the first digit.
Get Card by ID
Retrieve a specific credit card by its ID.
Endpoint: GET /customers/id/{customerId}/cards/{cardId}
customercard:getPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| customerId | string | Customer identifier |
| cardId | string | Card identifier |
Example:
Code
Save a Credit Card
Save a credit card to a customer's account. The card number is stored encrypted, never in plain text, and is also tokenized with the payment gateway when the gateway supports it.
Endpoint: POST /customers/id/{customerId}/cards
customercard:postPath Parameters:
| Parameter | Type | Description |
|---|---|---|
| customerId | string | Customer identifier |
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
| cardNumber | string | Yes | Full card number. Must pass the card checksum (Luhn); spaces and dashes are ignored. Never stored raw |
| expMonth | integer | Yes | Expiration month (1-12) |
| expYear | integer | Yes | Expiration year (2-digit, e.g. 26 for 2026) |
| cvv | string | Yes | Card verification value (CVV/CVC) |
| name | string | No | Cardholder name (max 25 chars) |
| zip | string | No | Billing zip code (max 5 chars) |
| houseNumber | string | No | Billing house number for AVS verification (max 5 chars) |
Example:
Code
Response:
- Status Code:
201 Created - 400 - Invalid request, the gateway rejected the card, or the gateway does not support saving cards
- 404 - Customer not found
- 503 - The payment gateway is unreachable. The card was not saved; retry later
Customer Balance
Get Balance by Customer ID
Endpoint: GET /customers/id/{id}/balance
customerbalance:getRequires Customer PIN
This endpoint requires the X-Customer-Pin header. See Customer PIN.
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
| id | string | Customer identifier |
Headers:
| Header | Type | Required | Description |
|---|---|---|---|
| X-Customer-Pin | string (≤8) | Yes | Customer PIN for second-factor verification |
Example:
Code
Response:
Code
Note: A positive balance means the customer owes money. A negative balance means the store owes the customer.
Errors (both balance endpoints):
- 400 - Invalid phone number (phone variant)
- 401 - Missing or wrong
X-Customer-Pin, or the customer has no PIN on file - 404 - Customer not found, or not accessible with your API key
Get Balance by Phone Number
Endpoint: GET /customers/phonenumber/{phoneNumber}/balance
customerbalance:getRequires Customer PIN
This endpoint requires the X-Customer-Pin header. See Customer PIN.
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
| phoneNumber | string | Customer phone number (10 digits) |
Headers:
| Header | Type | Required | Description |
|---|---|---|---|
| X-Customer-Pin | string (≤8) | Yes | Customer PIN for second-factor verification |
Example:
Code
Customer Charges
Charge a Customer's Credit Card
Charge a stored or temporary credit card. The amount must be greater than zero — refunds are not supported via this endpoint.
Endpoint: POST /customers/id/{customerId}/charges
customercharge:postRequires Customer PIN
This endpoint requires the X-Customer-Pin header. See Customer PIN.
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
| customerId | string | Customer identifier |
Headers:
| Header | Type | Required | Description |
|---|---|---|---|
| X-Customer-Pin | string (≤8) | Yes | Customer PIN for second-factor verification |
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
| externalId | string | Yes | Client-provided unique ID (max 20 chars). Must be unique across all external IDs in the store, including orders, invoices, bills, and ones created by other API keys |
| amount | number | Yes | Amount to charge (0.01 - 99999.99) |
| cardId | string | Conditional | Stored card ID |
| card | object | Conditional | Temporary card details (same fields as Save Card request; houseNumber is ignored). The card is not saved |
Card Identification
Identify the card with one of two methods. If both are sent, cardId is used.
- By card ID: provide
cardId(stored card) - By temporary card: provide
cardobject with full card details
Retries
A retry with the same externalId returns 409, not the original result. It guarantees a charge is never taken twice, but keep the first response: the API won't return it again.
Example (charge by stored card ID):
Code
Response:
Code
amountCharged is what the gateway approved. It can be less than amount on a partial approval. maskedCardNumber is formatted by the gateway.
Status Codes:
- 200 - Charge approved
- 400 - Invalid request, or no usable card
- 401 - Missing or wrong
X-Customer-Pin, or the customer has no PIN on file - 402 - Card declined. The body carries
code: "card_declined", the gateway's reason, andprocessorCode - 404 - Customer or card not found
- 409 - A record with this
externalIdalready exists - 503 - The payment gateway is unreachable. Nothing was charged; retry later
Sale Records
Sale history is read one item at a time — there is no endpoint that returns the whole store's sales.
Access is granted by the store owner. The key needs salerecord:get:all, which also grants permissionlist:get:all. Bundle keys can't have it. The owner then opens Permission list in the dashboard, checks the items this key may look up, and saves. Checkbox changes take effect only on save; until then, the routes below return 403.
With access saved, reading history takes two calls:
| You want | Call |
|---|---|
| Which products may I query? | GET /permissionlist |
| History for one of those products | GET /salerecords |
Code
The x-tokens-used response header shows the credits charged: 0.1 per row returned by sale records, 0 for the permission list, 1 for ticket quantity.
Permission list
Endpoint: GET /permissionlist
permissionlist:getThe items this API key may query. size and unit carry the same meaning as in GET /products.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| take | integer | No | Page size, 1–100. Default 20. |
| cursor | string | No | Opaque. Omit on the first page. Pass the previous page's cursor unchanged after that. |
Example response:
Code
| Field | Meaning |
|---|---|
itemCode | Pass this as itemCode on sale records (primary UPC / SKU). |
description | Item description. |
brand | Brand. |
size | Numeric size. Omitted when the catalog size is zero. |
unit | Unit of measure for size. |
total | Match count. First page only (no cursor on the request). |
hasMore | Another page exists. |
cursor | Token for the next page. Ignore it unless hasMore is true. |
Example:
Code
Errors:
| Status | When |
|---|---|
| 403 | This key's permission list is empty. |
| 400 | take out of range, or cursor is not a token from this API. |
| 409 | The cursor has expired. Restart from the first page without cursor. |
Sale records
Endpoint: GET /salerecords
salerecord:getInvoice lines for a single itemCode. Money fields are per unit (line amount ÷ quantity), rounded to 2 decimals; a line with quantity 0 reports 0 for all of them. This response carries no total — keep paging while hasMore is true. Each returned row costs 0.1 credits, so a full page of 20 lines costs 2 credits.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| itemCode | string | Yes | From the permission list, or an alias of that item. |
| startDate | date | Yes | Inclusive start (YYYY-MM-DD). Not in the future (by the store's local date). |
| endDate | date | Yes | Inclusive end. On or after startDate; at most 31 days; not in the future. |
| take | integer | No | Page size, 1–100. Default 20. |
| cursor | string | No | Opaque. Reuse with the same itemCode, startDate, and endDate. |
Example response:
Code
| Field | Meaning |
|---|---|
invoiceNumber | Invoice that contains the line. |
date | Line date. |
quantity | Units sold on this line. |
unitPrice | Price per unit (line amount ÷ quantity). |
itemDiscount | Per-unit markdown on this line. Not a ticket total. |
allocatedSaleDiscount | This line's share of the sale-level discount, per unit. Not the whole ticket, and not a second line markdown. |
Example:
Code
Errors:
| Status | When |
|---|---|
| 400 | Missing/invalid dates, itemCode empty or too long, take out of range, or cursor does not match this item and date range. |
| 403 | This key's permission list is empty, or this itemCode is not on it. |
| 404 | Unknown itemCode. |
Vendors
Look up your suppliers and the products they sell. GET /vendors needs all access (403 otherwise); with own access, GET /vendors/id/{id} and its products return 404 for any vendor you have no bill with.
Own-access keys and the first bill
An own-access key can't look up a vendor until it has a bill with that vendor. For the first POST /bills, get the vendorCode from the store.
Get Vendors
Endpoint: GET /vendors
vendor:getPaginated, ordered by vendor code. Takes take (1–100, default 20) and cursor.
Get Vendor by Code
Endpoint: GET /vendors/id/{id}
vendor:getid is the vendor code. The response includes the vendor's address, contact, and payment terms.
Get Vendor Products
Endpoint: GET /vendors/id/{id}/products
vendorproduct:getThe vendor's catalog: item numbers, pack sizes, and prices, ordered by vendor item number. unitPrice is for a case or a single unit (pricedPer: Case or Each). Products the vendor no longer sells are included with active: false. Takes take and cursor.
Bills
Vendor bills (purchase invoices). You can read only the bills created with your API key.
Create Bill
Endpoint: POST /bills
createbill:post- Without
items: an expense, fee, or credit memo (negativeamount). - With
items: each item is received into stock and costed the way the back office does. The bill's amount is computed from the items, andamountin the request is the control total from the vendor's paper invoice. A negative itemquantityis a return: it reduces stock and never changes cost.
Payment terms are termsCode when given (see Payment Terms), otherwise the vendor's. A new bill starts OnHold until it is approved in the back office.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
| externalBillId | string | Yes | Your unique ID (max 20). Shared with order and invoice external IDs. |
| vendorCode | string | Yes | Vendor the bill is from (max 6). |
| invoiceNumber | string | Yes | The vendor's invoice number (max 12). The API won't create a second bill with the same vendor and number. |
| invoiceDate | date | Yes | Date on the vendor's invoice. |
| amount | number | Yes | Bill amount, or the control total when items is sent. Negative for a credit memo. -99,999,999.99 to 999,999,999.99, at most 2 decimals. The bill can be approved only when the control total equals the computed amount. |
| termsCode | string | No | Payment terms code (max 8). Defaults to the vendor's terms. |
| dueDate | date | No | Payment due date. |
| description | string | No | Short description (max 30). |
| notes | string | No | Free-form notes. |
| items | array | No | Received items, below. |
Item fields (up to 999 items; amounts at most 2 decimals):
| Field | Required | Description |
|---|---|---|
productId / productCode | One of them | Product ID (max 8) or code (max 12). If both are sent, productId wins. |
quantity | Yes | Cases, -999.99 to 9,999.99, not 0. Negative for a return. |
unitPrice | Yes | 0 to 9,999.99. |
pricedPer | No | Case (default) or Each. |
unitsPerCase | No | 0.01 to 9,999.99, default 1. |
itemsPerPack | No | 1 to 999, default 1. |
vendorItemNumber | No | Max 12. |
updateInventory / updateLastCost / updateAverageCost | No | All default true. updateInventory: false records the item on the bill only, and then cost is not updated either. |
Example:
Code
Errors:
| Status | When |
|---|---|
| 400 | Invalid request, an unknown product or termsCode, too many decimals, or invoiceDate on or before the store's closing date. If the store's closing date is today or later, every create is refused. |
| 404 | Vendor not found. |
| 409 | externalBillId already used, or the vendor already has a bill with this invoiceNumber (possibly one your key can't read). Nothing is created. |
Tip: A
409onexternalBillIdmakes retries safe. If you lost the response, find the bill withGET /bills/invoice-number. That finds nothing if the ID was taken by an order or invoice instead.
Get Bills
Endpoint: GET /bills
bill:getPaginated, each bill with its items. Credit memos are included. Filters: vendor, invoiceDateFrom, invoiceDateTo (inclusive, YYYY-MM-DD; from after to returns 400), plus take (1–100, default 20) and cursor. Send the same filters with cursor on every page. Bills have no last-modified date, so there is no incremental sync.
Get Bill by ID
Endpoint: GET /bills/id/{id}
bill:getid is the bill's id (max 8). 404 when it doesn't exist or wasn't created with your API key.
Get Bills by Vendor and Invoice Number
Endpoint: GET /bills/invoice-number?vendor=…&invoiceNumber=…
bill:getBoth vendor (max 6) and invoiceNumber (max 12) are required. Returns every match: the API won't create a duplicate, but older bills from the back office may share a number. 404 when nothing matches.
Bill fields: amount, controlTotal, amountPaid, amountCredited, discountTaken, and balance (zero when fully settled); status is OnHold or Approved; terms holds the payment terms.
Payment Terms
Endpoint: GET /payment-terms
paymentterms:getEvery payment terms code the store has defined, in one page. Use a code as termsCode when creating a bill.
| Field | Meaning |
|---|---|
code | Terms code, e.g. NET30. |
daysDue | Days until payment is due, counted from dueFrom (InvoiceDate, FollowingMonth, or EndOfWeek). |
discount | Early-payment discount, a percentage or a fixed amount (discountType: Percent or Amount). |
discountDays | Days after the invoice date the discount can still be taken. 0 means it never expires. |
Images
Get a link to an item's primary image, then fetch the image from that link. Links are valid for 7 to 8 days (use each link's expiresAt) and billed per item returned, so cache them. Images you upload go through review before they appear.
Get image URLs
Endpoint: GET /products/images?codes=…
imagescodes is a comma-separated list of item codes (primary UPC / SKU, as returned by the products endpoints). Send 1 to 50, each 1–64 characters of letters, digits, ., _ or -. Case does not matter and duplicates are ignored. The returned itemCode is lowercased, so compare codes case-insensitively. A key not yet linked to a store organization gets shared images only.
Response:
Code
Items without an image are listed in notFound and are not billed.
Code
Errors:
| Status | When |
|---|---|
| 400 | Missing or invalid codes, or more than 50. |
| 403 | This key does not have the images permission. |
| 429 | More than 60 calls per minute. This limit is shared with Upload status. |
| 502 / 504 | The image service failed or did not answer. Nothing was billed. |
Upload an image
Endpoint: POST /products/code/{code}/images
images:writeMultipart form with a file field (JPEG, PNG, WebP, AVIF or GIF, up to 10 MB; the format is detected from the bytes) and an optional filename (1–128 letters, digits, ., _ or -). Optionally send X-Actor-Id (max 128) and X-Actor-Email to record which of your staff uploaded it; they default to the API key and the account's email. The upload is not visible until a reviewer approves it, so the response is 202 with an uploadId to poll.
Code
Code
Errors:
| Status | When |
|---|---|
| 400 | Malformed request. |
| 403 | This key does not have the images:write permission, or images are not set up for this key yet (IMAGES_NOT_ENABLED). |
| 409 | This image is already uploaded for the item (duplicate_image; the body carries the existing image's id and status), or a file with this name already exists. |
| 413 | The file is over 10 MB. |
| 415 | Not an accepted image format (SVG is never accepted). |
| 429 | More than 20 uploads per minute. |
| 502 / 504 | The image service failed or did not answer within 30 seconds. |
Upload status
Endpoint: GET /images/uploads/{uploadId}
imagesCode
status is pending, approved (with a signed url and its expiresAt), rejected (with the reviewer's reason) or deleted. decidedScope is location (shown for your store only) or global (shared with every store).
Errors:
| Status | When |
|---|---|
| 400 | uploadId is not a valid UUID. |
| 403 | Images are not set up for this key yet (IMAGES_NOT_ENABLED). |
| 404 | Unknown upload. |
| 429 | More than 60 calls per minute, shared with Get image URLs. |
Images on demo keys
Demo keys never return real product images, and nothing you upload with one is saved. The endpoints answer in the same format as above, so you can build against them, with these differences:
| Endpoint | What a demo key gets |
|---|---|
| Get image URLs | A link to one of six sample images marked "DEMO IMAGE". They differ in size, format and quality, like real images, but they aren't of the product and don't show its code. The same code always gets the same sample. Every code gets one, so notFound is normally empty. Links expire as usual, and each item counts as 2 credits, paid by the demo account. |
| Upload an image | 202 with an uploadId, and the file is discarded. Only the 10 MB limit and the item code are checked, so anything else is accepted, even a file that isn't an image, and 409 and 415 never occur. |
| Upload status | pending for the first 30 seconds, then approved or rejected at random, about half each. The answer stays the same for that uploadId. An approved url links a sample image, not your file, and a rejected reason says the result was random. Any well-formed uploadId gets an answer, so 404 and deleted never occur. |
An approved demo upload never appears in Get image URLs. To test real images and real review, use a standard API key.
SMS
Send a text message from your store's own number. Each store's sending number is set up by POS with Logic; until it is, sends return 409. SMS works on every full plan, and it is the only thing the SMS-only plan covers.
Send a text
Endpoint: POST /sms
smsRequest body:
| Field | Type | Required | Description |
|---|---|---|---|
| to | string | Yes | Recipient phone number in E.164 form, e.g. +15551234567 |
| body | string | Yes | Message text |
The message always comes from your store's configured number; you cannot set the sender.
Code
Response (201):
Code
queued means the message was accepted for delivery, not yet that it arrived.
Billing: 1.45 credits per segment. Rejected texts are not billed.
What is a segment?
Text messages are sent in segments. A short message is one segment; a longer one is split into several segments and joined back together on the recipient's phone, so they still see a single message.
How many segments a message uses depends on its length and the characters in it:
| Message contains | One segment holds | Longer messages: each segment holds |
|---|---|---|
| Only standard characters (A–Z, a–z, 0–9, common punctuation) | 160 characters | 153 characters |
| Any emoji or special character (for example 😊, ✓, “curly quotes”, or letters from other alphabets such as Hebrew) | 70 characters | 67 characters |
Longer messages hold slightly fewer characters per segment because each segment carries a few characters of joining information.
A single emoji or special character switches the whole message to the 70-character limit.
Examples
| Message | Length | Segments |
|---|---|---|
| "Your order #4821 is ready for pickup." | 37 characters, standard | 1 |
| A 200-character order update, standard characters | 200 characters | 2 |
| "Your order is ready 😊" | 21 characters, with an emoji | 1 |
| A 100-character message with one emoji | 100 characters | 2 |
Tips to keep messages to one segment
- Keep messages under 160 characters.
- Avoid emoji and special symbols.
- Use straight quotes (" ') instead of curly quotes (“ ” ‘ ’), which are often added automatically when you copy text from Word or a phone.
A few standard characters count as two: ^ { } [ ] ~ \ | €.
Errors:
| Status | When |
|---|---|
| 400 | to or body is missing or blank, or the SMS provider rejected the message. A rejection carries the provider's numeric code and message, e.g. 21610 (the recipient replied STOP and has opted out) or 21211 (not a valid phone number). |
| 402 | No active usage plan, or your plan doesn't cover SMS. |
| 403 | This key does not have the sms permission. |
| 409 | SMS isn't set up for this store yet: no sending number is connected. Contact POS with Logic. |
| 503 | The SMS provider couldn't be reached or is throttling. Nothing was billed; try again after Retry-After seconds. The body's message says the store server is unreachable; for SMS it means the provider. |
Code
Best Practices
- Pagination - Use
takeandcursorparameters for large datasets - Rate Limiting - Honor the
Retry-Afterheader and implement exponential backoff for 429 errors (see Rate Limiting) - Webhooks - Respond within 30 seconds to avoid timeouts
- Incremental Sync - Use
lastModparameter to efficiently sync product updates - Payment Processing - Include
paymentEndpointto enable automated payment handling - Error Handling - Check HTTP status codes and handle errors appropriately
- Sale records - Page
GET /permissionlistfor a granteditemCode, thenGET /salerecordsfor that code over a window of at most 31 days (see Sale Records) - Images - Cache each returned URL until its
expiresAtinstead of re-requesting; uploads are reviewed before they appear (see Images)
Support
For API support or questions, email [email protected].
Sign Up to The Point
Our official periodical keeps you current on feature releases and company updates.