curl --location --request GET 'https://api.stateset.app/api/returns' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"limit": 10,
"offset": 0,
"order_direction": "desc",
"status": "Requested"
}'
query ($limit: Int!, $offset: Int!, $order_direction: OrderDirection!, $status: ReturnStatus!) {
returns(limit: $limit, offset: $offset, order_by: {created_date: $order_direction}, where: {status: {_eq: $status }}) {
id
created_date
amount
action_needed
condition
customerEmail
customer_id
description
enteredBy
flat_rate_shipping
order_date
order_id
reason_category
reported_condition
requested_date
rma
serial_number
shipped_date
status
tax_refunded
total_refunded
tracking_number
return_line_items {
id
amount
condition
flat_rate_shipping
name
price
return_id
serial_number
sku
tax_refunded
}
}
}
const returns = await stateset.returns.list({
limit: 10,
offset: 0,
order_direction: 'desc',
status: 'Requested'
});
returns = stateset.returns.list({
"limit": 10,
"offset": 0,
"order_direction": "desc",
"status": "Requested"
})
returns, err := stateset.Returns.List(
10, // limit
0, // offset
"desc", // order_direction
"Requested", // status
)
if err != nil {
// Handle error
}
returns = Stateset::Returns.list(
limit: 10,
offset: 0,
order_direction: 'desc',
status: 'Requested'
)
Returns returns = Stateset.Returns.list(
10, // limit
0, // offset
"desc", // order_direction
"Requested" // status
);
Returns returns = Stateset.Returns.List(
limit: 10,
offset: 0,
order_direction: "desc",
status: "Requested"
);
$returns = Stateset\Returns::list([
'limit' => 10,
'offset' => 0,
'order_direction' => 'desc',
'status' => 'Requested'
]);
GET /api/returns HTTP/1.1
Host: stateset-proxy-server.stateset.cloud.stateset.app
Content-Type: application/json
Authorization: Bearer <token>
{
"limit": 10,
"offset": 0,
"order_direction": "desc",
"status": "Requested"
}
{
"returns": [
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"created_date": "2023-06-28T19:34:59.189838+00:00",
"amount": "150.00",
"action_needed": "Inspection",
"condition": "Damaged",
"customerEmail": "customer@example.com",
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "The product arrived damaged.",
"enteredBy": "1c0a3e4b-7e2d-4b1a-8d6c-3f2e4a5b6c7d",
"flat_rate_shipping": "10.00",
"order_date": "2023-06-20T15:30:00+00:00",
"order_id": "2b8e4f64-1234-5678-9abc-def012345678",
"reason_category": "Product Damage",
"reported_condition": "Damaged",
"requested_date": "2023-06-28T19:30:00+00:00",
"rma": "RMA123456",
"serial_number": "SN789456123",
"shipped_date": "2023-06-29T10:00:00+00:00",
"status": "Approved",
"tax_refunded": "5.00",
"total_refunded": "165.00",
"tracking_number": "TRK1234567890",
"return_line_items": [
{
"id": "a3f5c10b-58cc-4372-a567-0e02b2c3d480",
"amount": "75.00",
"condition": "Damaged",
"flat_rate_shipping": "5.00",
"name": "Widget Pro",
"price": "75.00",
"return_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"serial_number": "SN789456123",
"sku": "SKU12345",
"tax_refunded": "2.50"
}
]
}
]
}
List Returns
This endpoint retrieves a paginated list of return requests based on specified filters and sorting options.
GET
/
api
/
returns
curl --location --request GET 'https://api.stateset.app/api/returns' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"limit": 10,
"offset": 0,
"order_direction": "desc",
"status": "Requested"
}'
query ($limit: Int!, $offset: Int!, $order_direction: OrderDirection!, $status: ReturnStatus!) {
returns(limit: $limit, offset: $offset, order_by: {created_date: $order_direction}, where: {status: {_eq: $status }}) {
id
created_date
amount
action_needed
condition
customerEmail
customer_id
description
enteredBy
flat_rate_shipping
order_date
order_id
reason_category
reported_condition
requested_date
rma
serial_number
shipped_date
status
tax_refunded
total_refunded
tracking_number
return_line_items {
id
amount
condition
flat_rate_shipping
name
price
return_id
serial_number
sku
tax_refunded
}
}
}
const returns = await stateset.returns.list({
limit: 10,
offset: 0,
order_direction: 'desc',
status: 'Requested'
});
returns = stateset.returns.list({
"limit": 10,
"offset": 0,
"order_direction": "desc",
"status": "Requested"
})
returns, err := stateset.Returns.List(
10, // limit
0, // offset
"desc", // order_direction
"Requested", // status
)
if err != nil {
// Handle error
}
returns = Stateset::Returns.list(
limit: 10,
offset: 0,
order_direction: 'desc',
status: 'Requested'
)
Returns returns = Stateset.Returns.list(
10, // limit
0, // offset
"desc", // order_direction
"Requested" // status
);
Returns returns = Stateset.Returns.List(
limit: 10,
offset: 0,
order_direction: "desc",
status: "Requested"
);
$returns = Stateset\Returns::list([
'limit' => 10,
'offset' => 0,
'order_direction' => 'desc',
'status' => 'Requested'
]);
GET /api/returns HTTP/1.1
Host: stateset-proxy-server.stateset.cloud.stateset.app
Content-Type: application/json
Authorization: Bearer <token>
{
"limit": 10,
"offset": 0,
"order_direction": "desc",
"status": "Requested"
}
{
"returns": [
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"created_date": "2023-06-28T19:34:59.189838+00:00",
"amount": "150.00",
"action_needed": "Inspection",
"condition": "Damaged",
"customerEmail": "customer@example.com",
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "The product arrived damaged.",
"enteredBy": "1c0a3e4b-7e2d-4b1a-8d6c-3f2e4a5b6c7d",
"flat_rate_shipping": "10.00",
"order_date": "2023-06-20T15:30:00+00:00",
"order_id": "2b8e4f64-1234-5678-9abc-def012345678",
"reason_category": "Product Damage",
"reported_condition": "Damaged",
"requested_date": "2023-06-28T19:30:00+00:00",
"rma": "RMA123456",
"serial_number": "SN789456123",
"shipped_date": "2023-06-29T10:00:00+00:00",
"status": "Approved",
"tax_refunded": "5.00",
"total_refunded": "165.00",
"tracking_number": "TRK1234567890",
"return_line_items": [
{
"id": "a3f5c10b-58cc-4372-a567-0e02b2c3d480",
"amount": "75.00",
"condition": "Damaged",
"flat_rate_shipping": "5.00",
"name": "Widget Pro",
"price": "75.00",
"return_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"serial_number": "SN789456123",
"sku": "SKU12345",
"tax_refunded": "2.50"
}
]
}
]
}
Body
This is the limit of the returns.
This is the offset of the returns.
This is the order direction of the returns.
This is the status of the returns.
Response
This is the id of the return.
This is the date the return was created.
This is the amount of the return.
This is the action needed for the return.
This is the condition of the return.
This is the email of the customer.
This is the id of the customer.
This is the description of the return.
This is the id of the user who entered the return.
This is the flat rate shipping of the return.
This is the date of the order.
This is the id of the order.
This is the reason category of the return.
This is the reported condition of the return.
This is the requested date of the return.
This is the rma of the return.
This is the serial number of the return.
This is the shipped date of the return.
This is the status of the return.
This is the tax refunded of the return.
This is the total refunded of the return.
This is the tracking number of the return.
This is the line items of the return.
Show Show child attributes
Show Show child attributes
This is the id of the return line item.
This is the amount of the return line item.
This is the condition of the return line item.
This is the flat rate shipping of the return line item.
This is the name of the return line item.
This is the price of the return line item.
This is the id of the return associated with the line item.
This is the serial number of the return line item.
This is the sku of the return line item.
This is the tax refunded of the return line item.
curl --location --request GET 'https://api.stateset.app/api/returns' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"limit": 10,
"offset": 0,
"order_direction": "desc",
"status": "Requested"
}'
query ($limit: Int!, $offset: Int!, $order_direction: OrderDirection!, $status: ReturnStatus!) {
returns(limit: $limit, offset: $offset, order_by: {created_date: $order_direction}, where: {status: {_eq: $status }}) {
id
created_date
amount
action_needed
condition
customerEmail
customer_id
description
enteredBy
flat_rate_shipping
order_date
order_id
reason_category
reported_condition
requested_date
rma
serial_number
shipped_date
status
tax_refunded
total_refunded
tracking_number
return_line_items {
id
amount
condition
flat_rate_shipping
name
price
return_id
serial_number
sku
tax_refunded
}
}
}
const returns = await stateset.returns.list({
limit: 10,
offset: 0,
order_direction: 'desc',
status: 'Requested'
});
returns = stateset.returns.list({
"limit": 10,
"offset": 0,
"order_direction": "desc",
"status": "Requested"
})
returns, err := stateset.Returns.List(
10, // limit
0, // offset
"desc", // order_direction
"Requested", // status
)
if err != nil {
// Handle error
}
returns = Stateset::Returns.list(
limit: 10,
offset: 0,
order_direction: 'desc',
status: 'Requested'
)
Returns returns = Stateset.Returns.list(
10, // limit
0, // offset
"desc", // order_direction
"Requested" // status
);
Returns returns = Stateset.Returns.List(
limit: 10,
offset: 0,
order_direction: "desc",
status: "Requested"
);
$returns = Stateset\Returns::list([
'limit' => 10,
'offset' => 0,
'order_direction' => 'desc',
'status' => 'Requested'
]);
GET /api/returns HTTP/1.1
Host: stateset-proxy-server.stateset.cloud.stateset.app
Content-Type: application/json
Authorization: Bearer <token>
{
"limit": 10,
"offset": 0,
"order_direction": "desc",
"status": "Requested"
}
{
"returns": [
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"created_date": "2023-06-28T19:34:59.189838+00:00",
"amount": "150.00",
"action_needed": "Inspection",
"condition": "Damaged",
"customerEmail": "customer@example.com",
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "The product arrived damaged.",
"enteredBy": "1c0a3e4b-7e2d-4b1a-8d6c-3f2e4a5b6c7d",
"flat_rate_shipping": "10.00",
"order_date": "2023-06-20T15:30:00+00:00",
"order_id": "2b8e4f64-1234-5678-9abc-def012345678",
"reason_category": "Product Damage",
"reported_condition": "Damaged",
"requested_date": "2023-06-28T19:30:00+00:00",
"rma": "RMA123456",
"serial_number": "SN789456123",
"shipped_date": "2023-06-29T10:00:00+00:00",
"status": "Approved",
"tax_refunded": "5.00",
"total_refunded": "165.00",
"tracking_number": "TRK1234567890",
"return_line_items": [
{
"id": "a3f5c10b-58cc-4372-a567-0e02b2c3d480",
"amount": "75.00",
"condition": "Damaged",
"flat_rate_shipping": "5.00",
"name": "Widget Pro",
"price": "75.00",
"return_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"serial_number": "SN789456123",
"sku": "SKU12345",
"tax_refunded": "2.50"
}
]
}
]
}
⌘I