performQualityCheck
Requires permission inventory:stock_movement:create.
Records the quality check of one returned item: its score, whether it passed, and notes. The item must belong to the organization. Needs the stock movement create permission and permission to read the return.
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 PerformQualityCheck($input: QualityCheckInput!, $returnItemId: String!) {
performQualityCheck(input: $input, returnItemId: $returnItemId) {
id
createdAt
acceptedQuantity
condition
disposalReason
enteredBy
product {
id
name
status
createdAt
basePrice
baseUOMId
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation PerformQualityCheck($input: QualityCheckInput!, $returnItemId: String!) {\n performQualityCheck(input: $input, returnItemId: $returnItemId) {\n id\n createdAt\n acceptedQuantity\n condition\n disposalReason\n enteredBy\n product {\n id\n name\n status\n createdAt\n basePrice\n baseUOMId\n }\n }\n}",
"variables": {
"input": {
"passed": true,
"score": 0
},
"returnItemId": "string"
}
}
EOF
Variables:
{
"input": {
"passed": true,
"score": 0
},
"returnItemId": "string"
}
Response:
{
"data": {
"performQualityCheck": {
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"acceptedQuantity": 0,
"condition": "DAMAGED",
"disposalReason": "string",
"enteredBy": "string",
"product": {
"id": "id",
"name": "string",
"status": "ACTIVE",
"createdAt": "2025-01-15T00:00:00Z",
"basePrice": 0,
"baseUOMId": "id"
}
}
}
}
performQualityCheck(
input: QualityCheckInput!
returnItemId: String!
): ProductReturnItem!
Arguments
performQualityCheck.input ● QualityCheckInput! non-null input
The score, whether the item passed, and optional notes.
performQualityCheck.returnItemId ● String! non-null scalar
The ID of the return item.
Type
ProductReturnItem object
One line of a return.