Skip to main content
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 the lineItems 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
HTTP Status: 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
HTTP Status: 400 Bad Request
HTTP Status: 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 receivedDate field
  • Provide at least one line item with valid quantity, rate, and identifier values
  • The poId must reference an existing purchase order in the system
  • Use description to provide context about the goods received
  • Include remark for any special notes or conditions about the receipt
  • Use referenceNo to 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 identifier that matches the purchase order line items
  • Use positive numbers for quantity and rate
  • 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