Skip to main content
POST
/
orders
Create order (draft)
curl --request POST \
  --url https://api.piriod.com/orders/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'x-simple-workspace: <x-simple-workspace>' \
  --data '
{
  "customer": "<string>",
  "document": 123,
  "date": "2023-12-25",
  "shipping_type": "1",
  "lines": [
    {
      "name": "<string>",
      "amount": 123,
      "quantity": 123,
      "description": "<string>",
      "exempt": false,
      "tax": 123,
      "tax_percent": 123
    }
  ],
  "number": 123,
  "address": "<string>",
  "state": 123,
  "carrier_id": "<string>",
  "carrier_name": "<string>",
  "licence_plate": "<string>",
  "note": "<string>",
  "amount": 123,
  "exempt": 123,
  "tax": 123,
  "tax_percent": 123,
  "total": 123,
  "references": [
    {
      "date": "2023-12-25",
      "document": "<string>",
      "serial": "<string>",
      "description": "<string>"
    }
  ]
}
'
{
  "customer": "<string>",
  "document": 123,
  "date": "2023-12-25",
  "shipping_type": "1",
  "lines": [
    {
      "name": "<string>",
      "amount": 123,
      "quantity": 123,
      "id": 123,
      "description": "<string>",
      "exempt": false,
      "tax": 123,
      "tax_percent": 123,
      "total": 123
    }
  ],
  "id": 123,
  "number": 123,
  "address": "<string>",
  "state": 123,
  "carrier_id": "<string>",
  "carrier_name": "<string>",
  "licence_plate": "<string>",
  "note": "<string>",
  "amount": 123,
  "exempt": 123,
  "tax": 123,
  "tax_percent": 123,
  "total": 123,
  "status": "draft",
  "biller_status": "<string>",
  "tax_agency": {},
  "local_file": "<string>",
  "imported": true,
  "test_mode": true,
  "references": [
    {
      "date": "2023-12-25",
      "document": "<string>",
      "serial": "<string>",
      "description": "<string>"
    }
  ],
  "created": "2023-11-07T05:31:56Z",
  "updated": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://piriod-d406ac55.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use header Authorization: Token <api_token>. API tokens are obtained from the Piriod dashboard.

Headers

x-simple-workspace
string
required

Workspace (account) identifier. Required for every request.

x-piriod-test-mode
boolean
default:false

Whether to operate against test-mode data. Defaults to false.

Body

application/json

Sales / shipping order (e.g. Chilean "guía de despacho"). Documents goods movements that may or may not constitute a sale.

customer
string
required

Customer ID.

document
integer
required

Order document type.

date
string<date>
required
shipping_type
enum<string>
required

Shipping classification: 1 venta, 2 ventas por efectuar, 3 consignaciones, 4 entrega gratuita, 5 traslados internos, 6 otros traslados, 7 guía de devolución, 8 traslado para exportación, 9 venta para exportación.

Available options:
1,
2,
3,
4,
5,
6,
7,
8,
9
lines
object[]
required
number
integer | null
address
string | null
Maximum string length: 70
state
integer | null
carrier_id
string | null
Maximum string length: 10
carrier_name
string | null
Maximum string length: 30
licence_plate
string | null
Maximum string length: 7
note
string | null
Maximum string length: 100
amount
integer | null
exempt
integer | null
tax
integer | null
tax_percent
number | null
total
integer | null
references
object[]

Response

Order created.

Sales / shipping order (e.g. Chilean "guía de despacho"). Documents goods movements that may or may not constitute a sale.

customer
string
required

Customer ID.

document
integer
required

Order document type.

date
string<date>
required
shipping_type
enum<string>
required

Shipping classification: 1 venta, 2 ventas por efectuar, 3 consignaciones, 4 entrega gratuita, 5 traslados internos, 6 otros traslados, 7 guía de devolución, 8 traslado para exportación, 9 venta para exportación.

Available options:
1,
2,
3,
4,
5,
6,
7,
8,
9
lines
object[]
required
id
integer
read-only
number
integer | null
address
string | null
Maximum string length: 70
state
integer | null
carrier_id
string | null
Maximum string length: 10
carrier_name
string | null
Maximum string length: 30
licence_plate
string | null
Maximum string length: 7
note
string | null
Maximum string length: 100
amount
integer | null
exempt
integer | null
tax
integer | null
tax_percent
number | null
total
integer | null
status
enum<string>
default:draft
read-only
Available options:
draft,
finalized,
cancelled
biller_status
string
read-only
tax_agency
object
read-only
local_file
string<uri> | null
read-only
imported
boolean
read-only
test_mode
boolean
read-only
references
object[]
created
string<date-time>
read-only
updated
string<date-time>
read-only