createRepairOrder
Requires permission sales:credit_note:create.
Not implemented yet: this call is refused with an error and creates nothing. Repair orders cannot be recorded. Needs the credit notes create permission.
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 CreateRepairOrder($items: [PartialReturnItemInput!]!, $returnId: String!) {
createRepairOrder(items: $items, returnId: $returnId) {
creditNoteId
message
success
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CreateRepairOrder($items: [PartialReturnItemInput!]!, $returnId: String!) {\n createRepairOrder(items: $items, returnId: $returnId) {\n creditNoteId\n message\n success\n }\n}",
"variables": {
"items": [
{
"productId": "string",
"quantity": 0,
"reason": "string",
"variantId": "string"
}
],
"returnId": "string"
}
}
EOF
Variables:
{
"items": [
{
"productId": "string",
"quantity": 0,
"reason": "string",
"variantId": "string"
}
],
"returnId": "string"
}
Response:
{
"data": {
"createRepairOrder": {
"creditNoteId": "string",
"message": "string",
"success": true
}
}
}
createRepairOrder(
items: [PartialReturnItemInput!]!
returnId: String!
): ReturnActionResult!
Arguments
createRepairOrder.items ● [PartialReturnItemInput!]! non-null input
The return items to repair.
createRepairOrder.returnId ● String! non-null scalar
The ID of the return.
Type
ReturnActionResult object
The result of an RMA step that does not return a record, such as an inspection.