billing_charges

Fetch billing charges by the authenticated 3PL account to its customers.

Arguments

ArgumentTypeRequiredDefaultDescription
event_idBigIntNo

Filter by the legacy ID of the event that generated the charge.

customer_account_ids[String!]No

Filter by one or more Account IDs for billed customers.

warehouse_idStringNo

Filter by Warehouse ID.

statusBillingChargeStatusNo

Filter by invoice status.

transaction_types[BillingChargeTransactionType!]No

Filter by one or more billing transaction types.

date_fromDateNo

Inclusive start of the confirmation-date range. Must be provided with date_to. When both dates are omitted, the current UTC month is used. The range cannot exceed six calendar months.

date_toDateNo

Inclusive end of the confirmation-date range. Must be provided with date_from. When both dates are omitted, the current UTC month is used. The range cannot exceed six calendar months.

analyzeBooleanNo

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

Return Type

BillingChargesQueryResult

Query

query billing_charges(
  $event_id: BigInt,
  $customer_account_ids: [String!],
  $warehouse_id: String,
  $status: BillingChargeStatus,
  $transaction_types: [BillingChargeTransactionType!],
  $date_from: Date,
  $date_to: Date,
  $analyze: Boolean
) {
  billing_charges(
    event_id: $event_id,
    customer_account_ids: $customer_account_ids,
    warehouse_id: $warehouse_id,
    status: $status,
    transaction_types: $transaction_types,
    date_from: $date_from,
    date_to: $date_to,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...BillingChargeConnectionFragment
    }
  }
}

Variables

{
  "event_id": BigInt,
  "customer_account_ids": ["abc123"],
  "warehouse_id": "abc123",
  "status": "READY_TO_INVOICE",
  "transaction_types": ["INBOUND"],
  "date_from": Date,
  "date_to": Date,
  "analyze": true
}

Response

{
  "data": {
    "billing_charges": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "data": BillingChargeConnection
    }
  }
}