Get Invoice Summaries

GET /api/billing/invoice/view/summary

Retrieves all generated invoice summaries (main difference is not including individual invoice lines for the visits) that match the yardId, carrierId, and periodCode attributes provided.

Query parameters

  • carrierId integer(int64)
  • periodCode string

    Period for which the invoice will be generated. The invoices can be retrieved by period. Currently, only monthly periods in the format YYYYMM are supported, but in the future we might support others such as weekly periods in the form of '2025W12'

  • yardId integer(int64)

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id integer(int64)

      Invoice ID

    • yard_id integer(int64)

      Yard ID

    • carrier_id integer(int64)

      Carrier ID

    • invoice_number string

      Invoice number

    • invoice_date Required

      Date the invoice was issued

    • period_code string Required

      Code representing the billing period

    • period_start Required

      Start of the billing period

    • period_end Required

      End of the billing period

    • truck_config object Required

      Configuration for a billable item (currently a vehicle) within a specific Carrier in a Yard

      Additional properties are allowed.

      Hide truck_config attributes Show truck_config attributes object
      • rate_type Required

        Type of rate applied to the carrier configuration

      • flat_billing object

        Billing options for rate type FLAT. (It will be ignored if the rate type is not FLAT)

        Additional properties are allowed.

        Hide flat_billing attributes Show flat_billing attributes object
        • rate_per_month string Required

          Rate charged per month. Json type must be string and not number to prevent rounding errors when there are decimals

        • spots integer(int32)

          The number of spots included in the flat rate before overage charges apply

        • overage_rate_per_day_and_spot string

          Overage rate charged per day for each spot beyond the included number of spots. Json type must be string and not number to prevent rounding errors when there are decimals

        • grace_period string

          ISO8606 Duration (eg. 30 minutes='PT30M', 1 hour='PT1H'). Set to null for no grace period

        • day_calculation

          Day calculation mode

      • daily_billing object

        Billing options for rate type DAILY (It will be ignored if the rate type is not DAILY)

        Additional properties are allowed.

        Hide daily_billing attributes Show daily_billing attributes object
        • rate_per_day string Required

          Rate charged per day. Json type must be string and not number to prevent rounding errors when there are decimals

        • grace_period string

          ISO8606 Duration (eg. 30 minutes='PT30M', 1 hour='PT1H'). Set to null for no grace period

        • day_calculation

          Day calculation mode

    • trucks_section object Required

      Summary of an invoice section for a specific vehicle type

      Additional properties are allowed.

      Hide trucks_section attributes Show trucks_section attributes object
      • rate_type Required

        Type of configuration rate

      • daily_billing object

        Summary of daily billing for a specific vehicle type

        Additional properties are allowed.

        Hide daily_billing attribute Show daily_billing attribute object
        • billable_days integer(int32) Required

          Number of total days billed across all vehicle visits

      • flat_billing object

        Summary of flat billing for a specific vehicle type

        Additional properties are allowed.

        Hide flat_billing attributes Show flat_billing attributes object
        • amount_flat_only number Required

          Amount charged for flat billing

        • overage_days integer(int32) Required

          Number of days exceeding the flat rate across all vehicle visits

        • overage_amount number Required

          Amount charged for exceeding flat rate

      • amount number Required

        The total amount applicable for this vehicle type

    • trailer_config object Required

      Configuration for a billable item (currently a vehicle) within a specific Carrier in a Yard

      Additional properties are allowed.

      Hide trailer_config attributes Show trailer_config attributes object
      • rate_type Required

        Type of rate applied to the carrier configuration

      • flat_billing object

        Billing options for rate type FLAT. (It will be ignored if the rate type is not FLAT)

        Additional properties are allowed.

        Hide flat_billing attributes Show flat_billing attributes object
        • rate_per_month string Required

          Rate charged per month. Json type must be string and not number to prevent rounding errors when there are decimals

        • spots integer(int32)

          The number of spots included in the flat rate before overage charges apply

        • overage_rate_per_day_and_spot string

          Overage rate charged per day for each spot beyond the included number of spots. Json type must be string and not number to prevent rounding errors when there are decimals

        • grace_period string

          ISO8606 Duration (eg. 30 minutes='PT30M', 1 hour='PT1H'). Set to null for no grace period

        • day_calculation

          Day calculation mode

      • daily_billing object

        Billing options for rate type DAILY (It will be ignored if the rate type is not DAILY)

        Additional properties are allowed.

        Hide daily_billing attributes Show daily_billing attributes object
        • rate_per_day string Required

          Rate charged per day. Json type must be string and not number to prevent rounding errors when there are decimals

        • grace_period string

          ISO8606 Duration (eg. 30 minutes='PT30M', 1 hour='PT1H'). Set to null for no grace period

        • day_calculation

          Day calculation mode

    • trailers_section object Required

      Summary of an invoice section for a specific vehicle type

      Additional properties are allowed.

      Hide trailers_section attributes Show trailers_section attributes object
      • rate_type Required

        Type of configuration rate

      • daily_billing object

        Summary of daily billing for a specific vehicle type

        Additional properties are allowed.

        Hide daily_billing attribute Show daily_billing attribute object
        • billable_days integer(int32) Required

          Number of total days billed across all vehicle visits

      • flat_billing object

        Summary of flat billing for a specific vehicle type

        Additional properties are allowed.

        Hide flat_billing attributes Show flat_billing attributes object
        • amount_flat_only number Required

          Amount charged for flat billing

        • overage_days integer(int32) Required

          Number of days exceeding the flat rate across all vehicle visits

        • overage_amount number Required

          Amount charged for exceeding flat rate

      • amount number Required

        The total amount applicable for this vehicle type

    • adjustments_section object

      Summary of adjustments applied to the invoice

      Additional properties are allowed.

      Hide adjustments_section attribute Show adjustments_section attribute object
      • amount number

        The amount adjusted

    • total_amount number

      The total amount billed in this invoice

    • currency string

      The currency used in this invoice

  • 401

    Not Authorized

  • 403

    Not Allowed

GET /api/billing/invoice/view/summary
curl \
 --request GET 'https://api-dev.gatego.io/api/billing/invoice/view/summary'
Response examples (200)
[
  {
    "id": 12345,
    "yard_id": 67890,
    "carrier_id": 11223,
    "invoice_number": "IN23456",
    "invoice_date": "2022-01-01",
    "period_code": "202401",
    "period_start": "2022-01-01T00:00:00Z",
    "period_end": "2022-01-31T23:59:59Z",
    "truck_config": {
      "rate_type": "FLAT",
      "flat_billing": {
        "rate_per_month": "500.00",
        "spots": 8,
        "overage_rate_per_day_and_spot": "20.00",
        "grace_period": "PT1H",
        "day_calculation": "MODE_24HOUR_ROUNDING"
      },
      "daily_billing": {
        "rate_per_day": "20.00",
        "grace_period": "PT1H",
        "day_calculation": "MODE_24HOUR_ROUNDING"
      }
    },
    "trucks_section": {
      "daily_billing": {
        "billable_days": 165
      },
      "flat_billing": {
        "amount_flat_only": 5000.0,
        "overage_days": 62,
        "overage_amount": 500.0
      },
      "amount": 42.0
    },
    "trailer_config": {
      "rate_type": "FLAT",
      "flat_billing": {
        "rate_per_month": "500.00",
        "spots": 8,
        "overage_rate_per_day_and_spot": "20.00",
        "grace_period": "PT1H",
        "day_calculation": "MODE_24HOUR_ROUNDING"
      },
      "daily_billing": {
        "rate_per_day": "20.00",
        "grace_period": "PT1H",
        "day_calculation": "MODE_24HOUR_ROUNDING"
      }
    },
    "trailers_section": {
      "daily_billing": {
        "billable_days": 165
      },
      "flat_billing": {
        "amount_flat_only": 5000.0,
        "overage_days": 62,
        "overage_amount": 500.0
      },
      "amount": 42.0
    },
    "adjustments_section": {
      "amount": 100.0
    },
    "total_amount": 42.0,
    "currency": "USD"
  }
]