GRN Creation API
GRN APIs
GRN Creation API
Create Goods Receipt Notes (GRN) with line items linked to purchase orders
GRN Creation API
Documentation Index
Fetch the complete documentation index at: https://docs.pazy.io/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
All requests require an API key in the request headers. Headers:Request
Content-Type:application/json
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
grnNumber | string | Yes | GRN number to assign to the document (minimum 1 character) |
lineItems | array | Yes | List of line items that make up the GRN (minimum 1 item required) |
poId | string | Yes | Purchase order ID that this GRN is linked to (minimum 1 character) |
receivedDate | string | Yes | Received date for the GRN in ISO-8601 format (YYYY-MM-DD) |
remark | string | No | Remark for the GRN (minimum 1 character) |
referenceNo | string | No | Reference number for the GRN (minimum 1 character) |
description | string | No | Description for the GRN (minimum 1 character) |
Line Items Object
Each item in thelineItems array must contain the following fields:
| Parameter | Type | Required | Description |
|---|---|---|---|
quantity | number | Yes | Quantity received for the line item |
rate | number | Yes | Unit rate to be applied to the line item |
identifier | string | Yes | Description of the line item (minimum 1 character) |
Code Examples
Success Response
HTTP Status:200 OK
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
data | object | Contains the GRN creation response data |
data.id | string | Unique identifier for the GRN |
data.grnNumber | string | GRN number assigned to the document |
data.status | string | Current status of the GRN |
Response Example
Error Responses
Missing Required Fields
HTTP Status:400 Bad Request
400 Bad Request
Invalid Date
HTTP Status:400 Bad Request
Invalid Expected Delivery Date
HTTP Status:400 Bad Request
Invalid Line Items
HTTP Status:400 Bad Request
400 Bad Request
400 Bad Request
Purchase Order Not Found
HTTP Status:404 Not Found
GRN Not Found
HTTP Status:404 Not Found
Invalid State
HTTP Status:400 Bad Request
Invalid Matching Type
HTTP Status:400 Bad Request
Invalid Procurement Type
HTTP Status:400 Bad Request
Invalid Source
HTTP Status:400 Bad Request
Invalid Type
HTTP Status:400 Bad Request
Invalid GSTIN
HTTP Status:400 Bad Request
Invalid Currency
HTTP Status:400 Bad Request
Vendor Not Found
HTTP Status:404 Not Found
Authentication Errors
HTTP Status:401 Unauthorized
Permission Errors
HTTP Status:403 Forbidden
GRN Creation Errors
HTTP Status:500 Internal Server Error
Internal Error
HTTP Status:500 Internal Server Error
Best Practices
GRN Creation
- Ensure all required fields (
grnNumber,lineItems,poId,receivedDate) are provided - Use ISO 8601 date format (YYYY-MM-DD) for the
receivedDatefield - Provide at least one line item with valid
quantity,rate, andidentifiervalues - The
poIdmust reference an existing purchase order in the system - Use
descriptionto provide context about the goods received - Include
remarkfor any special notes or conditions about the receipt - Use
referenceNoto link the GRN to external reference numbers or documents - Ensure the received date is not in the future and aligns with the purchase order timeline
Line Items
- Ensure each line item has a unique
identifierthat matches the purchase order line items - Use positive numbers for
quantityandrate - The quantity received should typically match or be less than the quantity ordered in the purchase order
- Verify that line items correspond to the linked purchase order