Sumtracker
Sumtracker Public API v2025-03

Purchase Orders API.

The purchase orders API and stock transfer API are common.

The URL param document_type is used to determine the type of document.

  • orders for purchase orders
  • stock-transfers for stock transfers

A Stock Transfer (ST) is used for moving stock from one warehouse to another.

A Purchase Order (PO) is used for purchasing products from suppliers.

Against each PO/ST,

  • You can make changes in relevant data only when PO status is DRAFT or INCOMING.
  • You can make 1 or more Receive Notes (GRNs) to receive the goods.

List Orders

GET
https://inventory-api.sumtracker.com/api/version/2025-03
/purchases/{document_type}/
Authorization (header)

List Purchase Orders.

The purchase orders API and stock transfer API are common.

The URL param document_type is used to determine the type of document.

  • orders for purchase orders
  • stock-transfers for stock transfers

A Stock Transfer (ST) is used for moving stock from one warehouse to another.

A Purchase Order (PO) is used for purchasing products from suppliers.

Against each PO/ST,

  • You can make changes in relevant data only when PO status is DRAFT or INCOMING.
  • You can make 1 or more Receive Notes (GRNs) to receive the goods.

List Orders › path Parameters

document_type
​string · pattern: ^orders|stock-transf… · required

List Orders › query Parameters

confirmation_date_range_after
​string · date
confirmation_date_range_before
​string · date
contact
​number
created_range_after
​string · date-time
created_range_before
​string · date-time
expected_arrival_date_range_after
​string · date
expected_arrival_date_range_before
​string · date
from_warehouse
​number
is_task_in_progress
​boolean
limit
​integer

Number of results to return per page.

notes
​string
number
​string
o
​string[] · style: form

Ordering

  • id - Id
  • -id - Id (descending)
  • updated - Updated
  • -updated - Updated (descending)
Enum values:
-id
-updated
id
updated
offset
​integer

The initial index from which to return the results.

ordering
​string

Which field to use when ordering the results.

payment_terms
​string
reference
​string
ship_by_time_range_after
​string · date
ship_by_time_range_before
​string · date
status
​integer
updated_range_after
​string · date-time
updated_range_before
​string · date-time
warehouse
​number

List Orders › Responses

200
count
​integer · required
​PurchaseOrderList[] · required
next
​string | null · uri
previous
​string | null · uri

Create Order

POST
https://inventory-api.sumtracker.com/api/version/2025-03
/purchases/{document_type}/
Authorization (header)

Create Purchase Order

The purchase orders API and stock transfer API are common.

The URL param document_type is used to determine the type of document.

  • orders for purchase orders
  • stock-transfers for stock transfers

A Stock Transfer (ST) is used for moving stock from one warehouse to another.

A Purchase Order (PO) is used for purchasing products from suppliers.

Against each PO/ST,

  • You can make changes in relevant data only when PO status is DRAFT or INCOMING.

  • You can make 1 or more Receive Notes (GRNs) to receive the goods.

  • In stock transfer creation, from_warehouse_id is required.

  • In purchase order creation, contact_id (Supplier) is required.

  • number is optional. When omitted, the next number in the sequence is assigned. When provided, it must be unique for the document type and the sequence still advances by one.

Create Order › path Parameters

document_type
​string · pattern: ^orders|stock-transf… · required

Create Order › Request Body

Purchase Order Base Serializer used for creating, updating and retrieving the PO+ST instance.
warehouse_id
​integer · required
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
is_task_in_progress
​boolean · readOnly · required

Is any background task in progress. For example mark as complete task.

action_performed
​string · readOnly · required

The action performed on the document which initiated the task.

total_quantity
​integer · readOnly · required

Total sum of quantities from all associated lines within the document.

total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
status
​integer · readOnly · required
currency
​string · readOnly · required
conversion_rate
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
billing_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

shipping_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

contact_id
​integer

Required to create a purchase order

from_warehouse_id
​integer

Required to create a stock transfer

notes
​string
extra_charges
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
extra_shipping
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
confirmation_date
​string | null · date

Date the order was confirmed

ship_by_time
​string | null · date

Date by which the supplier is expected to ship the goods

expected_arrival_date
​string | null · date

Date the goods are expected to arrive at the warehouse

payment_terms
​string · maxLength: 200
reference
​string · maxLength: 500
shipping_carrier
​string · maxLength: 200
tracking_number
​string · maxLength: 200
​
number
​string · maxLength: 20

Must be unique per client and document type. Generated automatically when not provided. The automatic number sequence advances even when a number is provided.

Create Order › Responses

Purchase Order Base Serializer used for creating, updating and retrieving the PO+ST instance.
warehouse_id
​integer · required
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
is_task_in_progress
​boolean · readOnly · required

Is any background task in progress. For example mark as complete task.

action_performed
​string · readOnly · required

The action performed on the document which initiated the task.

total_quantity
​integer · readOnly · required

Total sum of quantities from all associated lines within the document.

total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
status
​integer · readOnly · required
currency
​string · readOnly · required
conversion_rate
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
billing_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

shipping_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

contact_id
​integer

Required to create a purchase order

from_warehouse_id
​integer

Required to create a stock transfer

notes
​string
extra_charges
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
extra_shipping
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
confirmation_date
​string | null · date

Date the order was confirmed

ship_by_time
​string | null · date

Date by which the supplier is expected to ship the goods

expected_arrival_date
​string | null · date

Date the goods are expected to arrive at the warehouse

payment_terms
​string · maxLength: 200
reference
​string · maxLength: 500
shipping_carrier
​string · maxLength: 200
tracking_number
​string · maxLength: 200
​
number
​string · maxLength: 20

Must be unique per client and document type. Generated automatically when not provided. The automatic number sequence advances even when a number is provided.


Get Order

GET
https://inventory-api.sumtracker.com/api/version/2025-03
/purchases/{document_type}/{id}/
Authorization (header)

Get a Purchase Order

The purchase orders API and stock transfer API are common.

The URL param document_type is used to determine the type of document.

  • orders for purchase orders
  • stock-transfers for stock transfers

A Stock Transfer (ST) is used for moving stock from one warehouse to another.

A Purchase Order (PO) is used for purchasing products from suppliers.

Against each PO/ST,

  • You can make changes in relevant data only when PO status is DRAFT or INCOMING.
  • You can make 1 or more Receive Notes (GRNs) to receive the goods.

Get Order › path Parameters

document_type
​string · pattern: ^orders|stock-transf… · required
id
​integer · required

Get Order › Responses

200
Serializer used for retrieving, updating or deleting the PO instance.
contact_id
​integer · readOnly · required
warehouse_id
​integer · readOnly · required
from_warehouse_id
​integer · readOnly · required
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
is_task_in_progress
​boolean · readOnly · required

Is any background task in progress. For example mark as complete task.

action_performed
​string · readOnly · required

The action performed on the document which initiated the task.

total_quantity
​integer · readOnly · required

Total sum of quantities from all associated lines within the document.

total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
status
​integer · readOnly · required
currency
​string · readOnly · required
conversion_rate
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
billing_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

shipping_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

notes
​string
extra_charges
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
extra_shipping
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
confirmation_date
​string | null · date

Date the order was confirmed

ship_by_time
​string | null · date

Date by which the supplier is expected to ship the goods

expected_arrival_date
​string | null · date

Date the goods are expected to arrive at the warehouse

payment_terms
​string · maxLength: 200
reference
​string · maxLength: 500
shipping_carrier
​string · maxLength: 200
tracking_number
​string · maxLength: 200
​
number
​string · maxLength: 20

Not editable once the order is closed or cancelled. Must be unique per client and document type.


Update Order

PUT
https://inventory-api.sumtracker.com/api/version/2025-03
/purchases/{document_type}/{id}/
Authorization (header)

Update Purchase Order

The purchase orders API and stock transfer API are common.

The URL param document_type is used to determine the type of document.

  • orders for purchase orders
  • stock-transfers for stock transfers

A Stock Transfer (ST) is used for moving stock from one warehouse to another.

A Purchase Order (PO) is used for purchasing products from suppliers.

Against each PO/ST,

  • You can make changes in relevant data only when PO status is DRAFT or INCOMING.
  • You can make 1 or more Receive Notes (GRNs) to receive the goods.

Update Order › path Parameters

document_type
​string · pattern: ^orders|stock-transf… · required
id
​integer · required

Update Order › Request Body

Serializer used for retrieving, updating or deleting the PO instance.
contact_id
​integer · readOnly · required
warehouse_id
​integer · readOnly · required
from_warehouse_id
​integer · readOnly · required
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
is_task_in_progress
​boolean · readOnly · required

Is any background task in progress. For example mark as complete task.

action_performed
​string · readOnly · required

The action performed on the document which initiated the task.

total_quantity
​integer · readOnly · required

Total sum of quantities from all associated lines within the document.

total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
status
​integer · readOnly · required
currency
​string · readOnly · required
conversion_rate
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
billing_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

shipping_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

notes
​string
extra_charges
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
extra_shipping
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
confirmation_date
​string | null · date

Date the order was confirmed

ship_by_time
​string | null · date

Date by which the supplier is expected to ship the goods

expected_arrival_date
​string | null · date

Date the goods are expected to arrive at the warehouse

payment_terms
​string · maxLength: 200
reference
​string · maxLength: 500
shipping_carrier
​string · maxLength: 200
tracking_number
​string · maxLength: 200
​
number
​string · maxLength: 20

Not editable once the order is closed or cancelled. Must be unique per client and document type.

Update Order › Responses

200
Serializer used for retrieving, updating or deleting the PO instance.
contact_id
​integer · readOnly · required
warehouse_id
​integer · readOnly · required
from_warehouse_id
​integer · readOnly · required
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
is_task_in_progress
​boolean · readOnly · required

Is any background task in progress. For example mark as complete task.

action_performed
​string · readOnly · required

The action performed on the document which initiated the task.

total_quantity
​integer · readOnly · required

Total sum of quantities from all associated lines within the document.

total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
status
​integer · readOnly · required
currency
​string · readOnly · required
conversion_rate
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
billing_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

shipping_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

notes
​string
extra_charges
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
extra_shipping
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
confirmation_date
​string | null · date

Date the order was confirmed

ship_by_time
​string | null · date

Date by which the supplier is expected to ship the goods

expected_arrival_date
​string | null · date

Date the goods are expected to arrive at the warehouse

payment_terms
​string · maxLength: 200
reference
​string · maxLength: 500
shipping_carrier
​string · maxLength: 200
tracking_number
​string · maxLength: 200
​
number
​string · maxLength: 20

Not editable once the order is closed or cancelled. Must be unique per client and document type.


Perform Action on Order

PUT
https://inventory-api.sumtracker.com/api/version/2025-03
/purchases/{document_type}/perform_action/{id}/{action}/
Authorization (header)

Perform action on the purchase order or stock trasnfer.

The URL param document_type is used to determine the type of document.

  • orders for purchase orders
  • stock-transfers for stock transfers

The action can have the following values:

  • mark-incoming Mark the PO as incoming.
  • undo-mark-incoming Undo mark incoming.
  • close Mark the PO as closed.
  • undo-close Reopen the PO.
  • cancel Cancel the order.
  • receive-all-products Receive all due products in a PO. This will create a GRN for receiving the products.
  • generate-pdf Generate a PDF for the PO.

The above actions are async. You will get the task status using the field is_task_in_progress.

Perform Action on Order › path Parameters

action
​string · enum · required
Enum values:
cancel
close
generate-pdf
mark-incoming
receive-all-products
undo-close
undo-mark-incoming
document_type
​string · pattern: ^orders|stock-transf… · required
id
​integer · required

Perform Action on Order › Responses

200
Purchase Order Base Serializer used for creating, updating and retrieving the PO+ST instance.
warehouse_id
​integer · required
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
is_task_in_progress
​boolean · readOnly · required

Is any background task in progress. For example mark as complete task.

action_performed
​string · readOnly · required

The action performed on the document which initiated the task.

total_quantity
​integer · readOnly · required

Total sum of quantities from all associated lines within the document.

total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
status
​integer · readOnly · required
currency
​string · readOnly · required
conversion_rate
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
billing_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

shipping_address_id
​integer | null · readOnly · required
​object · readOnly · required

This serializer makes all fields read-only. It also sets the user's account timezone for the date time fields.

contact_id
​integer

Required to create a purchase order

from_warehouse_id
​integer

Required to create a stock transfer

notes
​string
extra_charges
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
extra_shipping
​string · decimal · pattern: ^-?\d{0,10}(?:\.\d{0…
confirmation_date
​string | null · date

Date the order was confirmed

ship_by_time
​string | null · date

Date by which the supplier is expected to ship the goods

expected_arrival_date
​string | null · date

Date the goods are expected to arrive at the warehouse

payment_terms
​string · maxLength: 200
reference
​string · maxLength: 500
shipping_carrier
​string · maxLength: 200
tracking_number
​string · maxLength: 200
​
number
​string · maxLength: 20

Must be unique per client and document type. Generated automatically when not provided. The automatic number sequence advances even when a number is provided.