# Sales Orders

Sales Orders

## POST /v1/sales-orders/

>

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Sales Orders","description":"Sales Orders"}],"paths":{"/v1/sales-orders/":{"post":{"tags":["Sales Orders"],"operationId":"ff98f98a173515b58eada5f21fdd8385","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSalesOrder"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrder"}}}}}}}},"components":{"schemas":{"CreateSalesOrder":{"required":["customer","line_items"],"properties":{"customer":{"type":"string"},"pick_location":{"type":"string","default":null,"nullable":true},"shipping_location":{"type":"string","default":null,"nullable":true},"delivery_date":{"type":"string","default":null,"nullable":true},"shipping_name":{"type":"string","default":null,"nullable":true},"shipping_fee":{"type":"number","default":null,"nullable":true},"shipping_fee_tax":{"type":"number","default":null,"nullable":true},"invoice_due_at":{"type":"string","default":null,"nullable":true},"payment_method":{"type":"string","default":null,"nullable":true},"reference":{"type":"string","default":null,"nullable":true},"notes":{"type":"string","default":null,"nullable":true},"status":{"type":"string","default":"DRAFT"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CreateSalesOrderLineItem"}}},"type":"object"},"CreateSalesOrderLineItem":{"required":["product_id","qty"],"properties":{"product_id":{"type":"integer"},"qty":{"type":"number"},"carton_qty":{"type":"number","default":null,"nullable":true},"carton_price":{"type":"number","default":null,"nullable":true}},"type":"object"},"SalesOrder":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/SalesOrderType"},"supplier_id":{"type":"integer"},"order_number":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"created_at":{"type":"string","format":"datetime"},"modified_at":{"type":"string","format":"datetime"},"invoice_due_at":{"type":"string","format":"datetime","nullable":true},"shipped_at":{"type":"string","format":"datetime","nullable":true},"paid_at":{"type":"string","format":"datetime","nullable":true},"completed_at":{"type":"string","format":"datetime","nullable":true},"pick_location_id":{"type":"string","nullable":true},"pick_location_name":{"type":"string","nullable":true},"delivery_date":{"type":"string","format":"datetime","nullable":true},"currency":{"type":"string"},"amount":{"type":"number"},"amount_notax":{"type":"number"},"amount_tax":{"type":"number"},"amount_paid":{"type":"number","nullable":true},"payment_method":{"type":"string","nullable":true},"shipping_name":{"type":"string","nullable":true},"shipping_fee":{"type":"number","nullable":true},"shipping_fee_notax":{"type":"number","nullable":true},"shipping_fee_tax":{"type":"number","nullable":true},"credit_card_fee":{"type":"number","nullable":true},"credit_card_fee_notax":{"type":"number","nullable":true},"credit_card_fee_tax":{"type":"number","nullable":true},"credit":{"type":"number","nullable":true},"credit_notax":{"type":"number","nullable":true},"credit_tax":{"type":"number","nullable":true},"notes":{"type":"string"},"last_modified_at":{"type":"string","nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrderLineItem"}},"customer":{"$ref":"#/components/schemas/SalesOrderCustomer"}},"type":"object"},"SalesOrderType":{"type":"string","enum":["Internal","External","Sale"]},"SalesOrderLineItem":{"properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"product_id":{"type":"integer","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"},"carton_qty":{"type":"number"},"carton_price":{"type":"number"},"amount":{"type":"number","nullable":true},"amount_notax":{"type":"number","nullable":true},"amount_tax":{"type":"number","nullable":true}},"type":"object"},"SalesOrderCustomer":{"type":"object","allOf":[{"$ref":"#/components/schemas/Customer"},{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"billing_location":{"oneOf":[{"$ref":"#/components/schemas/Location"}],"nullable":true},"shipping_location":{"oneOf":[{"$ref":"#/components/schemas/Location"}],"nullable":true}},"type":"object"}]},"Customer":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}}},"type":"object"},"CustomerType":{"type":"string","enum":["Internal","External","Custom"]},"Contact":{"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"mobile_area":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"role":{"type":"string","nullable":true}},"type":"object"},"Location":{"properties":{"id":{"type":"string","nullable":true},"name":{"type":"string"},"is_billing":{"type":"boolean"},"is_shipping":{"type":"boolean"},"manage_stock":{"type":"boolean"},"address":{"type":"string"},"suburb":{"type":"string"},"state":{"type":"string"},"postcode":{"type":"string"},"country":{"type":"string"},"location":{"type":"object","nullable":true},"opening_hours":{"type":"object","nullable":true}},"type":"object"},"CustomerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}}
```

## GET /v1/sales-orders/fulfilments/latest

> Fetch the latest Fulfilments from all Sales Orders

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Sales Orders","description":"Sales Orders"}],"paths":{"/v1/sales-orders/fulfilments/latest":{"get":{"tags":["Sales Orders"],"description":"Fetch the latest Fulfilments from all Sales Orders","operationId":"a36d7356200f81a9d99e337f3a0a07d6","parameters":[{"name":"page","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"Next page of results","schema":{"type":"string","format":"uri-reference"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Fulfilment"}}}}}}}}},"components":{"schemas":{"Fulfilment":{"description":"If you only want \"confirmed\" fulfilments then check whether `shipped_at` has been set.","properties":{"id":{"type":"string"},"fulfilment_number":{"type":"string","nullable":true},"created_at":{"type":"string","format":"datetime"},"modified_at":{"type":"string","format":"datetime"},"sales_order_id":{"type":"string"},"sales_order_number":{"type":"string"},"pick_location":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"type":"object","nullable":true},"shipping_type":{"type":"string"},"shipping_rule_id":{"type":"number","nullable":true},"shipping_name":{"type":"string","nullable":true},"pick_start_at":{"type":"string","format":"datetime","nullable":true},"pick_end_at":{"type":"string","format":"datetime","nullable":true},"pack_start_at":{"type":"string","format":"datetime","nullable":true},"pack_end_at":{"type":"string","format":"datetime","nullable":true},"delivery_date":{"type":"string","format":"datetime","nullable":true},"shipped_at":{"type":"string","format":"datetime","nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/FulfilmentLineItem"}},"cartons":{"type":"array","items":{"$ref":"#/components/schemas/FulfilmentCarton"}}},"type":"object"},"FulfilmentLineItem":{"properties":{"id":{"type":"integer"},"sales_order_line_id":{"type":"integer","nullable":true},"product_id":{"type":"integer","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"},"carton_qty":{"type":"number"},"qty_picked":{"type":"number","nullable":true},"qty_packed":{"type":"number","nullable":true}},"type":"object"},"FulfilmentCarton":{"properties":{"id":{"type":"integer"},"carton_number":{"type":"string","nullable":true},"sscc":{"type":"string","nullable":true},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"depth":{"type":"number","nullable":true},"weight":{"type":"number","nullable":true},"contents":{"type":"array","items":{"properties":{"sales_order_line_id":{"type":"integer"},"fulfilment_line_id":{"type":"integer"},"product_id":{"type":"integer","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"}},"type":"object"}}},"type":"object"}}}}
```

## GET /v1/sales-orders/get/fulfilments

> Fetch the Fulfilments for the given Sales Order ID

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Sales Orders","description":"Sales Orders"}],"paths":{"/v1/sales-orders/get/fulfilments":{"get":{"tags":["Sales Orders"],"description":"Fetch the Fulfilments for the given Sales Order ID","operationId":"69ec3380b9fa80b230a77f328b350a8f","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Fulfilment"}}}}}}}}},"components":{"schemas":{"Fulfilment":{"description":"If you only want \"confirmed\" fulfilments then check whether `shipped_at` has been set.","properties":{"id":{"type":"string"},"fulfilment_number":{"type":"string","nullable":true},"created_at":{"type":"string","format":"datetime"},"modified_at":{"type":"string","format":"datetime"},"sales_order_id":{"type":"string"},"sales_order_number":{"type":"string"},"pick_location":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"type":"object","nullable":true},"shipping_type":{"type":"string"},"shipping_rule_id":{"type":"number","nullable":true},"shipping_name":{"type":"string","nullable":true},"pick_start_at":{"type":"string","format":"datetime","nullable":true},"pick_end_at":{"type":"string","format":"datetime","nullable":true},"pack_start_at":{"type":"string","format":"datetime","nullable":true},"pack_end_at":{"type":"string","format":"datetime","nullable":true},"delivery_date":{"type":"string","format":"datetime","nullable":true},"shipped_at":{"type":"string","format":"datetime","nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/FulfilmentLineItem"}},"cartons":{"type":"array","items":{"$ref":"#/components/schemas/FulfilmentCarton"}}},"type":"object"},"FulfilmentLineItem":{"properties":{"id":{"type":"integer"},"sales_order_line_id":{"type":"integer","nullable":true},"product_id":{"type":"integer","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"},"carton_qty":{"type":"number"},"qty_picked":{"type":"number","nullable":true},"qty_packed":{"type":"number","nullable":true}},"type":"object"},"FulfilmentCarton":{"properties":{"id":{"type":"integer"},"carton_number":{"type":"string","nullable":true},"sscc":{"type":"string","nullable":true},"width":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"depth":{"type":"number","nullable":true},"weight":{"type":"number","nullable":true},"contents":{"type":"array","items":{"properties":{"sales_order_line_id":{"type":"integer"},"fulfilment_line_id":{"type":"integer"},"product_id":{"type":"integer","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"}},"type":"object"}}},"type":"object"}}}}
```

## GET /v1/sales-orders/get

>

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Sales Orders","description":"Sales Orders"}],"paths":{"/v1/sales-orders/get":{"get":{"tags":["Sales Orders"],"operationId":"f8d644604617e9b56cb04a0896a61588","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrder"}}}}}}}},"components":{"schemas":{"SalesOrder":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/SalesOrderType"},"supplier_id":{"type":"integer"},"order_number":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"created_at":{"type":"string","format":"datetime"},"modified_at":{"type":"string","format":"datetime"},"invoice_due_at":{"type":"string","format":"datetime","nullable":true},"shipped_at":{"type":"string","format":"datetime","nullable":true},"paid_at":{"type":"string","format":"datetime","nullable":true},"completed_at":{"type":"string","format":"datetime","nullable":true},"pick_location_id":{"type":"string","nullable":true},"pick_location_name":{"type":"string","nullable":true},"delivery_date":{"type":"string","format":"datetime","nullable":true},"currency":{"type":"string"},"amount":{"type":"number"},"amount_notax":{"type":"number"},"amount_tax":{"type":"number"},"amount_paid":{"type":"number","nullable":true},"payment_method":{"type":"string","nullable":true},"shipping_name":{"type":"string","nullable":true},"shipping_fee":{"type":"number","nullable":true},"shipping_fee_notax":{"type":"number","nullable":true},"shipping_fee_tax":{"type":"number","nullable":true},"credit_card_fee":{"type":"number","nullable":true},"credit_card_fee_notax":{"type":"number","nullable":true},"credit_card_fee_tax":{"type":"number","nullable":true},"credit":{"type":"number","nullable":true},"credit_notax":{"type":"number","nullable":true},"credit_tax":{"type":"number","nullable":true},"notes":{"type":"string"},"last_modified_at":{"type":"string","nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrderLineItem"}},"customer":{"$ref":"#/components/schemas/SalesOrderCustomer"}},"type":"object"},"SalesOrderType":{"type":"string","enum":["Internal","External","Sale"]},"SalesOrderLineItem":{"properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"product_id":{"type":"integer","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"},"carton_qty":{"type":"number"},"carton_price":{"type":"number"},"amount":{"type":"number","nullable":true},"amount_notax":{"type":"number","nullable":true},"amount_tax":{"type":"number","nullable":true}},"type":"object"},"SalesOrderCustomer":{"type":"object","allOf":[{"$ref":"#/components/schemas/Customer"},{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"billing_location":{"oneOf":[{"$ref":"#/components/schemas/Location"}],"nullable":true},"shipping_location":{"oneOf":[{"$ref":"#/components/schemas/Location"}],"nullable":true}},"type":"object"}]},"Customer":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}}},"type":"object"},"CustomerType":{"type":"string","enum":["Internal","External","Custom"]},"Contact":{"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"mobile_area":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"role":{"type":"string","nullable":true}},"type":"object"},"Location":{"properties":{"id":{"type":"string","nullable":true},"name":{"type":"string"},"is_billing":{"type":"boolean"},"is_shipping":{"type":"boolean"},"manage_stock":{"type":"boolean"},"address":{"type":"string"},"suburb":{"type":"string"},"state":{"type":"string"},"postcode":{"type":"string"},"country":{"type":"string"},"location":{"type":"object","nullable":true},"opening_hours":{"type":"object","nullable":true}},"type":"object"},"CustomerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}}
```

## GET /v1/sales-orders/invoices/latest

> Fetch the latest Invoices from all Sales Orders

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Sales Orders","description":"Sales Orders"}],"paths":{"/v1/sales-orders/invoices/latest":{"get":{"tags":["Sales Orders"],"description":"Fetch the latest Invoices from all Sales Orders","operationId":"a1b843e97b4dc725ef0632fa24dd4152","parameters":[{"name":"page","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"Next page of results","schema":{"type":"string","format":"uri-reference"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}}}}}},"components":{"schemas":{"Invoice":{"description":"If you only want \"sent\" or \"issued\" invoices then check whether `invoice_sent_at` has been set.","properties":{"id":{"type":"string"},"invoice_number":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"created_at":{"type":"string","format":"datetime"},"modified_at":{"type":"string","format":"datetime"},"sales_order_id":{"type":"string"},"sales_order_number":{"type":"string"},"amount":{"type":"number"},"amount_notax":{"type":"number"},"amount_tax":{"type":"number"},"currency":{"type":"string"},"conversion_rate":{"type":"number"},"payment_method":{"type":"string"},"invoice_sent_at":{"type":"string","format":"datetime","nullable":true},"invoice_due_at":{"type":"string","format":"datetime","nullable":true},"paid_at":{"type":"string","format":"datetime","nullable":true},"paid_amount":{"type":"number","nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItem"}}},"type":"object"},"InvoiceLineItem":{"properties":{"id":{"type":"integer"},"product_id":{"type":"integer","nullable":true},"brand":{"type":"string","nullable":true},"name":{"type":"string"},"size_units":{"type":"number","nullable":true},"size_measure":{"type":"string","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"carton_qty":{"type":"number"},"carton_price":{"type":"number"},"qty":{"type":"number"},"amount":{"type":"number"},"amount_notax":{"type":"number"},"amount_tax":{"type":"number"}},"type":"object"}}}}
```

## GET /v1/sales-orders/get/invoices

> Fetch the Invoices for the given Sales Order ID

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Sales Orders","description":"Sales Orders"}],"paths":{"/v1/sales-orders/get/invoices":{"get":{"tags":["Sales Orders"],"description":"Fetch the Invoices for the given Sales Order ID","operationId":"41eed9e0236c745dd4407d1b81c18cb7","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}}}}}},"components":{"schemas":{"Invoice":{"description":"If you only want \"sent\" or \"issued\" invoices then check whether `invoice_sent_at` has been set.","properties":{"id":{"type":"string"},"invoice_number":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"created_at":{"type":"string","format":"datetime"},"modified_at":{"type":"string","format":"datetime"},"sales_order_id":{"type":"string"},"sales_order_number":{"type":"string"},"amount":{"type":"number"},"amount_notax":{"type":"number"},"amount_tax":{"type":"number"},"currency":{"type":"string"},"conversion_rate":{"type":"number"},"payment_method":{"type":"string"},"invoice_sent_at":{"type":"string","format":"datetime","nullable":true},"invoice_due_at":{"type":"string","format":"datetime","nullable":true},"paid_at":{"type":"string","format":"datetime","nullable":true},"paid_amount":{"type":"number","nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItem"}}},"type":"object"},"InvoiceLineItem":{"properties":{"id":{"type":"integer"},"product_id":{"type":"integer","nullable":true},"brand":{"type":"string","nullable":true},"name":{"type":"string"},"size_units":{"type":"number","nullable":true},"size_measure":{"type":"string","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"carton_qty":{"type":"number"},"carton_price":{"type":"number"},"qty":{"type":"number"},"amount":{"type":"number"},"amount_notax":{"type":"number"},"amount_tax":{"type":"number"}},"type":"object"}}}}
```

## GET /v1/sales-orders/latest

>

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Sales Orders","description":"Sales Orders"}],"paths":{"/v1/sales-orders/latest":{"get":{"tags":["Sales Orders"],"operationId":"1415aa8d01d150126916080015ac3c66","parameters":[{"name":"page","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","headers":{"Link":{"description":"Next page of results","schema":{"type":"string","format":"uri-reference"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrder"}}}}}}}}},"components":{"schemas":{"SalesOrder":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/SalesOrderType"},"supplier_id":{"type":"integer"},"order_number":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"created_at":{"type":"string","format":"datetime"},"modified_at":{"type":"string","format":"datetime"},"invoice_due_at":{"type":"string","format":"datetime","nullable":true},"shipped_at":{"type":"string","format":"datetime","nullable":true},"paid_at":{"type":"string","format":"datetime","nullable":true},"completed_at":{"type":"string","format":"datetime","nullable":true},"pick_location_id":{"type":"string","nullable":true},"pick_location_name":{"type":"string","nullable":true},"delivery_date":{"type":"string","format":"datetime","nullable":true},"currency":{"type":"string"},"amount":{"type":"number"},"amount_notax":{"type":"number"},"amount_tax":{"type":"number"},"amount_paid":{"type":"number","nullable":true},"payment_method":{"type":"string","nullable":true},"shipping_name":{"type":"string","nullable":true},"shipping_fee":{"type":"number","nullable":true},"shipping_fee_notax":{"type":"number","nullable":true},"shipping_fee_tax":{"type":"number","nullable":true},"credit_card_fee":{"type":"number","nullable":true},"credit_card_fee_notax":{"type":"number","nullable":true},"credit_card_fee_tax":{"type":"number","nullable":true},"credit":{"type":"number","nullable":true},"credit_notax":{"type":"number","nullable":true},"credit_tax":{"type":"number","nullable":true},"notes":{"type":"string"},"last_modified_at":{"type":"string","nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrderLineItem"}},"customer":{"$ref":"#/components/schemas/SalesOrderCustomer"}},"type":"object"},"SalesOrderType":{"type":"string","enum":["Internal","External","Sale"]},"SalesOrderLineItem":{"properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"product_id":{"type":"integer","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"},"carton_qty":{"type":"number"},"carton_price":{"type":"number"},"amount":{"type":"number","nullable":true},"amount_notax":{"type":"number","nullable":true},"amount_tax":{"type":"number","nullable":true}},"type":"object"},"SalesOrderCustomer":{"type":"object","allOf":[{"$ref":"#/components/schemas/Customer"},{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"billing_location":{"oneOf":[{"$ref":"#/components/schemas/Location"}],"nullable":true},"shipping_location":{"oneOf":[{"$ref":"#/components/schemas/Location"}],"nullable":true}},"type":"object"}]},"Customer":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}}},"type":"object"},"CustomerType":{"type":"string","enum":["Internal","External","Custom"]},"Contact":{"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"mobile_area":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"role":{"type":"string","nullable":true}},"type":"object"},"Location":{"properties":{"id":{"type":"string","nullable":true},"name":{"type":"string"},"is_billing":{"type":"boolean"},"is_shipping":{"type":"boolean"},"manage_stock":{"type":"boolean"},"address":{"type":"string"},"suburb":{"type":"string"},"state":{"type":"string"},"postcode":{"type":"string"},"country":{"type":"string"},"location":{"type":"object","nullable":true},"opening_hours":{"type":"object","nullable":true}},"type":"object"},"CustomerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}}
```

## PUT /v1/sales-orders/modify

>

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Sales Orders","description":"Sales Orders"}],"paths":{"/v1/sales-orders/modify":{"put":{"tags":["Sales Orders"],"operationId":"c23893a6f5872e29d5d81795b4f0fb7a","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSalesOrder"}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesOrder"}}}}}}}},"components":{"schemas":{"UpdateSalesOrder":{"required":["line_items"],"properties":{"shipping_location":{"type":"string","default":null,"nullable":true},"delivery_date":{"type":"string","default":null,"nullable":true},"shipping_name":{"type":"string","default":null,"nullable":true},"shipping_fee":{"type":"number","default":null,"nullable":true},"shipping_fee_tax":{"type":"number","default":null,"nullable":true},"invoice_due_at":{"type":"string","default":null,"nullable":true},"payment_method":{"type":"string","default":null,"nullable":true},"notes":{"type":"string","default":null,"nullable":true},"status":{"type":"string","default":null,"nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/UpdateSalesOrderLineItem"}}},"type":"object"},"UpdateSalesOrderLineItem":{"required":["id"],"properties":{"id":{"type":"integer"},"qty":{"type":"number","default":null,"nullable":true},"carton_qty":{"type":"number","default":null,"nullable":true},"carton_price":{"type":"number","default":null,"nullable":true}},"type":"object"},"SalesOrder":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/SalesOrderType"},"supplier_id":{"type":"integer"},"order_number":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"created_at":{"type":"string","format":"datetime"},"modified_at":{"type":"string","format":"datetime"},"invoice_due_at":{"type":"string","format":"datetime","nullable":true},"shipped_at":{"type":"string","format":"datetime","nullable":true},"paid_at":{"type":"string","format":"datetime","nullable":true},"completed_at":{"type":"string","format":"datetime","nullable":true},"pick_location_id":{"type":"string","nullable":true},"pick_location_name":{"type":"string","nullable":true},"delivery_date":{"type":"string","format":"datetime","nullable":true},"currency":{"type":"string"},"amount":{"type":"number"},"amount_notax":{"type":"number"},"amount_tax":{"type":"number"},"amount_paid":{"type":"number","nullable":true},"payment_method":{"type":"string","nullable":true},"shipping_name":{"type":"string","nullable":true},"shipping_fee":{"type":"number","nullable":true},"shipping_fee_notax":{"type":"number","nullable":true},"shipping_fee_tax":{"type":"number","nullable":true},"credit_card_fee":{"type":"number","nullable":true},"credit_card_fee_notax":{"type":"number","nullable":true},"credit_card_fee_tax":{"type":"number","nullable":true},"credit":{"type":"number","nullable":true},"credit_notax":{"type":"number","nullable":true},"credit_tax":{"type":"number","nullable":true},"notes":{"type":"string"},"last_modified_at":{"type":"string","nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/SalesOrderLineItem"}},"customer":{"$ref":"#/components/schemas/SalesOrderCustomer"}},"type":"object"},"SalesOrderType":{"type":"string","enum":["Internal","External","Sale"]},"SalesOrderLineItem":{"properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"product_id":{"type":"integer","nullable":true},"sku":{"type":"string"},"barcode":{"type":"string"},"gtin":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"},"carton_qty":{"type":"number"},"carton_price":{"type":"number"},"amount":{"type":"number","nullable":true},"amount_notax":{"type":"number","nullable":true},"amount_tax":{"type":"number","nullable":true}},"type":"object"},"SalesOrderCustomer":{"type":"object","allOf":[{"$ref":"#/components/schemas/Customer"},{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"billing_location":{"oneOf":[{"$ref":"#/components/schemas/Location"}],"nullable":true},"shipping_location":{"oneOf":[{"$ref":"#/components/schemas/Location"}],"nullable":true}},"type":"object"}]},"Customer":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}}},"type":"object"},"CustomerType":{"type":"string","enum":["Internal","External","Custom"]},"Contact":{"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"mobile_area":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"role":{"type":"string","nullable":true}},"type":"object"},"Location":{"properties":{"id":{"type":"string","nullable":true},"name":{"type":"string"},"is_billing":{"type":"boolean"},"is_shipping":{"type":"boolean"},"manage_stock":{"type":"boolean"},"address":{"type":"string"},"suburb":{"type":"string"},"state":{"type":"string"},"postcode":{"type":"string"},"country":{"type":"string"},"location":{"type":"object","nullable":true},"opening_hours":{"type":"object","nullable":true}},"type":"object"},"CustomerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}}
```

## DELETE /v1/sales-orders/modify

>

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Sales Orders","description":"Sales Orders"}],"paths":{"/v1/sales-orders/modify":{"delete":{"tags":["Sales Orders"],"operationId":"7e9bbe1199efb9e8af88d82a51253475","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Accepted"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.supplyd.co/api/sales-orders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
