SmartGare
API referenceEndpoints

List the carrier charges of stays

BIL-052. The charges of a carrier, of a visit or recorded in a period — every charge when no filter is given — newest recorded first, one bounded page at a time. Each comes with the amount it was recorded for, the amount its approved corrections leave it at, when it was recorded, what priced it and every line, and the payouts that took it off: none while it waits for the carrier's next payout. **Required permission:** `billing.payout:read`

GET/billing/v1/carrier-charges

BIL-052. The charges of a carrier, of a visit or recorded in a period — every charge when no filter is given — newest recorded first, one bounded page at a time. Each comes with the amount it was recorded for, the amount its approved corrections leave it at, when it was recorded, what priced it and every line, and the payouts that took it off: none while it waits for the carrier's next payout.

Required permission: billing.payout:read

AuthorizationBearer <token>

In: header

Query Parameters

carrier_id?string

Only the charges of this carrier.

vehicle_cycle_id?string

Only the charges of this visit, one per close of its stay.

recorded_from?string

Inclusive lower bound on recorded_at.

Formatdate-time
recorded_to?string

Inclusive upper bound on recorded_at.

Formatdate-time
cursor?string

The next_cursor of the previous page, to continue after it

limit?integer

Page size, 1 to 100; 50 when absent

Formatint32
Range1 <= value <= 100

Response Body

*/*

curl -X GET "https://example.com/billing/v1/carrier-charges"
{  "items": [    {      "carrier_id": "string",      "charge_list_hash": "string",      "charge_list_id": "string",      "charge_revision": 0,      "closed_at": "2019-08-24T14:15:22Z",      "coach_kind": "string",      "corrected_amount": 0,      "currency": "string",      "deductions": [        {          "amount": 0,          "given_back": true,          "payout_id": "string",          "produced_at": "2019-08-24T14:15:22Z",          "statement_number": "string"        }      ],      "departure_at": "2019-08-24T14:15:22Z",      "departure_id": "string",      "id": "string",      "lines": [        {          "amount": 0,          "basis": "string",          "charge_list_line_id": "string",          "charged_minutes": 0,          "minutes": 0,          "rule_version_id": "string",          "tickets_sold": 0,          "tickets_threshold": 0        }      ],      "original_amount": 0,      "recorded_at": "2019-08-24T14:15:22Z",      "source": "string",      "tickets_sold": 0,      "vehicle_cycle_id": "string",      "vehicle_id": "string",      "vehicle_plate": "string"    }  ],  "next_cursor": "string"}