Skip to main content

API Basics

Authentication​

All API requests must include a Bearer token in the Authorization header.

Authorization: Bearer {api_key}
  • Only HTTPS requests are accepted.
  • Your API key will be provided by Mozrest during onboarding.

Dates and timezones​

All dates and times exchanged with Mozrest are in UTC. Mozrest never sends venue local time, and no value must be read as local time. Converting to the venue's local time is the responsibility of the POS: use the venue's timezone setting in your system, not a fixed offset, so daylight saving changes are handled correctly.

Two formats are used:

FormatExampleFields
Y-m-d H:i:s, UTC, no offset and no Z2026-10-15 09:45:00date on Create Order
ISO 8601, UTC, Z suffix2026-10-15T09:45:00Zfrom and until on List Orders; createdAt, updatedAt and closedAt on order responses

Example: a booking at 13:45 in Dubai (UTC+4) is sent as 2026-10-15 09:45:00.

Errors​

Mozrest uses standard HTTP response codes.

CodeStateDescription
400Bad RequestInvalid or missing required parameters
401UnauthorizedAPI key is missing or incorrect
403ForbiddenValid request but insufficient permissions
404Not FoundThe requested resource does not exist
409ConflictRequest conflicts with current state (e.g. table already occupied)
500Server ErrorUnexpected server-side error
503UnavailableTemporary server overload or maintenance

Error response format​

{
"error": {
"code": 400,
"message": "Validation failed",
"details": {
"checks": [
{ "checkNumber": ["This value should not be blank."] }
]
}
}
}

Best practices​

  • Validate request payloads before submission.
  • Implement retries with exponential backoff for 500 and 503 errors.
  • Log and monitor all 4xx and 5xx errors.

Forward Compatibility​

Mozrest may add new fields to request and response payloads at any time. These additions are not considered breaking changes.

Your integration must:

  • Ignore unknown fields — do not reject or fail when receiving properties that are not in your current implementation.
  • Use lenient deserialization — avoid strict schema validation that would break on new fields.

Mozrest will never make backward-incompatible changes (removing fields, changing types, or altering semantics of existing fields) without prior notice and a migration plan.

Definitions​

Payment details​

Payment information sent from the POS should include:

FieldTypeDescription
totalAmountNumberSum of the check's line items (subtotal). Excludes tax and tip, before discount is deducted.
taxNumberTax applied to the bill
tipNumberGratuity added by the guest
discountNumberAny applied discounts
paymentMethodStringPayment method: card, cash, etc.

Mozrest derives the settled bill amount as totalAmount + tax + tip − discount. Line-item prices are tax- and discount-exclusive, so the sum of a check's items equals its totalAmount.

Split tender​

paymentMethod is an informational label — Mozrest does not reconcile per tender. If a bill is split into separate checks in the POS, report multiple checks, each with its own paymentMethod. If a single check is settled with more than one payment method, keep it as one check and report a single label (recommended: split). Do not create artificial checks to represent tenders.

Order and check statuses​

StatusApplies toMeaning
openOrder / CheckActive and in progress
closedOrder / CheckCompleted and paid
voidCheckCancelled / voided