iRetail PRO store node 1.0.0-m1: preorders

6 операций

← Вся документация · Источник: контракты, openapi/store-v1.yaml на коммите 8000474.

Справочники на английском — на языке контрактов, из которых они созданы.

← iRetail PRO store node 1.0.0-m1

Операции

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 · Право preorder.manage

Параметры

Имя Где Тип Описание
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

Ответы

  • 200 OK object
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
GET /v1/preorders/{id} One preorder with its lines, window, payment and effective state.

operationId getPreorder · Право preorder.manage

Параметры

Имя Где Тип Описание
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 обязательный path string (uuid)

Ответы

POST /v1/preorders/{id}/ready Mark an accepted preorder picked; the customer gets preorder_ready (409 preorder_state otherwise).

operationId markPreorderReady · Право preorder.manage

Параметры

Имя Где Тип Описание
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 обязательный path string (uuid)

Ответы

  • 200 OK Preorder
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
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 · Право preorder.manage

Параметры

Имя Где Тип Описание
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 обязательный path string (uuid)

Тело запроса обязательный

  • application/json object

Ответы

  • 200 OK Preorder
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
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 · Право receipt.sell

Параметры

Имя Где Тип Описание
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 обязательный path string (uuid)
Idempotency-Key header string spec/API.md, Idempotency.

Тело запроса обязательный

Ответы

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 · Право receipt.refund

Параметры

Имя Где Тип Описание
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 обязательный path string (uuid)
Idempotency-Key header string spec/API.md, Idempotency.

Тело запроса обязательный

Ответы

Схемы

Error object

Every error response.

error обязательный string Stable code, see spec/API.md.
message обязательный 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 обязательный integer
item_id обязательный string (uuid)
name обязательный LocalizedText
quantity_milli обязательный integer (int64)
unit_price_minor обязательный integer (int64) The store's price when the preorder was made.

PreorderPayment object

method обязательный "at_pickup" | "online"
status обязательный "none" | "pending" | "authorized" | "failed" | "released" | "captured"
authorized_minor обязательный integer (int64)
captured_minor обязательный integer (int64)
refunded_minor обязательный integer (int64)
checkout_url обязательный string (uri) | null The provider's hosted page while the payment is pending; null otherwise.
expires_at обязательный string (date-time) | null

Preorder object

id обязательный string (uuid)
number обязательный string
store_id обязательный string (uuid)
customer_name_masked обязательный string | null
lines обязательный array of PreorderLine
window обязательный PreorderWindow
payment обязательный PreorderPayment
note обязательный string | null
state обязательный PreorderState
reason обязательный string | null refused: short or unanswered; canceled: customer, payment_not_completed, or a person's text.
store_state обязательный PreorderStoreState | null What the store wrote (the lines short, the receipt that handed it over), or null before it answered.
created_at обязательный string (date-time)
version обязательный integer (int64)

PreorderWindow object

start обязательный string (date-time)
end обязательный string (date-time)

PaymentCapture object

receipt_id обязательный string (uuid)
amount_minor обязательный integer (int64) The receipt's online tender, min(the receipt's total, authorized) (422 payment_mismatch otherwise).

PaymentRefund object

receipt_id обязательный string (uuid) The refund or void receipt.
amount_minor обязательный 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 обязательный string (uuid)
state обязательный "accepted" | "refused" | "ready" | "handed_over" | "expired" | "canceled"
reason обязательный string | null
short_lines обязательный array of object
receipt_id обязательный string (uuid) | null
at обязательный string (date-time)
version обязательный integer (int64)