Schema
Order
An immutable captured purchase and its current capture/void status. Every monetary field, line-item total and modifier total uses currency_code.
Overview
Properties
uuid
The platform's unique identifier for the captured purchase.
uuid
Yes
source_reference
The case-sensitive integration reference that uniquely identifies this order within the merchant.
^[\x21-\x7E]+$
1
255
display_reference
The optional human-facing order reference shown to merchant staff. This does not identify the order or replace `source_reference`.
YQ-5
255
Yes
source_url
The optional HTTPS URL at which merchant staff can view the order in the source platform.
uri
https://merchant.yqueue.app/orders/order-1000
^https://
2048
Yes
status
References Order Status.
outlet
The associated outlet, with its current name.
References Outlet Reference.
customer
The associated customer, or `null` if the customer has since been deleted. The name reflects the current customer profile.
Yes
One of
One of 1
One of 2
References Customer Reference.
currency_code
The merchant's ISO 4217 alpha-3 currency code.
3
3
line_items
1
65535
Array items
Items
References Order Line Item.
total_amount
The original captured purchase total, retained after full void.
All of
All of 1
References Money.
All of 2
Nested properties
amount
0
4294967295
qualifying_amount
The original captured qualifying amount. A full void removes its contribution while retaining this value.
All of
All of 1
References Money.
All of 2
Nested properties
amount
0
4294967295
eligible_amount
Discounted eligible sale value before refunds, excluding taxes, service charges, tips and top-ups. Payment using stored value qualifies. Cannot exceed total_amount; null means not supplied. Independent of qualifying_amount. Cashback-funded spend is excluded by the producer; no funding breakdown is inferred.
Yes
One of
One of 1
One of 2
All of
All of 1
References Money.
All of 2
Nested properties
amount
0
4294967295
quantity_evaluations
Frozen per-program evaluations, including zero awards. Empty when no quantity program applied. Use source_order_uuid on operation or ledger searches to retrieve actual base and bonus movements. Tier gift outcomes remain on customer tier achievements.
Array items
Items
References Order Quantity Evaluation.
cashback_evaluations
Frozen cashback evaluations, including zero awards. Empty when no cashback program applied; source_order_uuid history filters expose actual earning/bonus/void/expiry movements.
Array items
Items
References Order Cashback Evaluation.
completed_at
The captured purchase completion timestamp in UTC, retained after full void.
date-time
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
cancelled_at
The UTC processing time of the terminal full void, or null while captured.
date-time
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
Yes
metadata
Integration-specific context retained with the immutable capture.
Yes
One of
One of 1
One of 2
One of 3
Array items
Items
created_at
The UTC date-time at which the order was first submitted.
date-time
Yes
updated_at
The UTC date-time at which the capture or its void was recorded.
date-time
Yes
Used by
Raw YAML
title: Order
type: object
x-tags:
- Models
description: An immutable captured purchase and its current capture/void status. Every monetary field, line-item total and modifier total uses `currency_code`.
required:
- uuid
- source_reference
- display_reference
- source_url
- status
- outlet
- customer
- currency_code
- line_items
- total_amount
- qualifying_amount
- eligible_amount
- quantity_evaluations
- completed_at
- cancelled_at
- metadata
- created_at
- updated_at
- cashback_evaluations
properties:
uuid:
type: string
format: uuid
readOnly: true
description: The platform's unique identifier for the captured purchase.
source_reference:
type: string
minLength: 1
maxLength: 255
pattern: '^[\x21-\x7E]+$'
description: The case-sensitive integration reference that uniquely identifies this order within the merchant.
display_reference:
type:
- string
- 'null'
maxLength: 255
example: YQ-5
description: The optional human-facing order reference shown to merchant staff. This does not identify the order or replace `source_reference`.
source_url:
type:
- string
- 'null'
format: uri
pattern: '^https://'
maxLength: 2048
example: 'https://merchant.yqueue.app/orders/order-1000'
description: The optional HTTPS URL at which merchant staff can view the order in the source platform.
status:
$ref: ./OrderStatus.yaml
outlet:
$ref: ./OutletReference.yaml
description: The associated outlet, with its current name.
customer:
oneOf:
- type: 'null'
- $ref: ./CustomerReference.yaml
description: The associated customer, or `null` if the customer has since been deleted. The name reflects the current customer profile.
currency_code:
type: string
minLength: 3
maxLength: 3
description: The merchant's ISO 4217 alpha-3 currency code.
line_items:
type: array
minItems: 1
maxItems: 65535
items:
$ref: ./OrderLineItem.yaml
total_amount:
allOf:
- $ref: ./Money.yaml
- type: object
properties:
amount:
minimum: 0
maximum: 4294967295
description: The original captured purchase total, retained after full void.
qualifying_amount:
allOf:
- $ref: ./Money.yaml
- type: object
properties:
amount:
minimum: 0
maximum: 4294967295
description: The original captured qualifying amount. A full void removes its contribution while retaining this value.
eligible_amount:
oneOf:
- type: 'null'
- allOf:
- $ref: ./Money.yaml
- type: object
properties:
amount:
minimum: 0
maximum: 4294967295
description: Discounted eligible sale value before refunds, excluding taxes, service charges, tips and
top-ups. Payment using stored value qualifies. Cannot exceed total_amount; null means not supplied.
Independent of qualifying_amount. Cashback-funded spend is excluded by the producer; no funding breakdown is
inferred.
quantity_evaluations:
type: array
description: Frozen per-program evaluations, including zero awards. Empty when no quantity program applied. Use source_order_uuid on operation or ledger searches to retrieve actual base and bonus movements. Tier gift outcomes remain on customer tier achievements.
items:
$ref: ./OrderQuantityEvaluation.yaml
cashback_evaluations:
type: array
items:
$ref: ./OrderCashbackEvaluation.yaml
description: Frozen cashback evaluations, including zero awards. Empty when no cashback program applied;
source_order_uuid history filters expose actual earning/bonus/void/expiry movements.
completed_at:
type: string
format: date-time
pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$'
description: The captured purchase completion timestamp in UTC, retained after full void.
cancelled_at:
type:
- string
- 'null'
format: date-time
pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$'
description: The UTC processing time of the terminal full void, or null while captured.
metadata:
oneOf:
- type: 'null'
- type: object
additionalProperties: true
- type: array
items: {}
description: Integration-specific context retained with the immutable capture.
created_at:
type: string
format: date-time
readOnly: true
description: The UTC date-time at which the order was first submitted.
updated_at:
type: string
format: date-time
readOnly: true
description: The UTC date-time at which the capture or its void was recorded.