iRetail PRO store node 1.0.0-m1: preorders
6 operations
← All documentation · Source: contracts openapi/store-v1.yaml at 8000474.
← iRetail PRO store node 1.0.0-m1
Operations
GET
/v1/preorders
The store's preorders by their effective state (spec/PREORDERS.md), soonest window first; at the hub every store's, store_id filtering.
operationId
listPreorders · Permission preorder.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
state
|
query | PreorderState |
|
number
|
query | string |
|
from
|
query | string (date-time) |
Windows starting at or after this time. |
to
|
query | string (date-time) |
Windows starting before this time. |
store_id
|
query | string (uuid) |
At the hub, one store's. |
after
|
query | string |
|
limit
|
query | integer |
Responses
GET
/v1/preorders/{id}
One preorder with its lines, window, payment and effective state.
operationId
getPreorder · Permission preorder.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id required
|
path | string (uuid) |
Responses
POST
/v1/preorders/{id}/ready
Mark an accepted preorder picked; the customer gets preorder_ready (409 preorder_state otherwise).
operationId
markPreorderReady · Permission preorder.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id required
|
path | string (uuid) |
Responses
POST
/v1/preorders/{id}/cancel
Cancel a preorder with a reason: its holds are given back, an authorization released, and the customer gets preorder_canceled. At the hub the cancel crosses to the store; 409 preorder_state for a final one.
operationId
cancelPreorder · Permission preorder.manage
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id required
|
path | string (uuid) |
Request body required
application/jsonobject
Responses
POST
/v1/preorders/{id}/payment/capture
Capture a preorder's online payment for the receipt that hands it over (spec/PAYMENTS_ONLINE.md, Capture): served by the owner, which a store of a chain forwards it to; the store's node calls it while recording the receipt, the register never. 409 capture_failed, 422 payment_refused (provider_code).
operationId
capturePreorderPayment · Permission receipt.sell
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id required
|
path | string (uuid) |
|
Idempotency-Key
|
header | string |
spec/API.md, Idempotency. |
Request body required
application/jsonPaymentCapture
Responses
POST
/v1/preorders/{id}/payment/refund
Refund part of a captured online payment for a refund or void receipt (spec/PAYMENTS_ONLINE.md, Refunds); served by the owner, forwarded by a store of a chain. 422 refund_exceeds_payment (remaining), payment_refused.
operationId
refundPreorderPayment · Permission receipt.refund
Parameters
| Name | In | Type | Description |
|---|---|---|---|
IRetail-App
|
header | string |
Which app sends the request, at which version: <app>/<version>, optionally a space and (<platform>), as cashier/1.2.0 (windows-x64) or manager/1.2.0 (web). The register (cashier), the back office and the console (manager) and the device gateway (gateway) send it on every request; a request without it is not one of the apps and is served as the current API, and a device token of an app's kind without it is an app of an unknown version; a header that does not parse counts as absent. The node may refuse an app 426 app_update_required by it, except on the operations marked x-app-update-exempt. Not a security boundary (spec/API.md, Transport; spec/RELEASES.md, Who is asking). |
id required
|
path | string (uuid) |
|
Idempotency-Key
|
header | string |
spec/API.md, Idempotency. |
Request body required
application/jsonPaymentRefund
Responses
Schemas
Error object
Every error response.
error required
|
string |
Stable code, see spec/API.md. |
message required
|
string |
English text for logs. |
details
|
object |
LocalizedText map of string
Text by language code; the organization's default language must be present.
PreorderState "awaiting_payment" | "placed" | "accepted" | "refused" | "ready" | "handed_over" | "expired" | "canceled"
The effective state (spec/PREORDERS.md, States).
awaiting_payment · placed · accepted · refused · ready · handed_over · expired · canceled
PreorderLine object
line_no required
|
integer |
|
item_id required
|
string (uuid) |
|
name required
|
LocalizedText |
|
quantity_milli required
|
integer (int64) |
|
unit_price_minor required
|
integer (int64) |
The store's price when the preorder was made. |
PreorderPayment object
method required
|
"at_pickup" | "online" |
|
status required
|
"none" | "pending" | "authorized" | "failed" | "released" | "captured" |
|
authorized_minor required
|
integer (int64) |
|
captured_minor required
|
integer (int64) |
|
refunded_minor required
|
integer (int64) |
|
checkout_url required
|
string (uri) | null |
The provider's hosted page while the payment is pending; null otherwise. |
expires_at required
|
string (date-time) | null |
Preorder object
id required
|
string (uuid) |
|
number required
|
string |
|
store_id required
|
string (uuid) |
|
customer_name_masked required
|
string | null |
|
lines required
|
array of PreorderLine |
|
window required
|
PreorderWindow |
|
payment required
|
PreorderPayment |
|
note required
|
string | null |
|
state required
|
PreorderState |
|
reason required
|
string | null |
refused: short or unanswered; canceled: customer, payment_not_completed, or a person's text. |
store_state required
|
PreorderStoreState | null |
What the store wrote (the lines short, the receipt that handed it over), or null before it answered. |
created_at required
|
string (date-time) |
|
version required
|
integer (int64) |
PreorderWindow object
start required
|
string (date-time) |
|
end required
|
string (date-time) |
PaymentCapture object
receipt_id required
|
string (uuid) |
|
amount_minor required
|
integer (int64) |
The receipt's online tender, min(the receipt's total, authorized) (422 payment_mismatch otherwise). |
PaymentRefund object
receipt_id required
|
string (uuid) |
The refund or void receipt. |
amount_minor required
|
integer (int64) |
PreorderStoreState object
What the store did with a preorder, the store-owned record that crosses to the hub (spec/PREORDERS.md, Where it lives); its id the preorder's.
preorder_id required
|
string (uuid) |
|
state required
|
"accepted" | "refused" | "ready" | "handed_over" | "expired" | "canceled" |
|
reason required
|
string | null |
|
short_lines required
|
array of object |
|
receipt_id required
|
string (uuid) | null |
|
at required
|
string (date-time) |
|
version required
|
integer (int64) |