GRN Creation API
GRN APIs
GRN Creation API
Create Goods Receipt Notes (GRN) with line items linked to purchase orders
GRN Creation API
Authentication
All requests require an API key in the request headers. Headers:Request
Content-Type:application/json
Body Parameters
Line Items Object
Each item in thelineItems array must contain the following fields:
Code Examples
Success Response
HTTP Status:200 OK
Response Fields:
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