iRetail PRO store node 1.0.0-m1: tax-rates

9 операций

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

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

← iRetail PRO store node 1.0.0-m1

Операции

GET /v1/tax-rates Tax rates of this store.

operationId listTaxRates · Право store.read

Параметры

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

Ответы

  • 200 OK array of TaxRate
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
PUT /v1/tax-rates/{code} Create or change a tax rate.

operationId putTaxRate · Право store.edit

Параметры

Имя Где Тип Описание
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).
code обязательный path string Tax code.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

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

Ответы

DELETE /v1/tax-rates/{code} Delete a tax rate no item or service charge uses (409 conflict otherwise).

operationId deleteTaxRate · Право store.edit

Параметры

Имя Где Тип Описание
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).
code обязательный path string Tax code.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

Ответы

  • 204 Done
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
GET /v1/tax-provider Where this store's tax rates come from, and how the last sync went (spec/TAX.md).

operationId getTaxProvider · Право store.read

Параметры

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

Ответы

PUT /v1/tax-provider Set the tax service that fills this store's rates; the key is only named.

operationId putTaxProvider · Право store.edit

Параметры

Имя Где Тип Описание
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).
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

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

Ответы

POST /v1/tax-provider/sync Ask the tax service for the rates now; answers the status after the attempt.

operationId syncTaxProvider · Право store.edit

Параметры

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

Ответы

GET /v1/deposits Container deposits of this store (spec/TAX.md).

operationId listDeposits · Право store.read

Параметры

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

Ответы

  • 200 OK array of Deposit
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
PUT /v1/deposits/{code} Create or change a container deposit.

operationId putDeposit · Право store.edit

Параметры

Имя Где Тип Описание
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).
code обязательный path string Deposit code.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

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

Ответы

  • 200 OK Deposit
  • 400 Error (spec/API.md). Error
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error
DELETE /v1/deposits/{code} Delete a deposit no item names.

operationId deleteDeposit · Право store.edit

Параметры

Имя Где Тип Описание
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).
code обязательный path string Deposit code.
Approval-Token header string One-time approval from POST /v1/approvals for this operation's permission.

Ответы

  • 204 Done
  • 401 Error (spec/API.md). Error
  • 403 Error (spec/API.md). Error
  • 404 Error (spec/API.md). Error
  • 409 Error (spec/API.md). Error

Схемы

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.

TaxRate object

code обязательный string
rate_ppm обязательный integer
name обязательный LocalizedText
jurisdiction обязательный "state" | "county" | "city" | "district" | null The taxing jurisdiction (spec/TAX.md); null for a code that is not a US jurisdiction.
categories обязательный array of TaxCategory | null The categories the code taxes; null for every category.
exempt_categories обязательный array of TaxCategory
holidays обязательный array of TaxHoliday

TaxRatePut object

The fields beyond rate and name default to a code with no jurisdiction that taxes every category, always.

rate_ppm обязательный integer
name обязательный LocalizedText
jurisdiction "state" | "county" | "city" | "district" | null The taxing jurisdiction (spec/TAX.md); null for a code that is not a US jurisdiction.
categories array of TaxCategory | null The categories the code taxes; null for every category.
exempt_categories array of TaxCategory
holidays array of TaxHoliday

TaxProviderAddress object

line1 обязательный string
city обязательный string
region обязательный string
postal_code обязательный string

TaxProviderPut object

provider обязательный "avalara" | "taxjar" | null
account_id string | null Avalara's account number; null for TaxJar.
key_name string | null The node reads the key from IRETAIL_TAX_KEY_<NAME> or the file IRETAIL_TAX_KEY_<NAME>_FILE names; never the key itself.
sandbox boolean
address TaxProviderAddress | null
mapping object Which tax code takes each jurisdiction's rate.

TaxRateChange object

code обязательный string
from_ppm обязательный integer
to_ppm обязательный integer

TaxProviderStatus object

state обязательный "never" | "ok" | "failed"
last_attempt_at обязательный string (date-time) | null
last_success_at обязательный string (date-time) | null
error обязательный "key_missing" | "provider_unreachable" | "provider_refused" | "bad_answer" | null
changed обязательный array of TaxRateChange The codes the last successful sync moved, in store order.

TaxProvider object

provider обязательный "avalara" | "taxjar" | null
account_id обязательный string | null Avalara's account number; null for TaxJar.
key_name обязательный string | null The node reads the key from IRETAIL_TAX_KEY_<NAME> or the file IRETAIL_TAX_KEY_<NAME>_FILE names; never the key itself.
key_present обязательный boolean Whether the node finds the named key; the key never leaves the node.
sandbox обязательный boolean
address обязательный TaxProviderAddress | null
mapping обязательный object Which tax code takes each jurisdiction's rate.
status обязательный TaxProviderStatus

TaxCategory "general" | "grocery" | "prepared_food" | "candy" | "soft_drink" | "dietary_supplement" | "clothing" | "otc_drug" | "rx_drug" | "medical_equipment" | "alcohol" | "tobacco" | "nontaxable"

An item's tax category (spec/TAX.md, "Item categories").

general · grocery · prepared_food · candy · soft_drink · dietary_supplement · clothing · otc_drug · rx_drug · medical_equipment · alcohol · tobacco · nontaxable

TaxHoliday object

A window when the code does not tax some categories (spec/TAX.md, "Tax holidays").

from обязательный string (date)
to обязательный string (date)
categories обязательный array of TaxCategory
max_unit_price_minor обязательный integer (int64) | null

Deposit object

A container deposit a state requires (spec/TAX.md, "Container deposits").

code обязательный string
name обязательный LocalizedText
amount_minor обязательный integer (int64)
taxable обязательный boolean Whether the deposit joins the line's tax base for the codes the line carries.

DepositPut object

name обязательный LocalizedText
amount_minor обязательный integer (int64)
taxable обязательный boolean