Skip to main content

appCreateGrn

Requires permission purchase:grn:create.

Record goods received against an approved purchase order from an installed app. Each line names its purchase order line and the quantities; the cost, tax and discount come from that line, and the server sets currency, rate and dates. Stock is posted for the accepted units. Needs write_purchasing.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation AppCreateGrn($input: AppCreateGrnInput!) {
appCreateGrn(input: $input) {
id
grnNumber
vehicleNumber
driverName
status
createdAt
inspector {
id
firstName
lastName
email
}
}
}

Variables:

{
"input": {
"lines": [
{
"purchaseOrderItemId": "id",
"receivedQuantity": 0
}
]
}
}

Response:

{
"data": {
"appCreateGrn": {
"id": "id",
"grnNumber": "string",
"vehicleNumber": "string",
"driverName": "string",
"status": "string",
"createdAt": "2025-01-15T00:00:00Z",
"inspector": {
"id": "id",
"firstName": "string",
"lastName": "string",
"email": "string"
}
}
}
}
appCreateGrn(
input: AppCreateGrnInput!
): GRN!

Arguments​

appCreateGrn.input ● AppCreateGrnInput! non-null input​

The goods receipt.

Type​

GRN object​

A goods receipt note: goods received from a vendor into a warehouse, usually against a purchase order.