Price lists
Prices per customer and currency: an entity's price lists, each in one currency, with prices of its products in volume tiers from a day, and the list each customer takes in a currency. A sales line proposes the customer's price before the list price; it still states its own. Nothing here posts.
| Operation | Summary | Scope | Idempotency-Key |
|---|---|---|---|
GET /v1/entities/{entity}/customers/{party}/price-lists |
List a customer's price lists | read |
|
PUT /v1/entities/{entity}/customers/{party}/price-lists/{currency} |
Give a customer a price list | draft |
|
DELETE /v1/entities/{entity}/customers/{party}/price-lists/{currency} |
Take a customer's price list away | draft |
|
GET /v1/price-lists |
List price lists | read |
|
POST /v1/price-lists |
Create a price list | draft |
required |
GET /v1/price-lists/{price_list_id} |
Get a price list | read |
|
PATCH /v1/price-lists/{price_list_id} |
Change a price list | draft |
|
POST /v1/price-lists/{price_list_id}/prices |
Record a price on a price list | draft |
required |
GET /v1/entities/{entity}/customers/{party}/price-lists
List a customer's price lists
The price list the customer takes in each currency, by currency (at most one per currency). 404 for an unknown customer. Read-only.
| Required scope | read (admin implies every scope) |
| Operation id | list_customer_price_lists_v1_entities__entity__customers__party__price_lists_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | entity |
string | yes | Entity code, e.g. CH01 (GET /v1/entities). |
| path | party |
string | yes | Customer code, e.g. C-DE, or its id. A vendor is not a customer: its statement is GET .../vendors/{party}/statement. |
Example request
curl "$ERP_URL/v1/entities/CH01/customers/C-DE/price-lists" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of CustomerPriceListOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"active": true,
"assigned_at": "2026-01-01T08:00:00Z",
"assigned_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"currency": "CHF",
"name": "Wholesale CHF",
"price_list": "WHOLESALE-CHF",
"price_list_id": "8e1f2a3b-4c5d-4e6f-9a7b-8c9d0e1f2a3b"
}
]
PUT /v1/entities/{entity}/customers/{party}/price-lists/{currency}
Give a customer a price list
The customer takes the list in the currency, in place of the one it had in it (audited with the previous list). Safe to repeat: giving it the list it has changes nothing. 422 when the list is in another currency; 409 when it is inactive; 404 for an unknown customer or list.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | set_customer_price_list_v1_entities__entity__customers__party__price_lists__currency__put |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | entity |
string | yes | Entity code, e.g. CH01 (GET /v1/entities). |
| path | party |
string | yes | Customer code, e.g. C-DE, or its id. A vendor is not a customer: its statement is GET .../vendors/{party}/statement. |
| path | currency |
string | yes | ISO 4217 code, e.g. CHF. (pattern ^[A-Z]{3}$) |
Request body
application/json (required): CustomerPriceListSet
| Field | Type | Required | Description |
|---|---|---|---|
price_list |
string | yes | Code (or id) of an active price list of the customer's entity in the currency of the path. |
Example request
curl -X PUT "$ERP_URL/v1/entities/CH01/customers/C-DE/price-lists/CHF" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Content-Type: application/json" \
-d '{
"price_list": "WHOLESALE-CHF"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | CustomerPriceListOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"active": true,
"assigned_at": "2026-01-01T08:00:00Z",
"assigned_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"currency": "CHF",
"name": "Wholesale CHF",
"price_list": "WHOLESALE-CHF",
"price_list_id": "8e1f2a3b-4c5d-4e6f-9a7b-8c9d0e1f2a3b"
}
DELETE /v1/entities/{entity}/customers/{party}/price-lists/{currency}
Take a customer's price list away
The customer takes no price list in the currency any more: its lines propose the list price again (audited with the previous list). Safe to repeat. 404 for an unknown customer.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | remove_customer_price_list_v1_entities__entity__customers__party__price_lists__currency__delete |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | entity |
string | yes | Entity code, e.g. CH01 (GET /v1/entities). |
| path | party |
string | yes | Customer code, e.g. C-DE, or its id. A vendor is not a customer: its statement is GET .../vendors/{party}/statement. |
| path | currency |
string | yes | ISO 4217 code, e.g. CHF. (pattern ^[A-Z]{3}$) |
Example request
curl -X DELETE "$ERP_URL/v1/entities/CH01/customers/C-DE/price-lists/CHF" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 204 | No content | |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
GET /v1/price-lists
List price lists
The entities' price lists by code, each with every price (by product, tier and the newest first) and the customers that take it. Read-only.
| Required scope | read (admin implies every scope) |
| Operation id | list_price_lists_v1_price_lists_get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | entity |
string or null | Only this entity's lists (code or id). | |
| query | active |
boolean or null | true: only those in use; false: only inactive ones. |
|
| query | limit |
integer | How many, by code. (min 1; max 1000; default 100) |
Example request
curl "$ERP_URL/v1/price-lists" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | array of PriceListOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
[
{
"active": true,
"code": "WHOLESALE-CHF",
"created_at": "2026-01-01T08:00:00Z",
"created_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"currency": "CHF",
"customers": [
{
"code": "C-CH",
"name": "Zürich Kunde AG",
"party_id": "0a1b2c3d-4e5f-4a6b-8c7d-8e9f0a1b2c3d"
}
],
"entity": "CH01",
"id": "8e1f2a3b-4c5d-4e6f-9a7b-8c9d0e1f2a3b",
"name": "Wholesale CHF",
"prices": [
{
"created_at": "2026-01-01T08:00:00Z",
"created_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"id": "9f2a3b4c-5d6e-4f7a-8b8c-9d0e1f2a3b4c",
"min_quantity": "1",
"product": "SCANNER",
"product_id": "5b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0e",
"unit_price": "229",
"valid_from": "2026-01-01"
}
]
}
]
POST /v1/price-lists
Create a price list
A price list of an entity in one currency, optionally with its first prices (each of a
product of the entity, for a quantity from a minimum on, from a day). 409 when the entity has
a list with the code; 404 for an unknown product; 422 for a price without the period its
product's kind needs. Nothing is posted. Needs an Idempotency-Key.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | create_price_list_v1_price_lists_post |
Request body
application/json (required): PriceListInput
| Field | Type | Required | Description |
|---|---|---|---|
entity |
string | yes | Code (or id) of the entity whose products it prices. |
code |
string or null | Unique in the entity and never changed. Omitted: made from the name (Wholesale CHF is WHOLESALE-CHF). (pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,39}$) |
|
name |
string | yes | What it is called. (min length 1; max length 200) |
currency |
string or null | ISO 4217 code of all its prices; never changed. Omitted: the entity's functional currency. (pattern ^[A-Z]{3}$) |
|
prices |
array of PriceListPriceInput |
Prices to record with it. (max items 200) |
Example request
curl -X POST "$ERP_URL/v1/price-lists" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"code": "WHOLESALE-CHF",
"currency": "CHF",
"entity": "CH01",
"name": "Wholesale CHF",
"prices": [
{
"product": "SCANNER",
"unit_price": "229.00"
},
{
"min_quantity": "10",
"product": "SCANNER",
"unit_price": "209.00"
}
]
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | PriceListOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"active": true,
"code": "WHOLESALE-CHF",
"created_at": "2026-01-01T08:00:00Z",
"created_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"currency": "CHF",
"customers": [
{
"code": "C-CH",
"name": "Zürich Kunde AG",
"party_id": "0a1b2c3d-4e5f-4a6b-8c7d-8e9f0a1b2c3d"
}
],
"entity": "CH01",
"id": "8e1f2a3b-4c5d-4e6f-9a7b-8c9d0e1f2a3b",
"name": "Wholesale CHF",
"prices": [
{
"created_at": "2026-01-01T08:00:00Z",
"created_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"id": "9f2a3b4c-5d6e-4f7a-8b8c-9d0e1f2a3b4c",
"min_quantity": "1",
"product": "SCANNER",
"product_id": "5b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0e",
"unit_price": "229",
"valid_from": "2026-01-01"
}
]
}
GET /v1/price-lists/{price_list_id}
Get a price list
One price list with every price and its customers. 404 when it does not exist.
| Required scope | read (admin implies every scope) |
| Operation id | get_price_list_v1_price_lists__price_list_id__get |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | price_list_id |
string (uuid) | yes | Id of the price list (GET /v1/price-lists). |
Example request
curl "$ERP_URL/v1/price-lists/8e1f2a3b-4c5d-4e6f-9a7b-8c9d0e1f2a3b" \
-H "Authorization: Bearer $ERP_KEY"
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | PriceListOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"active": true,
"code": "WHOLESALE-CHF",
"created_at": "2026-01-01T08:00:00Z",
"created_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"currency": "CHF",
"customers": [
{
"code": "C-CH",
"name": "Zürich Kunde AG",
"party_id": "0a1b2c3d-4e5f-4a6b-8c7d-8e9f0a1b2c3d"
}
],
"entity": "CH01",
"id": "8e1f2a3b-4c5d-4e6f-9a7b-8c9d0e1f2a3b",
"name": "Wholesale CHF",
"prices": [
{
"created_at": "2026-01-01T08:00:00Z",
"created_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"id": "9f2a3b4c-5d6e-4f7a-8b8c-9d0e1f2a3b4c",
"min_quantity": "1",
"product": "SCANNER",
"product_id": "5b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0e",
"unit_price": "229",
"valid_from": "2026-01-01"
}
]
}
PATCH /v1/price-lists/{price_list_id}
Change a price list
Rename it, or active: false to stop lines proposing its prices (it is never deleted;
its customers keep it, unused, until it is active again or they are given another). Its
entity, code and currency never change. Audited with the previous values.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | not used |
| Operation id | update_price_list_v1_price_lists__price_list_id__patch |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | price_list_id |
string (uuid) | yes | Id of the price list (GET /v1/price-lists). |
Request body
application/json (required): PriceListUpdate
| Field | Type | Required | Description |
|---|---|---|---|
name |
string or null | New name. (min length 1; max length 200) | |
active |
boolean or null | false: no line proposes its prices and no customer is newly given it; true: it is used again. |
Example request
curl -X PATCH "$ERP_URL/v1/price-lists/8e1f2a3b-4c5d-4e6f-9a7b-8c9d0e1f2a3b" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Wholesale CHF 2027"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | OK | PriceListOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"active": true,
"code": "WHOLESALE-CHF",
"created_at": "2026-01-01T08:00:00Z",
"created_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"currency": "CHF",
"customers": [
{
"code": "C-CH",
"name": "Zürich Kunde AG",
"party_id": "0a1b2c3d-4e5f-4a6b-8c7d-8e9f0a1b2c3d"
}
],
"entity": "CH01",
"id": "8e1f2a3b-4c5d-4e6f-9a7b-8c9d0e1f2a3b",
"name": "Wholesale CHF",
"prices": [
{
"created_at": "2026-01-01T08:00:00Z",
"created_by": {
"id": "user:alice",
"name": "Alice",
"type": "human"
},
"id": "9f2a3b4c-5d6e-4f7a-8b8c-9d0e1f2a3b4c",
"min_quantity": "1",
"product": "SCANNER",
"product_id": "5b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0e",
"unit_price": "229",
"valid_from": "2026-01-01"
}
]
}
POST /v1/price-lists/{price_list_id}/prices
Record a price on a price list
A price of a product on the list for a line of at least min_quantity (default 1), from
a day (default today where the entity is). A price is never changed: a new one is recorded
from a later day. The price in force for a quantity on a day is the highest tier at or below
the quantity, that tier's latest from on or before the day. 409 when the list has a price of
the product for the tier from that day. Needs an Idempotency-Key.
| Required scope | draft (admin implies every scope) |
| Idempotency-Key | required |
| Operation id | add_price_list_price_v1_price_lists__price_list_id__prices_post |
Parameters
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | price_list_id |
string (uuid) | yes | Id of the price list (GET /v1/price-lists). |
Request body
application/json (required): PriceListPriceInput
| Field | Type | Required | Description |
|---|---|---|---|
product |
string | yes | Code (or id) of a product of the list's entity. |
unit_price |
decimal string | yes | Net price of one unit, e.g. 229.00. (min 0) |
price_period |
"month" | "year" or null |
month or year for a recurring product (the price of one unit for that long); omitted for a one-off product (the price of one unit). |
|
min_quantity |
decimal string | The tier: the price holds for a line of at least this quantity; default 1. (greater than 0; default "1") |
|
valid_from |
string (date) or null | The first day the price applies; omitted: today. |
Example request
curl -X POST "$ERP_URL/v1/price-lists/8e1f2a3b-4c5d-4e6f-9a7b-8c9d0e1f2a3b/prices" \
-H "Authorization: Bearer $ERP_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"product": "SCANNER",
"unit_price": "229.00",
"valid_from": "2026-01-01"
}'
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | PriceListPriceOut |
| 401 | Missing or invalid API key (unauthorized). |
ErrorEnvelope |
| 403 | The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). |
ErrorEnvelope |
| 404 | The resource does not exist, or belongs to another organization (not_found). |
ErrorEnvelope |
| 409 | The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). |
ErrorEnvelope |
| 422 | Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. |
HTTPValidationError |
Example response (shape)
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"product": "string",
"unit_price": "string",
"price_period": "month",
"min_quantity": "string",
"valid_from": "2026-09-21",
"created_by": {},
"created_at": "2026-09-21T09:30:00Z"
}
Schemas
CustomerPriceListOut
| Field | Type | Required | Description |
|---|---|---|---|
currency |
string | yes | The currency the customer takes the list in. |
price_list_id |
string (uuid) | yes | Price list id. |
price_list |
string | yes | Price list code. |
name |
string | yes | Price list name. |
active |
boolean | yes | Whether the list is active (an inactive one is not used). |
assigned_by |
object | yes | Who gave it to the customer. |
assigned_at |
string (date-time) | yes | When (UTC). |
CustomerPriceListSet
| Field | Type | Required | Description |
|---|---|---|---|
price_list |
string | yes | Code (or id) of an active price list of the customer's entity in the currency of the path. |
PriceListCustomer
| Field | Type | Required | Description |
|---|---|---|---|
party_id |
string (uuid) | yes | Customer id. |
code |
string | yes | Customer code. |
name |
string | yes | Customer name. |
PriceListInput
| Field | Type | Required | Description |
|---|---|---|---|
entity |
string | yes | Code (or id) of the entity whose products it prices. |
code |
string or null | Unique in the entity and never changed. Omitted: made from the name (Wholesale CHF is WHOLESALE-CHF). (pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,39}$) |
|
name |
string | yes | What it is called. (min length 1; max length 200) |
currency |
string or null | ISO 4217 code of all its prices; never changed. Omitted: the entity's functional currency. (pattern ^[A-Z]{3}$) |
|
prices |
array of PriceListPriceInput |
Prices to record with it. (max items 200) |
PriceListOut
| Field | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | Price list id. |
entity |
string | yes | Entity code. |
code |
string | yes | Code, unique in the entity. |
name |
string | yes | Name. |
currency |
string | yes | Currency of all its prices. |
active |
boolean | yes | Whether lines propose its prices. |
prices |
array of PriceListPriceOut |
yes | Every price, by product, tier and then the newest first. |
customers |
array of PriceListCustomer |
yes | The customers that take it, by code. |
created_by |
object | yes | Who created it. |
created_at |
string (date-time) | yes | When (UTC). |
updated_by |
object or null | yes | Who changed it last. |
updated_at |
string (date-time) or null | yes | When (UTC). |
PriceListPriceInput
| Field | Type | Required | Description |
|---|---|---|---|
product |
string | yes | Code (or id) of a product of the list's entity. |
unit_price |
decimal string | yes | Net price of one unit, e.g. 229.00. (min 0) |
price_period |
"month" | "year" or null |
month or year for a recurring product (the price of one unit for that long); omitted for a one-off product (the price of one unit). |
|
min_quantity |
decimal string | The tier: the price holds for a line of at least this quantity; default 1. (greater than 0; default "1") |
|
valid_from |
string (date) or null | The first day the price applies; omitted: today. |
PriceListPriceOut
| Field | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | Price id. |
product_id |
string (uuid) | yes | Product id. |
product |
string | yes | Product code. |
unit_price |
string | yes | Net price of one unit. |
price_period |
"month" | "year" or null |
yes | Per month or year, or per unit. |
min_quantity |
string | yes | The smallest quantity the price holds for. |
valid_from |
string (date) | yes | The first day it applies. |
created_by |
object | yes | Who recorded it. |
created_at |
string (date-time) | yes | When (UTC). |
PriceListUpdate
| Field | Type | Required | Description |
|---|---|---|---|
name |
string or null | New name. (min length 1; max length 200) | |
active |
boolean or null | false: no line proposes its prices and no customer is newly given it; true: it is used again. |