receivePurchaseOrder
DEPRECATED
Direct receiving is disabled; create a GRN (createGRN) to receive against a purchase order.
Requires permission purchase:purchase_order:update.
Disabled: direct receiving always refuses. Receive goods by creating a goods receipt note with createGRN.
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:
- GraphQL
- cURL
mutation ReceivePurchaseOrder($input: ReceivePurchaseOrderInput!) {
receivePurchaseOrder(input: $input) {
id
orderNumber
supplierCode
trackingCode
creatorName
projectName
items {
id
productName
uomName
variantName
createdAt
canceledQuantity
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ReceivePurchaseOrder($input: ReceivePurchaseOrderInput!) {\n receivePurchaseOrder(input: $input) {\n id\n orderNumber\n supplierCode\n trackingCode\n creatorName\n projectName\n items {\n id\n productName\n uomName\n variantName\n createdAt\n canceledQuantity\n }\n }\n}",
"variables": {
"input": {
"id": "id",
"items": [
{
"itemId": "id",
"receivedQuantity": 0
}
]
}
}
}
EOF
Variables:
{
"input": {
"id": "id",
"items": [
{
"itemId": "id",
"receivedQuantity": 0
}
]
}
}
Response:
{
"data": {
"receivePurchaseOrder": {
"id": "id",
"orderNumber": "string",
"supplierCode": "string",
"trackingCode": "string",
"creatorName": "string",
"projectName": "string",
"items": [
{
"id": "id",
"productName": "string",
"uomName": "string",
"variantName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"canceledQuantity": 0
}
]
}
}
}
Receive part of a purchase order:
- GraphQL
- cURL
mutation ReceivePurchaseOrder($input: ReceivePurchaseOrderInput!) {
receivePurchaseOrder(input: $input) {
id
orderNumber
status
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ReceivePurchaseOrder($input: ReceivePurchaseOrderInput!) {\n receivePurchaseOrder(input: $input) {\n id\n orderNumber\n status\n }\n}",
"variables": {
"input": {
"id": "PURCHASE_ORDER_ID",
"items": [
{
"itemId": "PURCHASE_ORDER_ITEM_ID",
"receivedQuantity": 5
}
]
}
}
}
EOF
Variables:
{
"input": {
"id": "PURCHASE_ORDER_ID",
"items": [
{
"itemId": "PURCHASE_ORDER_ITEM_ID",
"receivedQuantity": 5
}
]
}
}
Response:
{
"data": {
"receivePurchaseOrder": {
"id": "PURCHASE_ORDER_ID",
"orderNumber": "ORDER_NUMBER",
"status": "PARTIALLY_RECEIVED"
}
}
}
receivePurchaseOrder(
input: ReceivePurchaseOrderInput!
): PurchaseOrder! @deprecated
Arguments
receivePurchaseOrder.input ● ReceivePurchaseOrderInput! non-null input
The details of the receive purchase order request.
Type
PurchaseOrder object
A purchase order raised with a supplier.