Units and codes
The code lists ocost.document.v1 uses, the standard behind each, and how Ocost gets from the printed word to the code. A value that is no code of its list is null, never the printed text.
Units
lines[].unit is a code of UNECE Recommendation 20, or a package of Recommendation 21 as X and its code. These are the ones Ocost writes most:
| Code | Meaning | Printed as |
|---|---|---|
C62 | One, a piece | Stück, Stk, St., шт., од. |
H87 | Piece | Carried by e-invoices |
HUR | Hour | Std., h, год. |
DAY | Day | Tag, день |
MON | Month | Monat, міс. |
KGM | Kilogram | kg, кг |
MTR | Metre | m, lfm, м |
MTK | Square metre | m², qm, м² |
LTR | Litre | l, л |
KWH | Kilowatt hour | kWh, кВт·год |
SET | Set | Satz, компл. |
LS | Lump sum | pauschal, psch. |
E48 | Service unit | послуга |
XCT | Carton | Karton, Ktn |
XPK | Package | Paket, VE, уп. |
XPX | Pallet | Palette, Pal. |
Ocost asks the reading model for the code. A German, Ukrainian or Russian word it answers instead is mapped by a fixed table. A word that names no single unit, such as Kiste, stays unknown. unit is then null, never C62. An e-invoice's code is kept as it is. A bare PF is the pallet XPX.
Currencies
currency is an ISO 4217 code. A printed sign becomes its code: € is EUR, £ GBP, ₴ and грн UAH, zł PLN. A sign several countries use, such as $ or kr, goes by the issuer's country. Without either, Ocost takes the supplier's usual currency, else your company's.
Countries
An address's country is an ISO 3166-1 alpha-2 code, such as DE, UA or GB.
VAT categories
vat_breakdown[].category and lines[].vat_category are UNCL 5305 as EN 16931 uses it: S, Z, E, AE, K, G, O, and L, M, B for Spain's and Italy's own. Values explains each. Each country page shows how they are printed there.
Payment means
payment.means_code is UNCL 4461: 58 a SEPA credit transfer, 59 a SEPA direct debit, 48 a card. payment.means says the same as a word.
Document types
kind and kind_detail are Ocost's own. type_code is UNCL 1001, such as 380 for an invoice or 381 for a credit note. Where the document prints none, Ocost writes the code of its kind.
Identifiers
identifiers[].scheme is Ocost's own list, such as EU_VAT, DE_STNR, UA_EDRPOU, PL_NIP, US_EIN or MD_IDNO. Values lists them all. The country pages say how each is checked.
Categories
Search filters by category, an ECLASS code of eight digits, such as 24000000.
Numbers and dates
Amounts and quantities are exact JSON numbers, rates are percents, dates are ISO 8601. The document says how to read them.