API-Referenz
https://api.ocost.io/public/v1
Ocost API 1 · Das OpenAPI-Dokument
Die Beschreibungen der Referenz kommen aus dem OpenAPI-Dokument der API und sind englisch.
Routen
get/public/v1/documents/{document_id}
Get Document
One document as ocost.document.v1.
Parameter
- document_idpathstring (uuid)PflichtA document's
id: from a file'sdocumentsor a search result
get/public/v1/files
List Files
The files changed at or after updated_since, oldest change first, of the statuses asked for: what a connector polls. The next page is next_cursor's; with no more, keep the last cursor and ask with it later for what changed since. A change made as a page is read comes on a later one.
Parameter
- statusqueryFileStatus[] | nullOnly files of these statuses; repeat it for several
- updated_sincequerystring (date-time) | nullFiles changed at or after this time (ISO 8601)
- cursorquerystring | null
next_cursorof the page before - limitqueryintegerFiles per page
post/public/v1/files
Send File
Sends a file to be read (multipart, field file): 202 with the file, received, when it is new; 200 with the file as it is when the same bytes were sent before (they are read and counted once; the first external_ref stays). Each answer says the month's documents left in X-Ocost-Documents-Left. 413 past 25 MB, 415 for a kind Ocost doesn't read (an archive among them), 409 when the same bytes are a file of the business the key doesn't see (a person's own upload).
Anfrage · multipart/form-data
- external_refstringYour own id for it (an Odoo bill's), kept and given back
- filestring (binary)PflichtA PDF, an image (JPEG, PNG, TIFF, WebP) or an e-invoice's XML (XRechnung, UBL, CII); at most 25 MB
- namestringIts file name; the upload's own when left out
Antworten
- 200The same bytes, sent beforePublicFile
- 202Successful ResponsePublicFile
- 400Bad RequestProblem
- 401UnauthorizedProblem
- 403ForbiddenProblem
- 404Not FoundProblem
- 411Length RequiredProblem
- 413Content Too LargeProblem
- 415Unsupported Media TypeProblem
- 422Unprocessable ContentProblem
- 429Too Many RequestsProblem
- 503Service UnavailableProblem
get/public/v1/files/{file_id}
Get File
A file: its status, why it isn't read where it isn't, and the documents it holds once it is.
Parameter
- file_idpathstring (uuid)PflichtThe file's
id, asPOST /filesanswered it
delete/public/v1/files/{file_id}
Delete File
Erases the file for good, at once: its documents, their lines, sources and parties, its passages and its reading, and the original in storage. 409 while it is being read (urn:ocost:file:reading), and while Ocost still needs it as Files would keep it: an invoice paid, matched or exported, a bank statement, an open question, a project's file (urn:ocost:file:linked, the reason in detail); 404 after.
Parameter
- file_idpathstring (uuid)PflichtThe file's
id, asPOST /filesanswered it
get/public/v1/files/{file_id}/content
Get File Content
The original's bytes, as they were sent.
Parameter
- file_idpathstring (uuid)PflichtThe file's
id, asPOST /filesanswered it
get/public/v1/files/{file_id}/document
Get File Document
The file's first document as ocost.document.v1: what a bill is filled from. A file holding several lists them all (documents), each at /documents/{id}. 404 while it has none.
Parameter
- file_idpathstring (uuid)PflichtThe file's
id, asPOST /filesanswered it
get/public/v1/search
Search
Finds documents by what they say, in words and by meaning, best first: one result per document (a file without one as itself), each with its best passages and its card's facts that have the words, and links to the file and the document. Filters: the kind, the issue and due dates, a party by name or VAT ID, the gross, the direction, open or paid, an ECLASS category. match=exact finds only documents holding the text as written. Only the key's business's files outside the Trash. While the index is building, the words still answer (meaning: unavailable).
Parameter
- qquerystringPflichtWhat to find: words, a number, or what it means
- kindqueryKind[] | nullOnly documents of these kinds; repeat it for several
- sincequerystring (date) | nullIssued on or after
- untilquerystring (date) | nullIssued on or before
- partyquerystring | nullA party's name, as read: seller, buyer…
- vat_idquerystring | nullA party's VAT ID, as read
- matchquery"exact" | "keywords" | "meaning" | "hybrid"exact: every document holding
qas written (case, accents and spacing aside), never one that only means the same; keywords: by its words; meaning: by what it means; hybrid: both - due_sincequerystring (date) | nullAn invoice due on or after
- due_untilquerystring (date) | nullAn invoice due on or before
- gross_minquerynumber | string | nullGross at least, in the business's currency
- gross_maxquerynumber | string | nullGross at most, in the business's currency
- directionquery"incoming" | "outgoing" | nullincoming: from suppliers; outgoing: to customers
- statusquery"open" | "paid" | nullAn invoice's: open (unpaid) or paid
- categoryquerystring | nullAn ECLASS code of any level: documents with a line in it or under it
- limitqueryintegerResults per page
- offsetqueryintegerResults to skip: the next page's start
Schemata
Address
- citystring | nullBT-37, BT-52
- countrystring | nullBT-40, BT-55: ISO 3166-1 alpha-2
- postal_codestring | nullBT-38, BT-53
- streetstring | nullBT-35 (seller), BT-50 (buyer)
Attention
What a person should look at before booking it.
sums: A check withsums: truefailedoutgoing: The business issued itpossible_duplicate: An earlier document has its kind, number and seller (possible_duplicate_of)self_billed: A self-billed invoice (Gutschrift): the buyer issued it
"sums" | "outgoing" | "possible_duplicate" | "self_billed"
Card
What a document without fields of its own says: a title, a summary and its facts (deadlines first).
- factsFact[]Pflicht
- summarystring | null
- titlestring | null
Check
A check Ocost ran in code, and whether it passed.
- atstring | nullThe rate or the line it is about
- fieldsstring[]PflichtThe paths it is about, as
sourcesnames them - nameCheckNamePflichtWhat it checked;
sumssays whether it is one of the sums - passedbooleanPflicht
- sumsbooleanPflichtOne of the sums (total, vat, vat_net, vat_tax, gross, payable, signs, skonto, deduction, deductions, quantity): fill a bill only when all pass
CheckName
A check Ocost ran in code on what it read.
total: A total was readvat: A VAT group's VAT is its net × rate (atthe rate)vat_net: The VAT groups' nets add up to the netvat_tax: The VAT groups' VAT adds up to the VATgross: Net plus VAT is the gross (the net, with no VAT printed)payable: What is left to pay is between nothing and the grosssigns: No total is negativededuction: A deducted invoice's net plus VAT is its gross (atwhich)deductions: The gross less the deductions is what is left to payquantity: A delivered quantity is positive, or the line is backordered (atthe line)skonto: A Skonto is plausible: up to 10 %, within a yearline: A line's quantity × price, less its discount, is its net (atthe line)lines_net: The lines add up to the net (the gross, priced with VAT)lines_currency: The lines are in another currency than the totals (atit)vat_lines: A VAT group's net is its lines' (atthe rate)iban: The IBAN's check digits holdvat_id: A German VAT ID's check digit holdsissued_on: The issue date is neither years ago nor aheaddue_on: The due date isn't before the issue dateservice: The service period starts before it endsvalid_until: A quote holds until after its issue datedelivery_on: The delivery date is near the issue datestated: The amounts stated in a second currency add upstated_rate: The amounts in both currencies agree at the rate printed, else the ECB's (atthe rate)payment_sum: A contract's payment: net plus VAT is its gross (atwhich)payment_vat: A contract's payment: its VAT is its net × ratepayment_sign: A contract's payment: its amounts are positivestep: A stepped rent's step falls in the term, in orderfirst_payment: A contract's first payment falls in its termdeposit: A contract's deposit is positive
"total" | "vat" | "vat_net" | "vat_tax" | "gross" | "payable" | "signs" | "deduction" | "deductions" | "quantity" | "skonto" | "line" | "lines_net" | "lines_currency" | "vat_lines" | "iban" | "vat_id" | "issued_on" | "due_on" | "service" | "valid_until" | "delivery_on" | "stated" | "stated_rate" | "payment_sum" | "payment_vat" | "payment_sign" | "step" | "first_payment" | "deposit"
Confidence
How sure Ocost is of a value, from its checks: never a model's grade.
checked: A check confirmed it, or it came from an e-invoiceread: Nothing speaks against itdoubt: A check failed (whynames it), or its words weren't on its page
"checked" | "read" | "doubt"
Contact
- emailstring | nullBT-43, BT-58: an address as printed
- phonestring | nullBT-42, BT-57: as printed
Deduction
A final invoice's: an earlier invoice it takes off.
- grossstring | null
- issue_datestring (date) | null
- netstring | null
- numberstring | null
- taxstring | null
Direction
Whether the business received or issued it.
incoming: To the business: a supplier'soutgoing: The business issued itunsure: Its parties don't say
"incoming" | "outgoing" | "unsure"
Document
ocost.document.v1: one document as Ocost read it.
- attentionAttention[]Pflicht
- buyerParty | nullBG-7
- buyer_referencestring | nullBT-10
- cardCard | null
- checksCheck[]Pflicht
- currencystring | nullBT-5, ISO 4217
- deductionsDeduction[]Pflicht
- deliver_toAddress | nullBG-15
- delivery_datestring (date) | nullBT-72
- directionDirectionPflicht
- due_datestring (date) | nullBT-9
- early_payment_discountsEarlyPaymentDiscount[]Pflicht
- file_idstring (uuid)PflichtThe file it is in
- idstring (uuid)PflichtThe document
- invoicing_period_endstring (date) | nullBT-74
- invoicing_period_startstring (date) | nullBT-73
- issue_datestring (date) | nullBT-2
- kindKindPflicht
- kind_detailKindDetailPflicht
- linesLine[]Pflicht
- numberstring | nullBT-1
- order_referencestring | nullBT-13
- order_referencesstring[]PflichtEvery order it names
- other_partiesOtherParty[]PflichtEvery other party named
- pagesinteger[]PflichtIts pages in the file, from 1
- payeeParty | nullBG-10: when not the seller
- paymentPaymentPflicht
- possible_duplicate_ofstring (uuid) | nullAn earlier document of the same kind, number and seller
- preceding_invoicestring | nullBT-25
- read_withReadWithPflicht
- schema"ocost.document.v1"Always this
- sellerParty | nullBG-4
- sourcesobjectPflichtPer value, by its path:
number,issue_date,due_date,delivery_date,valid_until,currency,order_reference,seller.name,buyer.name,seller.vat_id,buyer.vat_id,seller.contact.email,buyer.contact.email,seller.contact.phone,buyer.contact.phone,seller.website,buyer.website,seller.legal_registration_id,buyer.legal_registration_id,totals.net,totals.tax,totals.gross,totals.payable,payment.iban,payment.means_code,payment.paid_on,lines,other_parties[n].name,deductions[n].gross; a later Ocost may add paths - tax_checkTaxCheck | null
- totalsTotalsPflicht
- type_codestring | nullBT-3, UNCL 1001: 380 commercial invoice, 381 credit note, 384 corrected invoice, 389 self-billed invoice, 326 partial invoice, 386 prepayment invoice, 325 pro forma invoice, 875 partial construction invoice, 876 partial final construction invoice, 877 final construction invoice, 383 debit note, 393 factored invoice, 751 invoice information for accounting purposes, 81 credit note related to goods or services, 83 credit note related to financial adjustments, 261 self-billed credit note, 262 consolidated credit note, goods and services, 396 factored credit note, 532 forwarder's credit note; an e-invoice may carry another
- valid_untilstring (date) | nullA quote's
- vat_breakdownVatGroup[]Pflicht
- worked_outWorkedOut[]Pflicht
DocumentRef
One document a file holds.
- idstring (uuid)Pflicht
- kindKindPflicht
- numberstring | nullBT-1, as printed
- pagesinteger[]PflichtIts pages in the file, from 1
EarlyPaymentDiscount
Skonto: XRechnung's #SKONTO# in BT-20.
- base_amountstring | nullWhat it is taken off, where printed; null: the amount due
- daysintegerPflicht
- due_datestring (date) | nullThe last day for it: the issue date plus
days - percentstringPflicht2 for 2 %
Fact
- amountstring | null
- currencystring | nullISO 4217, of
amount - datestring (date) | null
- kindFactKindPflicht
- labelstringPflichtWhat it is, in the document's words
- numberstring | null
- pageinteger | null
- textstring | null
FactKind
What a fact on a document's card is.
deadline: A date something is due by; its label says whatvalid_from: The day it is valid fromvalid_until: The day it is valid untilreference: A number naming something elseamount: An amountparty: Someone besides its issuer and recipientdate: Any other date: an inspection, an acceptanceother: Anything else
"deadline" | "valid_from" | "valid_until" | "reference" | "amount" | "party" | "date" | "other"
FieldError
One invalid field of a request.
- locstring | integer[]Pflicht
- msgstringPflicht
- typestringPflicht
FileStatus
How far Ocost is with a file.
received: Stored, not read yetreading: Being readread: Read:documentslists what it holdsnot_read: Stored, not read;reasonsays whyfailed: Ocost couldn't read it;reasonsays why
"received" | "reading" | "read" | "not_read" | "failed"
FoundBy
How a passage was found.
words: By its wordsmeaning: By its meaningboth: By both
"words" | "meaning" | "both"
FoundFact
- labelstringPflicht
- textstring | null
Hit
- found_byFoundByPflicht
- highlightsany[][]PflichtWhere the words are in
text: [start, end) character ranges - pageintegerPflicht
- textstringPflicht
Kind
What a document is, grouped so an integrator branches on few; the exact kind is kind_detail.
invoice: An invoice to pay: partial, final, advance, collective, recurring, self-billed (type_codesays which)credit_note: A credit noteinvoice_correction: A corrected invoicereceipt: A receipt: paid alreadypro_forma: A pro forma invoice: not to paydelivery_note: A delivery noteorder: An order: a purchase, service, work or project orderorder_confirmation: An order's or a reservation's confirmationquote: A quote (offer)contract: A contract: agreements, leases, insurance policies, mandatesstatement: A factor's statementpayment_reminder: A payment reminderother: Anything else:kind_detailandcardsay what
"invoice" | "credit_note" | "invoice_correction" | "receipt" | "pro_forma" | "delivery_note" | "order" | "order_confirmation" | "quote" | "contract" | "statement" | "payment_reminder" | "other"
KindDetail
The exact kind, one of Ocost's document types, for information: branch on kind, which groups them (the guide's reference lists which).
"acceptance_protocol" | "agreement" | "bonus_payment_notification" | "certificate" | "certificate_of_destruction" | "collective_invoice" | "contract" | "cost_statement" | "court_order" | "credit_note" | "reimbursement" | "customer_statistics" | "decision" | "delivery_note" | "final_report" | "lump_sum_overview" | "test_report" | "insurance_policy" | "invoice" | "invoice_correction" | "laboratory_report" | "logistics_appendix" | "maintenance_log" | "maintenance_report" | "mandate" | "request_for_medical_consultation" | "notification" | "offer" | "order" | "order_confirmation" | "order_form" | "payment_reminder" | "payroll" | "pay_slip" | "prescription" | "project_order" | "work_record" | "receipt" | "recommendation" | "lease_contract" | "report" | "inquiry" | "requirement" | "reservation_confirmation" | "separator_sheet" | "service_order" | "service_report" | "service_documentation" | "declaration" | "time_sheet" | "work_order" | "work_report" | "recurring_rental_invoice" | "settlement_amount" | "electronic_summary" | "administrative_fee" | "payment_voucher" | "pro_forma_invoice" | "copy_of_invoice" | "bailiff" | "membership_fee" | "statement" | "enforcement_case" | "information" | "fee_invoice" | "cost_calculation" | "fee_notice" | "advance_payment_invoice" | "invoice_audit" | "credit_invoice" | "final_invoice" | "partial_invoice" | "annex" | "direct_debit_advice" | "process_history" | "internal_project_information" | "bank_transaction_report" | "purchase_order" | "request_for_quotation" | "rejection" | "form"
Line
BG-25.
- attributes{ [key]: string }PflichtWhat it is, as printed: colour, size, material, brand, …
- backordered_quantitystring | nullStill to come
- base_quantitystring | nullBT-149: how many units
priceis for; null: one - batchstring | nullIts batch (Charge), as printed
- discount_percentstring | nullThe line's discount: 5
- idstringPflichtBT-126: its position
- namestringPflichtBT-153
- net_amountstring | nullBT-131
- ordered_quantitystring | nullA delivery note's
- pricestring | nullBT-146: the net price
- pznstring | nullA medicine's PZN
- quantitystring | nullBT-129
- seller_item_idstring | nullBT-155: the article number
- standard_item_idstring | nullBT-157: the GTIN (scheme 0160)
- unitstring | nullBT-130: UNECE Rec 20 (C62, HUR, KGM) or Rec 21 (XCT); null when none is printed or it is no code
- vat_categoryVatCategory | nullBT-151
- vat_ratestring | nullBT-152, percent
Means
How it is paid, as a word.
transfer: A credit transfer (means_code58)direct_debit: A direct debit (59)card: A card (48)already_paid: It says it is paid already (no code)
"transfer" | "direct_debit" | "card" | "already_paid"
MeansCode
BT-81: how it is paid, UNCL 4461.
58: SEPA credit transfer59: SEPA direct debit48: Bank card
"58" | "59" | "48"
OtherParty
- addressAddress | nullBG-5, BG-8
- contactContact | nullBG-6, BG-9
- legal_registration_idstring | nullBT-30, BT-47: the register entry (HRB …)
- namestring | nullBT-27 (seller), BT-44 (buyer)
- printed_rolestring | nullThe words printed for its role
- rolePartyRolePflichtWhat it is to the document
- tax_registration_idstring | nullBT-32: the tax number (Steuernummer)
- vat_idstring | nullBT-31, BT-48
- websitestring | nullAs printed: a host, with or without its scheme
Party
- addressAddress | nullBG-5, BG-8
- contactContact | nullBG-6, BG-9
- legal_registration_idstring | nullBT-30, BT-47: the register entry (HRB …)
- namestring | nullBT-27 (seller), BT-44 (buyer)
- tax_registration_idstring | nullBT-32: the tax number (Steuernummer)
- vat_idstring | nullBT-31, BT-48
- websitestring | nullAs printed: a host, with or without its scheme
PartyRole
What another party is to the document; printed_role is its words.
seller: The sellerbuyer: The buyerinvoicee: Who it is addressed to, when not the buyer (Rechnungsempfänger)service_recipient: Who receives the service, when not the buyer (Leistungsempfänger)payer: Who pays, when not the buyerpayee: Who is paid, when not the sellership_to: Where the goods go (Warenempfänger)carrier: Who carries the goodsfactor: Who bought the receivabledebtor: Whose receivable it is (a factor's debtor)guarantor: Who guarantees it (Bürge)landlord: The landlordtenant: The tenantsubtenant: The subtenantcontractor: The contractorsubcontractor: The subcontractorprincipal: Who commissions the work (Auftraggeber, Bauherr)agent: Who acts for a party: a property manager, a brokerinsurer: The insurerpolicyholder: The policyholderother: Any other role:printed_rolesays which
"seller" | "buyer" | "invoicee" | "service_recipient" | "payer" | "payee" | "ship_to" | "carrier" | "factor" | "debtor" | "guarantor" | "landlord" | "tenant" | "subtenant" | "contractor" | "subcontractor" | "principal" | "agent" | "insurer" | "policyholder" | "other"
Payment
BG-16.
- bicstring | nullBT-86
- ibanstring | nullBT-84, without spaces
- meansMeans | nullThe same, as a word
- means_codeMeansCode | nullBT-81, UNCL 4461; null when it doesn't say or it was paid already
- net_daysinteger | nullThe days the terms give to pay in full from the issue date
- paid_onstring (date) | nullThe day it says it was paid or charged, where printed
- termsstring | nullBT-20, as printed
Problem
RFC 9457 problem details, with errors for invalid fields.
- detailstring | null
- errorsFieldError[] | null
- instancestring | null
- reasonstring | nullRead-only (type urn:ocost:read-only, docs/specs/056): why, trial_ended, unpaid or ended
- renews_onstring (date) | nullA month's limit used (type urn:ocost:limit:<kind>): the day it renews
- statusintegerPflicht
- titlestringPflicht
- typestring
PublicFile
A file sent, and how far Ocost is with it.
- content_typestringPflicht
- created_atstring (date-time)Pflicht
- documentsDocumentRef[]PflichtOnce
read: what it holds - external_refstring | nullYour own id for it, as sent
- idstring (uuid)Pflicht
- namestringPflicht
- pagesinteger | nullIts pages, once counted
- pages_readinteger | nullThe first pages read of a file longer than Ocost reads; null: all of them
- reasonReason | nullWhy it is
not_readorfailed - renews_onstring (date) | nullFor
reason: limit: the day the month's documents renew; it is read then by itself - sha256stringPflichtThe bytes' SHA-256, hex: the same bytes are one file; empty for a file Ocost made itself before it is hashed
- size_bytesintegerPflicht
- statusFileStatusPflicht
- updated_atstring (date-time)Pflicht
PublicFiles
- filesPublicFile[]PflichtOldest change first
- morebooleanPflichtMore pages are there now: ask again at once
- next_cursorstring | nullAsk with this as
cursorfor the next page, and later for what changed since; null when nothing was listed yet
ReadWith
How Ocost read it: never a model's or provider's name.
e_invoice: From its XML, exactlyreader: From its pages
"e_invoice" | "reader"
Reason
Why a file is not_read or failed.
limit: The month's documents are used up; read onrenews_onmodel_off: This business may not have PDFs and images read; e-invoices still arenothing_found: No document in ittoo_large: Too many pages or too large an imagedamaged: Not a file Ocost can openunavailable: No reading service answered for a day; send it againfailed: Reading failedother: Any other reason
"limit" | "model_off" | "nothing_found" | "too_large" | "damaged" | "unavailable" | "failed" | "other"
SearchMeaning
Whether search by meaning answered.
available: It didunavailable: The index is building or its model unreachable; the words still answer
"available" | "unavailable"
SearchResult
- buyerstring | nullAs read
- currencystring | null
- document_idstring (uuid) | nullNull for a file without one
- document_urlstring | nullThe document, in this API
- factsFoundFact[]PflichtIts card's facts that have the words
- file_idstring (uuid)Pflicht
- file_namestringPflicht
- file_urlstringPflichtThe file, in this API
- grossstring | null
- issue_datestring (date) | null
- kindKind | null
- numberstring | null
- pagesinteger[]Pflicht
- passagesHit[]PflichtAt most 5, best first
- sellerstring | nullAs read
SearchResults
- meaningSearchMeaningPflicht
- resultsSearchResult[]Pflicht
- totalintegerPflichtHow many matched, up to the pool's 300
- truncatedbooleanPflichtMore matched than the pool holds
Source
Where a value was read, and how sure Ocost is of it.
- confidenceConfidencePflicht
- pageinteger | nullWhere it was read, from 1
- quotestring | nullThe words it was read from
- whystring | nullFor a doubt: the failed check's
name
TaxCase
Which German rules an incoming invoice is held to.
standard: § 14 Abs. 4 UStG: an invoice with VATsmall: § 33 UStDV: a small amount, up to 250 €reverse_charge: § 13b, § 14a Abs. 5 UStG: the business owes the VATintra_eu: § 14a Abs. 3 UStG: an intra-community supplyexempt: § 14 Abs. 4 Satz 1 Nr. 8 UStG: an exempt supply
"standard" | "small" | "reverse_charge" | "intra_eu" | "exempt"
TaxCheck
An incoming invoice's § 14 UStG check (Germany's rules).
TaxItem
- at_stakebooleanPflichtMissing, it costs the input VAT deduction
- itemTaxItemKindPflicht
- lawstringPflichtThe paragraph that asks for it
TaxItemKind
What an invoice lacks, or has wrong, for its case.
supplier_name: The supplier's full namesupplier_address: The supplier's full addresssupplier_tax_id: The supplier's tax number or VAT IDrecipient_name: The recipient's full namerecipient_address: The recipient's full addressrecipient_not_us: It is addressed to someone else than the businessrecipient_address_not_ours: It is addressed to an address that isn't the business'sissued_on: The issue datenumber: The invoice numberdescription: The quantity and kind of the goods or servicesservice_date: The day of the supply or servicenet: The net per ratetax_rate: The VAT ratetax_amount: The VATexemption_note: The note on why it is exemptreverse_charge_note: The note that the recipient owes the VAT (Steuerschuldnerschaft des Leistungsempfängers)intra_eu_note: The note that it is an intra-community supplysupplier_vat_id: The supplier's VAT IDrecipient_vat_id: The recipient's VAT IDvat_charged: German VAT charged where the business owes it itself (§ 13b): not deductible, and paying it pays VAT twice
"supplier_name" | "supplier_address" | "supplier_tax_id" | "recipient_name" | "recipient_address" | "recipient_not_us" | "recipient_address_not_ours" | "issued_on" | "number" | "description" | "service_date" | "net" | "tax_rate" | "tax_amount" | "exemption_note" | "reverse_charge_note" | "intra_eu_note" | "supplier_vat_id" | "recipient_vat_id" | "vat_charged"
Totals
BG-22.
- grossstring | nullBT-112
- netstring | nullBT-109
- payablestring | nullBT-115: what is left to pay; null when it is the gross
- prices_include_vatbooleanPflichtIts lines' prices and amounts include VAT (a receipt)
- taxstring | nullBT-110
VatCategory
BT-118, BT-151: the VAT category, UNCL 5305 as EN 16931 uses it.
S: Standard rateZ: Zero rated goodsE: Exempt from VATAE: Reverse charge: the buyer owes the VATK: Intra-community supply, VAT exemptG: Export outside the EU, free of VATO: Outside the scope of VATL: Canary Islands' IGICM: Ceuta and Melilla's IPSIB: Transferred VAT (Italy's split payment)
"S" | "Z" | "E" | "AE" | "K" | "G" | "O" | "L" | "M" | "B"
VatGroup
BG-23.
- categoryVatCategory | nullBT-118
- exemption_reasonstring | nullBT-120
- ratestring | nullBT-119, percent: 19
- tax_amountstringPflichtBT-117
- taxable_amountstringPflichtBT-116
WorkedOut
An amount Ocost worked out because the one read can't be it.
- fieldWorkedOutFieldPflichtIts path in this document
- printedstring | nullWhat was read
- ruleWorkedOutRulePflicht
WorkedOutField
The amount worked out, by its path.
totals.net: BT-109totals.tax: BT-110totals.gross: BT-112
"totals.net" | "totals.tax" | "totals.gross"
WorkedOutRule
How Ocost worked an amount out.
groups: The VAT groups' sumnet_tax: Net plus VATskonto: The gross read was the amount less Skontopayable: The gross read was what is left to payoutside: The net with an amount outside the VAT groups: a deposit, a tip
"groups" | "net_tax" | "skonto" | "payable" | "outside"