API Reference

Order object

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

Attributes


id

string
Unique object's identifier.


customer

string
The ID of the customer who will be billed. In read resources this field is expandable, returns the customer object.


number

number
A unique, identifying number that appears on order header sent to the customer of this order. It's automatically assigned.


document

string
The ID of the document type for this order. Learn more about.


test_mode

boolean
Has the value true if the object exists in production mode or the value false if the object exists in test mode.


date

date
Closing date of the order. Typically this is the date on which order is generated.


address

string
An address where this order should be delivered.


carrier_id

string
The identifier of the person who must deliver this order.


carrier_name

string
The name of the person who must deliver this order.


state

string
A state where this order should be delivered.


licence_plate

string
The license plate of the vehicle that must deliver this order.


shipping_type

string
The delivery type ID of this order. Learn more about.


lines

list
The list of line items for this order.


amount

decimal
Taxable subtotal of this order.


exempt

decimal
Non taxable subtotal of this order.


tax

decimal
Tax amount of this order.


tax_percent

decimal
Tax rate for this order.


total

decimal
Total of this order.


local_file

url
URL to local format when document type of this order belong to a tax agency.


tax_agency

object
An object with key pairs for tax agency.


status

string
Status of this order, one of draft, finalized or cancelled. Learn more about.


created

datetime
Date and time of the creation of this order.


updated

datetime
Date and time of the last update of this order.


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"
}