Add an item
Add an item to the catalogue (201), priced in the entity's functional currency. A retry under the same id answers the item unchanged (200).
Add an item to the catalogue (201), priced in the entity's functional currency. A retry under the same id answers the item unchanged (200).
Add an item to the catalogue (201), priced in the entity's functional currency. A retry under the same id answers the item unchanged (200).
x-api-key<token>A per-user API key. x-api-key takes precedence over every session cookie when both are sent. Omit this header to use a session, including for signed-act presence.
entityId*stringuuidapplication/jsondescription?|The longer text under a line's name, which a line picking the item copies as its detail; absent or null for none.
1 <= lengthname*stringThe line's name when the item is picked, 1–200 characters.
1 <= length <= 200unitCode?stringThe unit it is sold by; absent, C62 (one), as a line's.
"C62""HUR""DAY""MON""KGM""LTR""MTR""MTK"unitPrice*stringThe default price excl. VAT, a decimal STRING, never below zero, with at most four decimals: never a JSON number.
^\d{1,14}(?:\.\d{1,4})?$vatCategory*stringThe EN 16931 VAT category code a line copies, which decides the rate vatRate may be: S a rate above 0; Z, E, AE, K, G and O exactly 0; L and M their own. Another pair is 422 sales_item_invalid.
"S""Z""E""AE""K""G""O""L""M"vatRate*stringThe VAT rate in percent, a decimal STRING (6, 21): above 0 for category S, 0 for Z, E, AE, K, G and O.
^\d{1,2}(?:\.\d{1,4})?$id*stringA client-minted uuid v7, the idempotency key (rule 3b): a retry answers the item that is there, unchanged, at 200.
uuidDuplicate-ok: this id already names an item here, returned unchanged.
application/jsondescription*|The longer text under a line's name, which a line picking the item copies as its detail: 1–1000 characters, not blank, a line feed its one break; null for none.
1 <= lengthname*stringThe line's name when the item is picked, 1–200 characters.
1 <= length <= 200unitCode*stringUN/ECE Rec 20: C62 one, HUR hour, DAY day, MON month, KGM kilogram, LTR litre, MTR metre, MTK square metre.
"C62""HUR""DAY""MON""KGM""LTR""MTR""MTK"unitPrice*stringThe default price excl. VAT, a decimal string as stored (1.5000).
vatCategory*stringThe EN 16931 VAT category code a line copies, which decides the rate vatRate may be: S a rate above 0; Z, E, AE, K, G and O exactly 0; L and M their own. Another pair is 422 sales_item_invalid.
"S""Z""E""AE""K""G""O""L""M"vatRate*stringThe VAT rate in percent, a decimal string (6).
active*booleanFalse once archived: off the line pickers, still on the lines that copied it.
acts*array<>Exactly the verbs this caller may take on the record now; a caller who may read it but not change it gets [].
createdAt*stringdate-timecurrency*stringThe entity's functional currency when the item was added.
entityId*stringuuidid*stringuuidseq*integerThe item's version, which an edit carries back as expectedSeq. An item keeps no history: each line keeps its own copy of what was sold.
1 <= valueunitPriceInclVat*stringThe price with VAT at its rate, at the currency's scale (1.59).
curl -X POST 'https://api.amanucci.com/v1/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08/sales-items' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"unitPrice": "string",
"vatCategory": "S",
"vatRate": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}'{
"description": "string",
"name": "string",
"unitCode": "C62",
"unitPrice": "string",
"vatCategory": "S",
"vatRate": "string",
"active": true,
"acts": [
"edit"
],
"createdAt": "2019-08-24T14:15:22Z",
"currency": "string",
"entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"seq": 1,
"unitPriceInclVat": "string"
}