billing_charges
Fetch billing charges by the authenticated 3PL account to its customers.
Arguments
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
event_id | BigInt | No | 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_id | String | No | Filter by Warehouse ID. | |
status | BillingChargeStatus | No | Filter by invoice status. | |
transaction_types | [BillingChargeTransactionType!] | No | Filter by one or more billing transaction types. | |
date_from | Date | No | 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_to | Date | No | 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. | |
analyze | Boolean | No | If true, the query will only be analyzed (cost estimated) without executing it. |
Return Type
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 {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
legacy_id
confirmation_date
charge_label
category
quantity
rate_amount
amount
customer_account_id
customer_name
warehouse_id
warehouse_from
status
transaction_type
}
cursor
}
total_count
}
}
}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
}
}
}