Sumtracker
Sumtracker Public API v2025-03

Goods Received Notes (GRN) API.

GRN is used to received products in a purchase order or a stock transfer.

The GRN API is common for both purchase orders and stock transfers.

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

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

Conditions applicable to Goods Received Notes

  • A GRN can be created when the PO is marked INCOMING.
  • GRN needs to be RECEIVED to increase the stock levels.

List GRN

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

List of Received Notes (GRN)

GRN is used to received products in a purchase order or a stock transfer.

The GRN API is common for both purchase orders and stock transfers.

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

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

List GRN › path Parameters

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

List GRN › query Parameters

is_task_in_progress
​boolean
limit
​integer

Number of results to return per page.

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.

status
​string

List GRN › Responses

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

Create GRN

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

Goods Receive Note (GRN) Create API.

GRN is used to received products in a purchase order or a stock transfer.

The GRN API is common for both purchase orders and stock transfers.

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

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

GRN creation raises:

  • ValidationError if the PO is not in INCOMING status.
  • ValidationError if the PO already has 200 receive notes.

Create GRN › path Parameters

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

Create GRN › Request Body

Serializer used for performing CRUD on a GRN.
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
number
​string · 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.

extra_charges
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
extra_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
purchase_order_id
​integer · readOnly · required
is_stock_transfer
​boolean · readOnly · required
delivery_time
​string · date · readOnly · required
warehouse_id
​integer · required

If GRN is created for ST then:

  1. warehouse_id cannot be same as from_warehouse_id
  2. warehouse_id cannot be updated once GRN is created
status
​string · enum · readOnly · required

Current status: DRAFT (editable) → RECEIVED (stock updated) → FINAL (costs applied) or CANCELLED

  • DRAFT - DRAFT
  • RECEIVED - RECEIVED
  • FINAL - FINAL
  • CANCELLED - CANCELLED
Enum values:
DRAFT
RECEIVED
FINAL
CANCELLED
notes
​string
reference
​string · maxLength: 500

Optional reference number or notes for this GRN.

receive_by_time
​string | null · date-time

User defines the expected delivery time.

Create GRN › Responses

Serializer used for performing CRUD on a GRN.
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
number
​string · 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.

extra_charges
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
extra_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
purchase_order_id
​integer · readOnly · required
is_stock_transfer
​boolean · readOnly · required
delivery_time
​string · date · readOnly · required
warehouse_id
​integer · required

If GRN is created for ST then:

  1. warehouse_id cannot be same as from_warehouse_id
  2. warehouse_id cannot be updated once GRN is created
status
​string · enum · readOnly · required

Current status: DRAFT (editable) → RECEIVED (stock updated) → FINAL (costs applied) or CANCELLED

  • DRAFT - DRAFT
  • RECEIVED - RECEIVED
  • FINAL - FINAL
  • CANCELLED - CANCELLED
Enum values:
DRAFT
RECEIVED
FINAL
CANCELLED
notes
​string
reference
​string · maxLength: 500

Optional reference number or notes for this GRN.

receive_by_time
​string | null · date-time

User defines the expected delivery time.


Get GRN

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

Gets the data of a GRN object.

GRN is used to received products in a purchase order or a stock transfer.

The GRN API is common for both purchase orders and stock transfers.

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

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

Get GRN › path Parameters

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

Get GRN › Responses

200
Serializer used for performing CRUD on a GRN.
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
number
​string · 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.

extra_charges
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
extra_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
purchase_order_id
​integer · readOnly · required
is_stock_transfer
​boolean · readOnly · required
delivery_time
​string · date · readOnly · required
warehouse_id
​integer · required

If GRN is created for ST then:

  1. warehouse_id cannot be same as from_warehouse_id
  2. warehouse_id cannot be updated once GRN is created
status
​string · enum · readOnly · required

Current status: DRAFT (editable) → RECEIVED (stock updated) → FINAL (costs applied) or CANCELLED

  • DRAFT - DRAFT
  • RECEIVED - RECEIVED
  • FINAL - FINAL
  • CANCELLED - CANCELLED
Enum values:
DRAFT
RECEIVED
FINAL
CANCELLED
notes
​string
reference
​string · maxLength: 500

Optional reference number or notes for this GRN.

receive_by_time
​string | null · date-time

User defines the expected delivery time.


Update GRN

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

GRN Update API.

  • GRN can only be updated if it is in draft status.
  • In case of stock transfer, warehouse in GRN can not be updated.

Update GRN › path Parameters

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

Update GRN › Request Body

Serializer used for performing CRUD on a GRN.
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
number
​string · 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.

extra_charges
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
extra_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
purchase_order_id
​integer · readOnly · required
is_stock_transfer
​boolean · readOnly · required
delivery_time
​string · date · readOnly · required
warehouse_id
​integer · required

If GRN is created for ST then:

  1. warehouse_id cannot be same as from_warehouse_id
  2. warehouse_id cannot be updated once GRN is created
status
​string · enum · readOnly · required

Current status: DRAFT (editable) → RECEIVED (stock updated) → FINAL (costs applied) or CANCELLED

  • DRAFT - DRAFT
  • RECEIVED - RECEIVED
  • FINAL - FINAL
  • CANCELLED - CANCELLED
Enum values:
DRAFT
RECEIVED
FINAL
CANCELLED
notes
​string
reference
​string · maxLength: 500

Optional reference number or notes for this GRN.

receive_by_time
​string | null · date-time

User defines the expected delivery time.

Update GRN › Responses

200
Serializer used for performing CRUD on a GRN.
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
number
​string · 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.

extra_charges
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
extra_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
purchase_order_id
​integer · readOnly · required
is_stock_transfer
​boolean · readOnly · required
delivery_time
​string · date · readOnly · required
warehouse_id
​integer · required

If GRN is created for ST then:

  1. warehouse_id cannot be same as from_warehouse_id
  2. warehouse_id cannot be updated once GRN is created
status
​string · enum · readOnly · required

Current status: DRAFT (editable) → RECEIVED (stock updated) → FINAL (costs applied) or CANCELLED

  • DRAFT - DRAFT
  • RECEIVED - RECEIVED
  • FINAL - FINAL
  • CANCELLED - CANCELLED
Enum values:
DRAFT
RECEIVED
FINAL
CANCELLED
notes
​string
reference
​string · maxLength: 500

Optional reference number or notes for this GRN.

receive_by_time
​string | null · date-time

User defines the expected delivery time.


Delete GRN

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

GRN Delete API.

  • GRN can only be deleted if it is in draft status.

Delete GRN › path Parameters

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

Delete GRN › Responses

No response body

No data returned

Performs Action on GRN

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

Perform an action on a GRN.

  • mark-received mark the grn as received.
  • undo-receive undo the mark-received action.
  • mark-final finalize the wavg_landed_cost of the product. This action is only available for the PO GRNs.
  • mark-received-and-final marks the GRN as received and final in a single step. Equivalent to performing mark-received followed by mark-final. Only available for PO GRNs (not Stock Transfers).
  • undo-final undo the mark-final action. This action is only available for the PO GRNs.
  • add-due-quantity adds all the due quantity from purchase order to grn.
  • cancel cancels the GRN. This action is only available when GRN is marked received. The above actions are async. You will get the task status using the field is_task_in_progress.

Performs Action on GRN › path Parameters

action
​string · enum · required
Enum values:
add-due-quantity
cancel
mark-final
mark-received
mark-received-and-final
undo-receive
document_type
​string · pattern: ^orders|stock-transf… · required
id
​integer · required
po_id
​integer · required

Performs Action on GRN › Responses

200
Serializer used for performing CRUD on a GRN.
id
​integer · readOnly · required
created
​string · date-time · readOnly · required
updated
​string · date-time · readOnly · required
number
​string · 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.

extra_charges
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
extra_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
subtotal
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_tax
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_shipping
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
total_amount
​string · decimal · readOnly · pattern: ^-?\d{0,10}(?:\.\d{0… · required
purchase_order_id
​integer · readOnly · required
is_stock_transfer
​boolean · readOnly · required
delivery_time
​string · date · readOnly · required
warehouse_id
​integer · required

If GRN is created for ST then:

  1. warehouse_id cannot be same as from_warehouse_id
  2. warehouse_id cannot be updated once GRN is created
status
​string · enum · readOnly · required

Current status: DRAFT (editable) → RECEIVED (stock updated) → FINAL (costs applied) or CANCELLED

  • DRAFT - DRAFT
  • RECEIVED - RECEIVED
  • FINAL - FINAL
  • CANCELLED - CANCELLED
Enum values:
DRAFT
RECEIVED
FINAL
CANCELLED
notes
​string
reference
​string · maxLength: 500

Optional reference number or notes for this GRN.

receive_by_time
​string | null · date-time

User defines the expected delivery time.