createInternalReturn
DEPRECATED
Internal returns are not supported; move stock between warehouses with a stock transfer (transferInventory).
Requires permission inventory:stock_transfer:create.
Always refuses: internal returns are not supported. To move stock between warehouses, use a stock transfer.
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 CreateInternalReturn($input: CreateInternalReturnInput!) {
createInternalReturn(input: $input) {
id
returnNumber
rmaNumber
status
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CreateInternalReturn($input: CreateInternalReturnInput!) {\n createInternalReturn(input: $input) {\n id\n returnNumber\n rmaNumber\n status\n }\n}",
"variables": {
"input": {
"fromWarehouseId": "string",
"items": [
{
"condition": "string",
"productId": "string",
"quantity": 0,
"variantId": "string"
}
],
"reason": "string",
"toWarehouseId": "string",
"transferType": "BRANCH_TRANSFER"
}
}
}
EOF
Variables:
{
"input": {
"fromWarehouseId": "string",
"items": [
{
"condition": "string",
"productId": "string",
"quantity": 0,
"variantId": "string"
}
],
"reason": "string",
"toWarehouseId": "string",
"transferType": "BRANCH_TRANSFER"
}
}
Response:
{
"data": {
"createInternalReturn": {
"id": "string",
"returnNumber": "string",
"rmaNumber": "string",
"status": "string"
}
}
}
createInternalReturn(
input: CreateInternalReturnInput!
): ReturnResponse! @deprecated
Arguments
createInternalReturn.input ● CreateInternalReturnInput! non-null input
The details of the internal return to create.
Type
ReturnResponse object
A return created through the RMA flow.