Skip to main content

returns

Requires at least one of the permissions purchase:debit_note:list or sales:credit_note:list.

Lists returns, sales and purchase, with optional filters and skip / take paging. You see only the directions your list permissions allow: a user who can list credit notes but not debit notes sees sales returns only.

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:

query Returns {
returns {
total
returns {
id
returnNumber
status
type
createdAt
baseTotalAmount
}
}
}

Response:

{
"data": {
"returns": {
"total": 0,
"returns": [
{
"id": "id",
"returnNumber": "string",
"status": "APPROVED",
"type": "DEFECTIVE_RETURN",
"createdAt": "2025-01-15T00:00:00Z",
"baseTotalAmount": 0
}
]
}
}
}
returns(
filters: ReturnFilterInput
skip: Int
take: Int
): ReturnListResponse!

Arguments​

returns.filters ● ReturnFilterInput input​

Filter criteria for return records. Omit to match all.

returns.skip ● Int scalar​

Number of records to skip. Send with take to page through results.

returns.take ● Int scalar​

Number of records to return.

Type​

ReturnListResponse object​

A page of returns and the total number that match.