returns

Arguments

ArgumentTypeRequiredDefaultDescription
order_idStringNo
warehouse_idStringNo
date_fromISODateTimeNo
date_toISODateTimeNo
customer_account_idStringNo

If you are a 3PL you can specify one of your customer's account

tracking_numberStringNo
analyzeBooleanNo

If true, the query will only be analyzed (cost estimated) without executing it.

Return Type

ReturnsQueryResult

Query

query returns(
  $order_id: String,
  $warehouse_id: String,
  $date_from: ISODateTime,
  $date_to: ISODateTime,
  $customer_account_id: String,
  $tracking_number: String,
  $analyze: Boolean
) {
  returns(
    order_id: $order_id,
    warehouse_id: $warehouse_id,
    date_from: $date_from,
    date_to: $date_to,
    customer_account_id: $customer_account_id,
    tracking_number: $tracking_number,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...ReturnConnectionFragment
    }
  }
}

Variables

{
  "order_id": "abc123",
  "warehouse_id": "abc123",
  "date_from": ISODateTime,
  "date_to": ISODateTime,
  "customer_account_id": "abc123",
  "tracking_number": "abc123",
  "analyze": true
}

Response

{
  "data": {
    "returns": {
      "request_id": "abc123",
      "complexity": 987,
      "data": ReturnConnection
    }
  }
}