Purchase Orders

Purchase Orders

post
Body
supplierstringRequired
shipping_locationstring | nullableOptionalDefault: null
delivery_datestring | nullableOptionalDefault: null
shipping_namestring | nullableOptionalDefault: null
shipping_feenumber | nullableOptionalDefault: null
shipping_fee_taxnumber | nullableOptionalDefault: null
payment_methodstring | nullableOptionalDefault: null
notesstring | nullableOptionalDefault: null
statusstringOptionalDefault: DRAFT
Responses
201

Created

application/json
post
POST /v1/purchase-orders/ HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 258

{
  "supplier": "text",
  "shipping_location": "text",
  "delivery_date": "text",
  "shipping_name": "text",
  "shipping_fee": 1,
  "shipping_fee_tax": 1,
  "payment_method": "text",
  "notes": "text",
  "status": "DRAFT",
  "line_items": [
    {
      "product_id": 1,
      "qty": 1,
      "carton_qty": 1,
      "carton_price": 1
    }
  ]
}
201

Created

{
  "id": "text",
  "type": "Internal",
  "company_id": 1,
  "order_number": "text",
  "source": "text",
  "status": "text",
  "created_at": "text",
  "shipped_at": "text",
  "paid_at": "text",
  "received_at": "text",
  "completed_at": "text",
  "shipping_location_id": "text",
  "shipping_location_name": "text",
  "delivery_date": "text",
  "currency": "text",
  "amount": 1,
  "amount_notax": 1,
  "amount_tax": 1,
  "amount_paid": 1,
  "payment_method": "text",
  "shipping_name": "text",
  "shipping_fee": 1,
  "shipping_fee_notax": 1,
  "shipping_fee_tax": 1,
  "credit_card_fee": 1,
  "credit_card_fee_notax": 1,
  "credit_card_fee_tax": 1,
  "credit": 1,
  "credit_notax": 1,
  "credit_tax": 1,
  "notes": "text",
  "line_items": [
    {
      "id": 1,
      "order_id": 1,
      "product_id": 1,
      "sku": "text",
      "barcode": "text",
      "name": "text",
      "qty": 1,
      "carton_qty": 1,
      "carton_price": 1,
      "amount": 1,
      "amount_notax": 1,
      "amount_tax": 1
    }
  ],
  "supplier": {
    "id": "text",
    "type": "Internal",
    "name": "text",
    "abn": "text",
    "email": "text",
    "phone": "text",
    "account_number": "text",
    "website": "text",
    "payment_terms": 1,
    "payment_terms_period": "text",
    "currency": "text",
    "notes": "text",
    "contacts": [
      {
        "first_name": "text",
        "last_name": "text",
        "email": "text",
        "phone": "text",
        "mobile_area": "text",
        "mobile_number": "text",
        "role": "text"
      }
    ],
    "locations": [
      {
        "id": "text",
        "name": "text",
        "is_billing": true,
        "is_shipping": true,
        "manage_stock": true,
        "address": "text",
        "suburb": "text",
        "state": "text",
        "postcode": "text",
        "country": "text",
        "location": {},
        "opening_hours": {}
      }
    ],
    "groups": [
      {
        "id": 1,
        "name": "text"
      }
    ]
  }
}
get
Query parameters
idstringRequired
Responses
200

OK

application/json
get
GET /v1/purchase-orders/get?id=text HTTP/1.1
Host: 
Accept: */*
200

OK

{
  "id": "text",
  "type": "Internal",
  "company_id": 1,
  "order_number": "text",
  "source": "text",
  "status": "text",
  "created_at": "text",
  "shipped_at": "text",
  "paid_at": "text",
  "received_at": "text",
  "completed_at": "text",
  "shipping_location_id": "text",
  "shipping_location_name": "text",
  "delivery_date": "text",
  "currency": "text",
  "amount": 1,
  "amount_notax": 1,
  "amount_tax": 1,
  "amount_paid": 1,
  "payment_method": "text",
  "shipping_name": "text",
  "shipping_fee": 1,
  "shipping_fee_notax": 1,
  "shipping_fee_tax": 1,
  "credit_card_fee": 1,
  "credit_card_fee_notax": 1,
  "credit_card_fee_tax": 1,
  "credit": 1,
  "credit_notax": 1,
  "credit_tax": 1,
  "notes": "text",
  "line_items": [
    {
      "id": 1,
      "order_id": 1,
      "product_id": 1,
      "sku": "text",
      "barcode": "text",
      "name": "text",
      "qty": 1,
      "carton_qty": 1,
      "carton_price": 1,
      "amount": 1,
      "amount_notax": 1,
      "amount_tax": 1
    }
  ],
  "supplier": {
    "id": "text",
    "type": "Internal",
    "name": "text",
    "abn": "text",
    "email": "text",
    "phone": "text",
    "account_number": "text",
    "website": "text",
    "payment_terms": 1,
    "payment_terms_period": "text",
    "currency": "text",
    "notes": "text",
    "contacts": [
      {
        "first_name": "text",
        "last_name": "text",
        "email": "text",
        "phone": "text",
        "mobile_area": "text",
        "mobile_number": "text",
        "role": "text"
      }
    ],
    "locations": [
      {
        "id": "text",
        "name": "text",
        "is_billing": true,
        "is_shipping": true,
        "manage_stock": true,
        "address": "text",
        "suburb": "text",
        "state": "text",
        "postcode": "text",
        "country": "text",
        "location": {},
        "opening_hours": {}
      }
    ],
    "groups": [
      {
        "id": 1,
        "name": "text"
      }
    ]
  }
}
get
Query parameters
pageintegerOptional
Responses
200

OK

application/json
get
GET /v1/purchase-orders/latest HTTP/1.1
Host: 
Accept: */*
200

OK

[
  {
    "id": "text",
    "type": "Internal",
    "company_id": 1,
    "order_number": "text",
    "source": "text",
    "status": "text",
    "created_at": "text",
    "shipped_at": "text",
    "paid_at": "text",
    "received_at": "text",
    "completed_at": "text",
    "shipping_location_id": "text",
    "shipping_location_name": "text",
    "delivery_date": "text",
    "currency": "text",
    "amount": 1,
    "amount_notax": 1,
    "amount_tax": 1,
    "amount_paid": 1,
    "payment_method": "text",
    "shipping_name": "text",
    "shipping_fee": 1,
    "shipping_fee_notax": 1,
    "shipping_fee_tax": 1,
    "credit_card_fee": 1,
    "credit_card_fee_notax": 1,
    "credit_card_fee_tax": 1,
    "credit": 1,
    "credit_notax": 1,
    "credit_tax": 1,
    "notes": "text",
    "line_items": [
      {
        "id": 1,
        "order_id": 1,
        "product_id": 1,
        "sku": "text",
        "barcode": "text",
        "name": "text",
        "qty": 1,
        "carton_qty": 1,
        "carton_price": 1,
        "amount": 1,
        "amount_notax": 1,
        "amount_tax": 1
      }
    ],
    "supplier": {
      "id": "text",
      "type": "Internal",
      "name": "text",
      "abn": "text",
      "email": "text",
      "phone": "text",
      "account_number": "text",
      "website": "text",
      "payment_terms": 1,
      "payment_terms_period": "text",
      "currency": "text",
      "notes": "text",
      "contacts": [
        {
          "first_name": "text",
          "last_name": "text",
          "email": "text",
          "phone": "text",
          "mobile_area": "text",
          "mobile_number": "text",
          "role": "text"
        }
      ],
      "locations": [
        {
          "id": "text",
          "name": "text",
          "is_billing": true,
          "is_shipping": true,
          "manage_stock": true,
          "address": "text",
          "suburb": "text",
          "state": "text",
          "postcode": "text",
          "country": "text",
          "location": {},
          "opening_hours": {}
        }
      ],
      "groups": [
        {
          "id": 1,
          "name": "text"
        }
      ]
    }
  }
]
put
Query parameters
idstringRequired
Body
shipping_locationstring | nullableOptionalDefault: null
delivery_datestring | nullableOptionalDefault: null
shipping_namestring | nullableOptionalDefault: null
shipping_feenumber | nullableOptionalDefault: null
shipping_fee_taxnumber | nullableOptionalDefault: null
payment_methodstring | nullableOptionalDefault: null
notesstring | nullableOptionalDefault: null
statusstring | nullableOptionalDefault: null
Responses
202

Accepted

application/json
put
PUT /v1/purchase-orders/modify?id=text HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 231

{
  "shipping_location": "text",
  "delivery_date": "text",
  "shipping_name": "text",
  "shipping_fee": 1,
  "shipping_fee_tax": 1,
  "payment_method": "text",
  "notes": "text",
  "status": "text",
  "line_items": [
    {
      "id": 1,
      "qty": 1,
      "carton_qty": 1,
      "carton_price": 1
    }
  ]
}
202

Accepted

{
  "id": "text",
  "type": "Internal",
  "company_id": 1,
  "order_number": "text",
  "source": "text",
  "status": "text",
  "created_at": "text",
  "shipped_at": "text",
  "paid_at": "text",
  "received_at": "text",
  "completed_at": "text",
  "shipping_location_id": "text",
  "shipping_location_name": "text",
  "delivery_date": "text",
  "currency": "text",
  "amount": 1,
  "amount_notax": 1,
  "amount_tax": 1,
  "amount_paid": 1,
  "payment_method": "text",
  "shipping_name": "text",
  "shipping_fee": 1,
  "shipping_fee_notax": 1,
  "shipping_fee_tax": 1,
  "credit_card_fee": 1,
  "credit_card_fee_notax": 1,
  "credit_card_fee_tax": 1,
  "credit": 1,
  "credit_notax": 1,
  "credit_tax": 1,
  "notes": "text",
  "line_items": [
    {
      "id": 1,
      "order_id": 1,
      "product_id": 1,
      "sku": "text",
      "barcode": "text",
      "name": "text",
      "qty": 1,
      "carton_qty": 1,
      "carton_price": 1,
      "amount": 1,
      "amount_notax": 1,
      "amount_tax": 1
    }
  ],
  "supplier": {
    "id": "text",
    "type": "Internal",
    "name": "text",
    "abn": "text",
    "email": "text",
    "phone": "text",
    "account_number": "text",
    "website": "text",
    "payment_terms": 1,
    "payment_terms_period": "text",
    "currency": "text",
    "notes": "text",
    "contacts": [
      {
        "first_name": "text",
        "last_name": "text",
        "email": "text",
        "phone": "text",
        "mobile_area": "text",
        "mobile_number": "text",
        "role": "text"
      }
    ],
    "locations": [
      {
        "id": "text",
        "name": "text",
        "is_billing": true,
        "is_shipping": true,
        "manage_stock": true,
        "address": "text",
        "suburb": "text",
        "state": "text",
        "postcode": "text",
        "country": "text",
        "location": {},
        "opening_hours": {}
      }
    ],
    "groups": [
      {
        "id": 1,
        "name": "text"
      }
    ]
  }
}
delete
Query parameters
idstringRequired
Responses
202

Accepted

No content

delete
DELETE /v1/purchase-orders/modify?id=text HTTP/1.1
Host: 
Accept: */*
202

Accepted

No content