JSR Tax Advisors logoAPI
Developer APIsReference documentation

The purchase invoice object


See the right panel for the complete object definition and code examples.

Attributes

Core fields

All root-level attributes on the purchase invoice. Nested fields are linked to their respective tables below for full attribute details.

FieldTypeRequiredSourceDescriptionValidation
idstring
Required
System-generatedPrimary identifier for the document (UUID). Automatically generated when the invoice is created.Response-only; not accepted in requests.
org_idstring
Required
System-generatedUnique identifier of the organization that owns this invoice.Set by backend from your organization; not part of the create request body.
document_numberstring
Optional
Conditional (client-provided or system-generated)The invoice number as displayed on the document. If not provided and auto-numbering is enabled, the system will generate this automatically.Required for API-created invoices; must be unique within the organization when provided.
document_sequencelong
Optional
System-generatedSequential number for the invoice within your organization. Used for compliance and tracking.Server-calculated sequence; do not send on create.
statusstringSystem-generatedDocument lifecycle status. See Document status below.Response-only. One of ACTIVE or OBSOLETE. Defaults to ACTIVE on create.
issue_datestring
Required
Client-providedThe date when the invoice was issued.Format yyyy-MM-dd; must be a valid calendar date.
issue_timestring
Optional
Client-providedThe time when the invoice was issued.If present, format HH:mm:ss (e.g. 10:30:00).
invoice_type_codestring
Required
Client-providedThe type of invoice.Must be one of 389.
due_datestring
Required
Client-providedThe date when payment is due.Format yyyy-MM-dd.
transaction_typestring
Required
Client-providedInvoice transaction type code. See Transaction type below.Exactly 20 characters; each character 1 or X (bitmap).
document_currency_codestring
Required
Client-providedISO 4217 alpha-3 currency code for all monetary amounts (e.g. OMR).Must be a valid ISO 4217 currency (e.g. OMR).
tax_currency_codestring
Optional
Client-providedISO 4217 currency code for tax when it differs from document currency.If present: valid ISO 4217 code; consistent with document_currency_code and requires tax_exchange_rate when different.
accounting_coststring
Optional
Client-providedAccounting cost center / project cost identifier (if applicable).Free text.
buyer_referencestring
Optional
Client-providedBuyer reference (customer reference) for the invoice.Free text.
invoice_periodobject
Optional
Client-providedBilling period covered by the invoice (start_date, end_date, description).If present: start_date and end_date must be yyyy-MM-dd, with start_dateend_date.
notestring
Optional
Client-providedAdditional notes or terms displayed on the invoice.Free text.
tax_point_datestring
Optional
Conditional (client-provided or system-generated default)Tax point date per OMN VAT Law—when VAT liability arises.If present: format yyyy-MM-dd; defaults to issue_date if omitted.
accounting_supplier_partyobject
Required
Conditional (usually system-generated from profile)The supplier party issuing the invoice. See Party object below.For Purchases Invoice API, usually derived from the supplier profile; if sent, must be a valid Party.
accounting_customer_partyobject
Required
Client-providedThe customer party receiving the invoice. See Party object below.Must be a valid Party object; required in create requests.
buyer_customer_partyobject
Optional
Client-providedAdditional buyer party if different from accounting customer. See Party object below.If present, must be a valid Party; some profiles may enforce its presence or shape.
seller_supplier_partyobject
Optional
Client-providedAdditional seller party if different from accounting supplier. See Party object below.If present, must be a valid Party.
payee_partyobject
Optional
Client-providedThe party to whom payment should be made, if different from the supplier. See Payee party object below.If present, must be a valid Payee party object.
tax_representative_partyobject
Optional
Client-providedParty authorized to represent the supplier for tax purposes. See Tax representative party object below.If present, must be a valid Party (with correct tax scheme and address).
deliveryobject
Optional
Client-providedWhere and when the goods or services are delivered. See Delivery object below.If present: delivery_location and its address must be populated; may be mandatory for exports.
order_referenceobject
Optional
Client-providedReference to the purchase order. See Order reference object below.If present: id must be provided; issue_date as yyyy-MM-dd when used.
billing_referencearray
Optional
Client-providedReferences to other billing documents (e.g. previous invoices, credit notes). See Billing reference object below.If present: each item requires id; issue_date as yyyy-MM-dd when provided.
despatch_document_referenceobject
Optional
Client-providedReference to despatch/delivery document. See Despatch document reference object below.If present: id required; issue_date yyyy-MM-dd when provided.
receipt_document_referenceobject
Optional
Client-providedReference to receipt document. See Receipt document reference object below.If present: id required; issue_date yyyy-MM-dd when provided.
statement_document_referenceobject
Optional
Client-providedReference to statement document.If present: id required; issue_date yyyy-MM-dd when provided.
originator_document_referenceobject
Optional
Client-providedReference to originating document (when applicable).If present: id required; issue_date yyyy-MM-dd when provided.
contract_document_referenceobject
Optional
Client-providedReference to contract. See Contract document reference object below.If present: id required; issue_date yyyy-MM-dd when provided.
project_referenceobject
Optional
Client-providedProject associated with the invoice. See Project reference object below.If present: id must be provided.
document_linesarray
Required
Client-providedInvoice line items. See Document line object below.Must contain at least one line; each line must satisfy the Document line object validation rules.
chargesarray
Optional
Client-providedDocument-level charges that increase the amount. See Charge object below.If present: each charge must have a valid reason and amount/rate; tax category rules apply.
allowancesarray
Optional
Client-providedDocument-level discounts/allowances. See Allowance object below.If present: each allowance must have a valid reason and amount/rate; tax category rules apply.
payment_meansarray
Optional
Client-providedPayment method(s). See Payment means below.Optional 0..n. Required when transaction_type first bit is X; optional when first bit is 1. Code 30 requires payee_financial_account; 54/55 require card_account; 49 requires payment_mandate.
payment_termsobject
Optional
Client-providedPayment terms and conditions. See Payment terms object below.Free structure with date fields in yyyy-MM-dd when used.
tax_exchange_rateobject
Optional
Client-providedExchange rate when tax currency differs from document currency. See Tax exchange rate object below.Required when tax_currency_code differs from document_currency_code; must include source_currency_code, target_currency_code, and calculation_rate.
prepaid_amountnumberClient-providedTotal prepaid amount applied to the invoice.Optional numeric; typically non-negative.
payable_rounding_amountnumberClient-providedRounding adjustment applied to payable amount.Optional numeric; may be positive or negative depending on rounding direction.
allowance_total_amountnumberCalculatedTotal of all document-level allowances.Response-only, calculated from document-level allowances.
charge_total_amountnumberCalculatedTotal of all document-level charges.Response-only, calculated from document-level charges.
line_extension_amountnumberCalculatedSum of all line amounts before charges, allowances, and taxes. UBL 2.1 LineExtensionAmount.Response-only, derived from line net amounts.
tax_exclusive_amountnumberCalculatedLine extension plus charges minus allowances, before tax. UBL 2.1 TaxExclusiveAmount.Response-only, calculated.
tax_amountnumberCalculatedAggregated VAT amount in document currency. UBL 2.1 TaxTotal.Response-only, calculated from tax breakdown.
tax_amount_in_omrnumberCalculatedTotal tax amount converted to OMR.Response-only, calculated using tax exchange rate (if applicable).
tax_inclusive_amountnumberCalculatedTax exclusive amount plus total tax. UBL 2.1 TaxInclusiveAmount.Response-only, calculated.
payable_amountnumberCalculatedFinal amount due. UBL 2.1 PayableAmount.Response-only, calculated as tax inclusive minus prepayments/rounding.
payable_amount_in_omrnumberCalculatedFinal amount payable in OMR.Response-only, calculated using exchange rates.
total_item_allowancesnumberCalculatedTotal of all line-level allowances.Response-only, sum over line-level allowances.
total_item_chargesnumberCalculatedTotal of all line-level charges.Response-only, sum over line-level charges.
total_taxable_amountnumberCalculatedTotal taxable amount.Response-only, derived from taxable lines and charges/allowances.
total_non_taxable_amountnumberCalculatedTotal non-taxable amount.Response-only, derived from non-taxable lines.
tax_breakdownarrayCalculatedTax amounts by tax category (S, E, O) and rate. UBL 2.1 TaxSubtotal.Response-only, generated from per-line tax categories.
seller_uuidstring
Optional
Client-provided or system-generatedSeller identity UUID (BTOM-004). Auto-generated if omitted. See Invoice QR Code and Seller UUID.Valid UUID format.
qr_code_base64string
Optional
Client-provided or System-generatedBase64-encoded PNG QR code per Oman SRA v1.0.2. See Invoice QR Code and Seller UUID.Valid Base64 format.
uuidstringSystem-generatedPeppol network document identifier (distinct from id and seller_uuid).Response-only; used internally for Peppol transmission. See Peppol Transmission Status.
meta_infoobjectSystem-generatedPeppol transmission metadata.Response-only. See Peppol Transmission Status.
meta_info.peppol_statusobjectSystem-generatedNested status with participant_status, ota_status, overall_status, validation_results.See Peppol Transmission Status.
document_sourcestringSystem-generatedSource of the invoice: WEB, API, or PEPPOL.Create via API/UI typically returns API or WEB. Documents received over Peppol are stored as PEPPOL. GET .../peppol-status uses received-messages when source is PEPPOL, otherwise sent-messages.
Document status

The status field is the document lifecycle flag (distinct from Peppol transmission status in meta_info.peppol_status).

ValueMeaning
ACTIVEThe current version of the document. Created documents start as ACTIVE. List endpoints return active documents only.
OBSOLETEA superseded version after edit and resubmit. The obsolete document keeps its original uuid and remains retrievable by id; it cannot be resubmitted again.
Party object

The accounting_supplier_party, accounting_customer_party, buyer_customer_party, and seller_supplier_party fields are objects with the following attributes:

FieldTypeRequiredDescriptionValidation
namestring
Required
Party name or display name.Must be non-empty text.
party_namestring
Required
Legal name of the party.Must be non-empty text.
profile_idstring
Optional
Business profile identifier when referencing a registered profile.If provided, must match an existing business profile.
postal_addressobject
Required
Postal address. Must include OMN emirate code where applicable. See standard address structure (street_name, city_name, postal_zone, country, country_code, country_subentity).Required; all mandatory address fields must be non-blank.
scheme_agency_idstring
Optional
Scheme agency identifier.If present, must be one of CR, TIN, PASNUM, CID, OTHID, ICID, SZLN.
company_idstring
Optional
Company or registration number.Free-form registration number; may be validated per jurisdiction.
party_tax_schemeobject
Required
Tax scheme with TRN. Contains company_id, tax_scheme.Required for OMN VAT; must include a valid TRN and tax_scheme (usually VAT).
endpoint_idstring
Optional
Peppol endpoint identifier.If present, must be a valid Peppol endpoint for Phase 2 documents.
endpoint_scheme_idstring
Optional
Peppol endpoint scheme identifier.If present, must be a valid Peppol scheme id.
Payee party object

The payee_party field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
party_identificationobject
Optional
Payee identification.Optional; structure depends on your implementation.
party_namestring
Optional
Name of the payee.If provided, must be non-empty text.
financial_accountobject
Optional
Financial account details for payment.If present, must contain valid account identifiers as required by your bank.
Tax representative party object

The tax_representative_party field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
party_identificationobject
Optional
Tax representative identification.Optional; should uniquely identify the tax representative where used.
party_namestring
Optional
Name of the tax representative.If provided, must be non-empty.
postal_addressobject
Optional
Address of the tax representative.If present, must follow the same rules as standard postal addresses.
Delivery object

The delivery field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
delivery_locationobject
Optional
Location where goods or services are delivered.If present, must include an address with valid address fields; required for exports.
delivery_datestring
Optional
Date of delivery.If present, format yyyy-MM-dd.
delivery_timestring
Optional
Time of delivery.If present, format HH:mm:ss.
actual_delivery_datestring
Optional
Actual date of delivery.If present, format yyyy-MM-dd.
Order reference object

The order_reference field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
idstring
Required
Order number or identifier.Must be non-empty when the object is present.
issue_datestring
Optional
Order date.If present, format yyyy-MM-dd.
purchases_order_idstring
Optional
Purchases order identifier.Free-form identifier.
Billing reference object

Each element of the billing_reference array is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
idstring
Required
Referenced document number.Must be non-empty when the entry is present.
issue_datestring
Optional
Referenced document date.If present, format yyyy-MM-dd.
Despatch document reference object

The despatch_document_reference field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
idstring
Required
Despatch document number.Must be non-empty when the object is present.
issue_datestring
Optional
Despatch document date.If present, format yyyy-MM-dd.
Receipt document reference object

The receipt_document_reference field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
idstring
Required
Receipt document number.Must be non-empty when the object is present.
issue_datestring
Optional
Receipt document date.If present, format yyyy-MM-dd.
Statement document reference object

The statement_document_reference field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
idstring
Required
Statement document number.Must be non-empty when the object is present.
issue_datestring
Optional
Statement document date.If present, format yyyy-MM-dd.
Originator document reference object

The originator_document_reference field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
idstring
Required
Originating document number or identifier.Must be non-empty when the object is present.
issue_datestring
Optional
Originating document date.If present, format yyyy-MM-dd.
Contract document reference object

The contract_document_reference field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
idstring
Required
Contract number or identifier.Must be non-empty when the object is present.
issue_datestring
Optional
Contract date.If present, format yyyy-MM-dd.
Project reference object

The project_reference field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
idstring
Required
Project identifier.Must be non-empty when the object is present.
namestring
Optional
Project name.Free text.
Document line object

Each element of the document_lines array is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
namestring
Required
Line item name.Must be non-empty.
descriptionstring
Optional
Line item description.Free text.
unit_codestring
Required
Unit of measure code (e.g. EA). See Unit of Measure Codes.Must be a valid UN/ECE Recommendation 20 code (e.g. EA, KGM, LTR, C62).
quantitynumber
Required
Quantity.Must be a positive number.
priceobject
Required
Price. On create/update: base_amount, base_quantity. Responses return price_amount (net) instead of base_amount.Must include base_amount on create; base_quantity should be positive when provided.
base_amountnumber
Optional
Calculated line base amount (quantity × unit price).Response-only; distinct from price.base_amount on create.
net_amountnumber
Optional
Net amount.Response-only; calculated.
total_amountnumber
Optional
Total including tax.Response-only; calculated.
tax_amountnumber
Optional
Tax amount for the line.Response-only; calculated from line tax.
classified_tax_categoryobject
Required
Tax category. Contains string id (S, E, O, Z), percent, tax_scheme; for E also tax_exemption_reason_code / tax_exemption_reason; for Z also zero_rated_reason_code / zero_rated_reason. See Tax Categories.id must be a valid tax category; fields must match category rules.
additional_item_identificationarrayConditionalClient-providedIndustrial classification entries (BGOM-06 / BTOM-033). See Additional item identification object below.Required on each line unless transaction_type is simplified, import of goods, import service RCM, or profit margin (IBR-081-OM). When provided, each nature_code must exist in the nature-code master list (GET /api/codelist/nature-codes).
item_specification_document_referenceobjectConditionalClient-providedItem specification reference for service type classification. See Item specification document reference object below.Required on each line unless transaction_type is simplified. When provided, commodity_code and item_type must be valid per OMN codelists.
commodity_classificationobject
Optional
Client-providedCommodity classification (e.g. Harmonised System). See Commodity classification object below.If present, item_classification_code and item_classification_list_id are required; item_classification_code must exist in the item-classification master list (GET /api/codelist/item-classification-codes).
Additional item identification object

Each element of the additional_item_identification array is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
nature_codestring
Required
Industrial Classification Code (BTOM-033). Emitted in UBL as AdditionalItemIdentification/cbc:ID[@schemeName='CC'].Must exist in MongoDB nature_code / GET /api/codelist/nature-codes (e.g. 493001).
Item specification document reference object

The item_specification_document_reference field on a document line is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
commodity_codestring
Required
Service type classification code.Must be a valid code from the service type codelist (e.g. 70000000).
item_typestring
Required
Item type indicator.Must be one of G (Goods) or S (Services).
Commodity classification object

The commodity_classification field on a document line is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
item_classification_codestring
Required
Commodity classification code.Must exist in MongoDB item_classification_codes / GET /api/codelist/item-classification-codes (e.g. 500200000000 for HS).
item_classification_list_idstring
Required
Classification scheme identifier.Must be a valid scheme code (e.g. HS for Harmonised System).
item_classification_list_version_idstring
Optional
Classification scheme version.Defaults to 1.0 if omitted in responses.
Charge object

Each element of the charges array is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
charge_reason_codestring
Required
UN/ECE Recommendation 20 charge reason code.Must be a valid UN/ECE charge reason code (e.g. FC).
amountnumber
Required
Charge amount.Must be numeric, usually ≥ 0.
base_amountnumber
Optional
Base amount for the charge.If used with percentages, must be provided consistently with multiplier/factor logic in your profile.
tax_categoryobject
Optional
Tax category applied to the charge.If present, must be a valid tax category; may be required for VAT calculation.
Allowance object

Each element of the allowances array is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
allowance_reason_codestring
Required
UN/ECE Recommendation 20 allowance reason code.Must be a valid UN/ECE allowance reason code (e.g. 95).
amountnumber
Required
Allowance amount.Must be numeric, usually ≥ 0.
base_amountnumber
Optional
Base amount for the allowance.If used with percentages, must be provided consistently with multiplier/factor logic in your profile.
tax_categoryobject
Optional
Tax category for allowance adjustment.If present, must be a valid tax category and align with invoice VAT rules.
Payment means

The payment_means field is an array of objects. Each item has the following attributes:

FieldTypeRequiredDescriptionValidation
idstring
Optional
Payment instructions ID.Free text.
payment_means_codestring
Required
Payment means code (e.g. 30 for credit transfer).Must be one of: 1, 10, 20, 21, 30, 49, 54, 55, 68.
payment_idarray
Optional
Remittance / payment reference identifiers.Array of strings; may be used for reconciliation.
card_accountobjectConditionalCard details. See Card account below.Required when payment_means_code is 54 or 55.
payee_financial_accountobjectConditionalPayee bank/financial account. See Payee financial account below.Required when payment_means_code is 30.
payment_mandateobjectConditionalDirect debit mandate. See Payment mandate below.Required when payment_means_code is 49.
Card account
FieldTypeRequiredDescriptionValidation
primary_account_number_idstring
Required
Card primary account number (masked PAN).Required when card_account is present.
network_idstring
Required
Card network identifier.Required when card_account is present; required for codes 54 and 55.
holder_namestring
Optional
Card holder name.Free text.
Payee financial account
FieldTypeRequiredDescriptionValidation
idstring
Optional
Account identifier (e.g. IBAN).Free text.
namestring
Optional
Account name.Free text.
financial_institution_branch_idstring
Optional
Financial institution branch identifier.Free text.
addressobject
Optional
Account address.If present, must be a valid address.
Payment mandate
FieldTypeRequiredDescriptionValidation
idstring
Optional
Mandate identifier.Free text.
payer_financial_account_idstring
Optional
Payer financial account identifier.Free text.
Payment terms object

The payment_terms field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
notestring
Optional
Payment terms description.Free text.
due_datestring
Optional
Payment due date.If present, format yyyy-MM-dd.
installment_due_datestring
Optional
Installment due date.If present, format yyyy-MM-dd.
amountnumber
Optional
Amount due.Must be numeric if provided.
Tax exchange rate object

The tax_exchange_rate field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
source_currency_codestring
Required
Source currency (ISO 4217).Must be a valid ISO 4217 code.
target_currency_codestring
Required
Target currency (ISO 4217).Must be a valid ISO 4217 code and usually match tax_currency_code.
calculation_ratenumber
Required
Exchange rate for tax calculation.Must be a positive numeric rate.
Response meta_info object

The meta_info field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
peppol_statusobject
Optional
Peppol participant/OTA processing status.Response-only; see Peppol status object below.
Peppol status object

The meta_info.peppol_status field is an object with the following attributes:

FieldTypeRequiredDescriptionValidation
participant_statusstring
Optional
Participant-level processing status.May be null in early or failed stages.
ota_statusstring
Optional
OTA submission/processing status.May be null in early or failed stages.
overall_statusstring
Optional
Overall Peppol processing status.Must be one of PENDING, APPROVED, REJECTED, VALIDATION_FAILED.
validation_resultsarray
Optional
Validation details/errors returned during processing.Response-only list; empty when there are no validation issues.
Client processing guidance

For the full client processing guidance on Peppol status fields, see Peppol Transmission Status.

Transaction type

There are a limited number of special transaction types in the OMN VAT regime. The invoice transaction type code is a set of flags used to denote the special transaction type. Use 1 if the transaction type is applicable and X if not, in the order listed below.

For a normal invoice use 1XXXXXXXXXXXXXXXXXXX as transaction_type.

Transaction typePositionCondition
Full Tax Invoice1XXXXXXXXXXXXXXXXXXXX
Simplified InvoiceX1XXXXXXXXXXXXXXXXXX
Self BilledXX1XXXXXXXXXXXXXXXXX
Third PartyXXX1XXXXXXXXXXXXXXXX
SummaryXXXX1XXXXXXXXXXXXXXX
Continuous SupplyXXXXX1XXXXXXXXXXXXXX
ExportXXXXXX1XXXXXXXXXXXXX
Deemed SupplyXXXXXXX1XXXXXXXXXXXX
Import Reverse Charge (RCM)XXXXXXXX1XXXXXXXXXXX
Profit MarginXXXXXXXXX1XXXXXXXXXX
Profit Margin Self-InvoiceXXXXXXXXXX1XXXXXXXXX
E-CommerceXXXXXXXXXXX1XXXXXXXX
Import of GoodsXXXXXXXXXXXX1XXXXXXX
Special ZoneXXXXXXXXXXXXX1XXXXXX
PrepaymentXXXXXXXXXXXXXX1XXXXX

*X means not applicable at that position; use 1 where the type applies.*

Examples:

  • 1XXXXXXXXXXXXXXXXXXX: Full tax invoice with no special transaction type. All optional fields absent

  • X1XXXXXXXXXXXXXXXXXX: Simplified tax invoice.

API Docs