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.

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
totalAmountNumberFinal bill amount after tax and service charges
taxNumberTax applied to the bill
tipNumberGratuity added by the guest
discountNumberAny applied discounts
paymentMethodStringPayment method: card, cash, etc.

Order and check statuses

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