Order object

An Order represents a sale or transfer that must be previously delivered before it can be invoiced.

Attributes

AttributeTypeDefaultDescription
idstringUnique order ID
currencystringCurrency code derived from customer (read-only).
customerobjectFull Customer object in responses. In write requests, send customer ID
documentobjectFull Document object in responses. In write requests, send document ID.
datedate (YYYY-MM-DD)Order issue date.
numberintegernullFiscal / document number (usually assigned on finalize)
statusstringOne of draft, finalized, cancelled (read-only in API writes)
biller_statusstringOne of void, pending, succeeded, failed
shipping_typestringShipping / transfer type code
amountnumberTaxable subtotal (auto-calculated)
exemptnumberExempt subtotal (auto-calculated)
taxnumberTotal taxes (auto-calculated)
tax_percentnumberEffective tax rate (auto-calculated)
totalnumberOrder grand total (auto-calculated)
notestringnullFree text note
addressstringnullOptional shipping/reference address
statestringnullState ID (state objects)
carrier_idintegernullCarrier identifier
carrier_namestringnullCarrier name
licence_platestringnullVehicle plate
importedstringIndicates imported record (read-only)
test_modebooleanfalseTest mode flag
tax_settingsobjectCountry-specific fiscal settings
tax_agencyobjectTax authority/biller payload/status metadata (read-only)
local_filestringnullFile path/URL for locally stored fiscal file (read-only)
freight_modalityintegernullFreight modality code (Brazil transport)
transporter_tax_idstringnullTransporter tax ID
transporter_namestringnullTransporter legal name
transporter_state_tax_idstringnullTransporter state tax registration
transporter_addressstringnullTransporter address
transporter_city_namestringnullTransporter city
transporter_state_codestringnullTransporter state code (2 chars)
linesarray of objectsOrder line items
referencesarray of objectsDocument references
volumesarray of objectsTransport volumes
createddatetimenowCreation timestamp (read-only)
updateddatetimenowLast update timestamp (read-only)

Volumes

AttributeTypeDefaultDescription
quantityintegernullNumber of packages/volumes
kindstringnullVolume type / kind
net_weightnumbernullNet weight
gross_weightnumbernullGross weight

Tax settings

The following corresponds to the definition of the fields used to define tax aspects specific to the different electronic invoicing regulations of each country.

Brasil

AttributeTypeDefaultDescription
br_operation_naturestringnullLegal description of the operation shown in NF-e (natureza da operação), e.g. import, transfer, demo shipment
br_operation_typestringDirection of goods movement in NF-e (Incoming for entry, Outgoing for exit)
br_destinationstringDestination scope of the operation (Internal, interstate, or international/external)
br_city_codestringIBGE city code of the NF-e issuance location
br_seriesintegerFiscal series number used to group/sequence NF-e documents
br_issue_datetimedatetimeOfficial NF-e issuance timestamp
br_exit_datetimedatetimenullDate-time when goods actually leave/enter (physical movement timestamp)
br_purpose_typestringFiscal purpose of issuance (normal, complementary, adjustment, return)
br_final_consumer_indicatorstringIndicates whether the recipient is the final consumer
br_presence_indicatorstringIndicates buyer presence/operation context (in-person, internet, tele-sales, etc.)
br_intermediary_indicatorstringIndicates whether the sale/operation used an intermediary platform (marketplace/intermediary)
br_print_typestringDANFE print layout/mode to be used for the NF-e
br_emission_typestringstringEmission mode (normal or contingency mode)
br_process_issuerstringstringIdentifies the system/process that generated the NF-e
br_process_versionstringstringVersion of the emitting process/system
br_additional_fiscal_informationstringstringAdditional information for tax authority only (infAdFisco)
br_additional_informationstringstringComplementary information for recipient/DANFE (infCpl)
br_referencesarrayReferenced fiscal documents for this NF-e (each item points to another NF-e access key)
br_payment_methodstringNF-e payment method code for the payment group (e.g. 90 = no payment at issuance)
br_payment_amountnumberAmount informed in the payment detail group. If omitted, payload builder derives it from order totals/rules

Object sample

{
  "id": "ord_tnlUbv0YSTbzmsx7oH",
  "customer": {
    "id": "cus_APxT9s7X12ilP9Zx9O",
    "name": "Acme Nation LLC",
    "address": "17st, National Sub",
    "state": "IL",
    "country": "US",
    "phone": null,
    "email": "[email protected]",
    "website": "https://www.stark.com",
    "aggregations": {
      "balance": 5756.00,
      "sales": 14324.36,
      "sales_current_period": 1873.00
    },
    "tax_settings": {},
    "metadata": {},
    "created": "2020-05-12 15:42:09",
    "updated": "2020-05-12 21:16:12"
  },
  "number": 1726,
  "document": {
    "id": "US2",
    "name": "Order",
    "country": "US",
    "currency": {
      "id": "USD",
      "available": true,
      "conversion": null,
      "country": "US",
      "default": true,
      "is_chargeable": true,
      "name": "Dólar Estadounidense",
      "name_en": "American Dollar",
      "rounded": false
    }
  },
  "test_mode": false,
  "date": "2020-10-21",
  "address": null,
  "carrier_id": null,
  "carrier_name": null,
  "state": null,
  "licence_plate": null,
  "shipping_type": "1",
  "lines": [
    {
      "id": "lin_APxT9s7X12ilP9Zx9O",
      "name": "My physical product",
      "description": null,
      "quantity": 4.0,
      "amount": 500.00,
      "exempt": false,
      "tax": null,
      "tax_percent": 0,
      "total": 2000.00,
      "created": "2020-10-21T12:01:53.430966-04:00",
      "updated": "2020-10-21T12:01:53.430966-04:00"
    }
  ],
  "amount": 2000.00,
  "exempt": null,
  "tax": null,
  "tax_percent": 0,
  "total": 2000.00,
  "local_file": null,
  "tax_agency": {},
  "status": "finalized",
  "created": "2020-10-21T09:55:07.138915-04:00",
  "updated": "2020-10-21T12:01:53.430966-04:00"
}