> ## Documentation Index
> Fetch the complete documentation index at: https://jobticket-docs.ticket-plus.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Billing Items

> Export every billing item for one period and charge type as a single array.

Returns **all** billing items for one billing period and one charge type in a single, non-paginated response. This is the fastest way to pull a complete month of charges in one call.

To build payroll data, export a month's `ticket-charge` items — you get one entry per employee who received a ticket, each with the employee's `hrId`, the price, and the billing period.

<Note>
  This endpoint requires the `view-billing` permission. See [Authorization](/v1/authorization#permissions).
</Note>

<Tip>
  Unlike [List Billing Items](/v1/endpoint/billing-items-list), this endpoint is **not paginated** — it returns the full result set for the period and charge type at once.
</Tip>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url "https://v1-api.ticket-plus.app/billing/items/2024-05-01/ticket-charge" \
    --header "Authorization: Basic <base64(clientId:clientSecret)>"
  ```

  ```python Python theme={null}
  import requests, base64

  credentials = base64.b64encode(b"<clientId>:<clientSecret>").decode()

  res = requests.get(
      "https://v1-api.ticket-plus.app/billing/items/2024-05-01/ticket-charge",
      headers={"Authorization": f"Basic {credentials}"},
  )
  print(res.json())
  ```

  ```javascript Node.js theme={null}
  const credentials = Buffer.from("<clientId>:<clientSecret>").toString("base64");

  const res = await fetch(
    "https://v1-api.ticket-plus.app/billing/items/2024-05-01/ticket-charge",
    { headers: { Authorization: `Basic ${credentials}` } }
  );
  console.log(await res.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": 1024,
        "billing": {
          "period": "2024-05-01",
          "total": { "label": "€29.00", "value": 2900 },
          "tax": { "label": "€5.51", "value": 551 },
          "overall": { "label": "€34.51", "value": 3451 }
        },
        "charge": {
          "type": "ticket-charge",
          "employee": {
            "profile": {
              "id": 42,
              "firstName": "Anna",
              "lastName": "Müller",
              "email": "anna.mueller@example.com",
              "hrId": "emp_HR_001"
            },
            "exists": true
          },
          "plan": {
            "type": "split-pay-plan",
            "companyAmount": { "label": "€20.00", "value": 2000 },
            "employeeAmount": { "label": "€9.00", "value": 900 }
          }
        },
        "billedAt": "2024-05-01T00:00:00Z",
        "resource": "billing-item",
        "_links": {
          "self": { "href": "https://v1-api.ticket-plus.app/billing/items/1024", "type": "application/json" },
          "employee": { "href": "https://v1-api.ticket-plus.app/employees/42", "type": "application/json" }
        }
      }
    ]
  }
  ```
</ResponseExample>

## Path Parameters

<ParamField path="period" type="string" required>
  The billing period to export, in `YYYY-MM-DD` format — the first day of the billed month, e.g. `2024-05-01`.
</ParamField>

<ParamField path="chargeType" type="string" required>
  The charge type to export. Allowed values: `service-charge`, `ticket-charge`, `hr-integration-charge`, `hr-payroll-integration-charge`, `api-charge`. Use `ticket-charge` to export the per-employee ticket charges for payroll.
</ParamField>

## Response

<ResponseField name="data" type="object[]" required>
  Array of billing item objects for the requested period and charge type. Returned in full — this response is not paginated.

  <Expandable title="billing item object">
    <ResponseField name="id" type="integer" required>
      Unique billing item identifier.
    </ResponseField>

    <ResponseField name="billing" type="object" required>
      The billing period this charge belongs to and its monetary amounts.

      <Expandable title="properties">
        <ResponseField name="period" type="string" required>
          Billing period in `YYYY-MM-DD` format — the first day of the billed month.
        </ResponseField>

        <ResponseField name="total" type="object" required>
          Net amount, before tax.

          <Expandable title="properties">
            <ResponseField name="label" type="string" required>Formatted display string, e.g. `"€29.00"`.</ResponseField>
            <ResponseField name="value" type="integer" required>Raw net amount, in cents (no decimals).</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="tax" type="object" required>
          Tax amount applied to this charge.

          <Expandable title="properties">
            <ResponseField name="label" type="string" required>Formatted display string, e.g. `"€5.51"`.</ResponseField>
            <ResponseField name="value" type="integer" required>Raw tax amount, in cents (no decimals).</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="overall" type="object" required>
          Gross amount — net plus tax. This is what is invoiced.

          <Expandable title="properties">
            <ResponseField name="label" type="string" required>Formatted display string, e.g. `"€34.51"`.</ResponseField>
            <ResponseField name="value" type="integer" required>Raw gross amount, in cents (no decimals).</ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="charge" type="object" required>
      What the charge is for, and the employee it applies to where relevant.

      <Expandable title="properties">
        <ResponseField name="type" type="string" required>
          The kind of charge. Allowed values: `service-charge`, `ticket-charge`, `hr-integration-charge`, `hr-payroll-integration-charge`, `api-charge`.
        </ResponseField>

        <ResponseField name="employee" type="object | null">
          The employee this charge applies to. `null` for company-level charges not tied to an employee.

          <Expandable title="properties">
            <ResponseField name="profile" type="object" required>
              Snapshot of the employee as billed. Fields may be `null` if the employee was removed after being billed.

              <Expandable title="properties">
                <ResponseField name="id" type="integer | null" required>JobTicket employee ID. `null` if the employee no longer exists.</ResponseField>
                <ResponseField name="firstName" type="string | null" required>Employee's first name at the time of billing.</ResponseField>
                <ResponseField name="lastName" type="string | null" required>Employee's last name at the time of billing.</ResponseField>
                <ResponseField name="email" type="string | null" required>Employee's email at the time of billing.</ResponseField>
                <ResponseField name="hrId" type="string | null" required>The employee's ID in your HR system. Use this to match the charge back to your payroll records.</ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="exists" type="boolean" required>
              `true` if the employee still exists in JobTicket; `false` if they have since been removed.
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="plan" type="object | null">
          The subscription plan that produced this charge, and how its cost is split between company and employee. `null` for charges not tied to a plan, such as company-level platform fees.

          <Expandable title="properties">
            <ResponseField name="type" type="string" required>
              Plan type. Allowed values: `fully-subsidized-plan` (company pays the full amount), `deferred-plan` (cost is deferred), `split-pay-plan` (cost is split between company and employee).
            </ResponseField>

            <ResponseField name="companyAmount" type="object">
              The portion of the charge paid by the company.

              <Expandable title="properties">
                <ResponseField name="label" type="string" required>Formatted display string, e.g. `"€29.00"`.</ResponseField>
                <ResponseField name="value" type="integer" required>Raw amount paid by the company, in cents (no decimals).</ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="employeeAmount" type="object">
              The portion of the charge paid by the employee. Zero for a `fully-subsidized-plan`.

              <Expandable title="properties">
                <ResponseField name="label" type="string" required>Formatted display string, e.g. `"€0.00"`.</ResponseField>
                <ResponseField name="value" type="integer" required>Raw amount paid by the employee, in cents (no decimals).</ResponseField>
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="billedAt" type="string" required>
      ISO 8601 timestamp of when the charge was billed.
    </ResponseField>

    <ResponseField name="resource" type="string" required>
      Resource type label. Always `"billing-item"`.
    </ResponseField>

    <ResponseField name="_links" type="object" required>
      HAL hypermedia links.

      <Expandable title="properties">
        <ResponseField name="self" type="object" required>
          Link to this billing item resource.

          <Expandable title="properties">
            <ResponseField name="href" type="string" required>URL of this billing item.</ResponseField>
            <ResponseField name="type" type="string" required>Media type.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="employee" type="object">
          Link to the charged employee. Present only for per-employee charges.

          <Expandable title="properties">
            <ResponseField name="href" type="string" required>URL of the employee resource.</ResponseField>
            <ResponseField name="type" type="string" required>Media type.</ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>


## OpenAPI

````yaml GET /billing/items/{period}/{chargeType}
openapi: 3.0.3
info:
  title: JobTicket API
  description: >-
    The JobTicket B2B API lets you read employee data, manage HR integrations,
    and access employee documents programmatically. All endpoints use HTTP Basic
    Auth — pass your API key credentials from the Developer Portal as the
    username and password.
  version: 1.0.0
servers:
  - url: https://v1-api-staging.ticket-plus.app
    description: Staging server
  - url: https://v1-api.ticket-plus.app
    description: Production Server
security:
  - basicAuth: []
externalDocs:
  url: https://jobticket-docs.ticket-plus.app
  description: View our documentation to get more info
paths:
  /billing/items/{period}/{chargeType}:
    get:
      tags:
        - Billing Items
      summary: Export Billing Items
      description: >-
        Returns every billing item for one billing period and one charge type as
        a single, non-paginated array — convenient for exporting a complete
        month of charges in one request. Use `period` + `ticket-charge` to
        export the full set of per-employee ticket charges for that month and
        build your payroll data from it. Requires the `view-billing` permission.
      parameters:
        - schema:
            type: string
          in: path
          name: period
          required: true
          description: >-
            The billing period to export, in `YYYY-MM-DD` format (the first day
            of the billed month, e.g. `2024-05-01`).
        - schema:
            type: string
            enum:
              - service-charge
              - ticket-charge
              - hr-integration-charge
              - hr-payroll-integration-charge
              - api-charge
          in: path
          name: chargeType
          required: true
          description: >-
            The charge type to export. Allowed values: `service-charge`,
            `ticket-charge`, `hr-integration-charge`,
            `hr-payroll-integration-charge`, `api-charge`.
      responses:
        '200':
          description: All billing items for the given period and charge type.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/BillingItem'
                required:
                  - data
      security:
        - basicAuth: []
components:
  schemas:
    BillingItem:
      type: object
      description: A single charge on your company's invoice, tied to a billing period.
      properties:
        id:
          type: integer
          description: Unique billing item identifier.
        billing:
          type: object
          description: The billing period this charge belongs to and its monetary amounts.
          properties:
            period:
              type: string
              description: >-
                Billing period in `YYYY-MM-DD` format (the first day of the
                billed month, e.g. `2024-05-01`).
            total:
              type: object
              description: Net amount, before tax.
              properties:
                label:
                  type: string
                  description: Formatted display string, e.g. `"€29.00"`.
                value:
                  type: integer
                  description: Raw net amount, in cents (no decimals).
              required:
                - label
                - value
            tax:
              type: object
              description: Tax amount applied to this charge.
              properties:
                label:
                  type: string
                  description: Formatted display string, e.g. `"€5.51"`.
                value:
                  type: integer
                  description: Raw tax amount, in cents (no decimals).
              required:
                - label
                - value
            overall:
              type: object
              description: Gross amount — net plus tax. This is what is invoiced.
              properties:
                label:
                  type: string
                  description: Formatted display string, e.g. `"€34.51"`.
                value:
                  type: integer
                  description: Raw gross amount, in cents (no decimals).
              required:
                - label
                - value
          required:
            - period
            - total
            - tax
            - overall
        charge:
          type: object
          description: >-
            What the charge is for, and the employee it applies to where
            relevant.
          properties:
            type:
              type: string
              enum:
                - service-charge
                - ticket-charge
                - hr-integration-charge
                - hr-payroll-integration-charge
                - api-charge
              description: >-
                The kind of charge. `ticket-charge` is a per-employee transit
                ticket charge — use these to build payroll. Other types
                (`service-charge`, `hr-integration-charge`,
                `hr-payroll-integration-charge`, `api-charge`) are company-level
                platform fees not tied to a single employee.
            employee:
              type: object
              nullable: true
              description: >-
                The employee this charge applies to. `null` for company-level
                charges that are not tied to an employee (e.g.
                `service-charge`).
              properties:
                profile:
                  type: object
                  description: >-
                    Snapshot of the employee as billed. Fields may be `null` if
                    the employee was deleted after being billed.
                  properties:
                    id:
                      type: integer
                      nullable: true
                      description: >-
                        JobTicket employee ID. `null` if the employee no longer
                        exists.
                    firstName:
                      type: string
                      nullable: true
                      description: Employee's first name at the time of billing.
                    lastName:
                      type: string
                      nullable: true
                      description: Employee's last name at the time of billing.
                    email:
                      type: string
                      nullable: true
                      description: Employee's email at the time of billing.
                    hrId:
                      type: string
                      nullable: true
                      description: >-
                        The employee's ID in your HR system — use this to match
                        the charge back to your payroll records.
                  required:
                    - id
                    - firstName
                    - lastName
                    - email
                    - hrId
                exists:
                  type: boolean
                  description: >-
                    `true` if the employee still exists in JobTicket; `false` if
                    they have since been removed.
              required:
                - profile
                - exists
            plan:
              type: object
              nullable: true
              description: >-
                The subscription plan that produced this charge, and how its
                cost is split between company and employee. `null` for charges
                not tied to a plan (e.g. company-level platform fees).
              properties:
                type:
                  type: string
                  enum:
                    - fully-subsidized-plan
                    - deferred-plan
                    - split-pay-plan
                  description: >-
                    Plan type. `fully-subsidized-plan` — the company pays the
                    full amount. `deferred-plan` — the cost is deferred.
                    `split-pay-plan` — the cost is split between company and
                    employee.
                companyAmount:
                  type: object
                  description: The portion of the charge paid by the company.
                  properties:
                    label:
                      type: string
                      description: Formatted display string, e.g. `"€29.00"`.
                    value:
                      type: integer
                      description: Raw amount paid by the company, in cents (no decimals).
                  required:
                    - label
                    - value
                employeeAmount:
                  type: object
                  description: >-
                    The portion of the charge paid by the employee. Zero for a
                    `fully-subsidized-plan`.
                  properties:
                    label:
                      type: string
                      description: Formatted display string, e.g. `"€0.00"`.
                    value:
                      type: integer
                      description: Raw amount paid by the employee, in cents (no decimals).
                  required:
                    - label
                    - value
              required:
                - type
          required:
            - type
        billedAt:
          type: string
          description: ISO 8601 timestamp of when the charge was billed.
        resource:
          type: string
          description: Resource type label. Always `"billing-item"`.
        _links:
          type: object
          description: HAL hypermedia links.
          properties:
            self:
              type: object
              description: Link to this billing item resource.
              properties:
                href:
                  type: string
                  description: URL of this billing item.
                type:
                  type: string
                  description: Media type.
              required:
                - href
                - type
            employee:
              type: object
              description: >-
                Link to the charged employee. Present only for per-employee
                charges.
              properties:
                href:
                  type: string
                  description: URL of the employee resource.
                type:
                  type: string
                  description: Media type.
              required:
                - href
                - type
          required:
            - self
      required:
        - id
        - billing
        - charge
        - billedAt
        - resource
        - _links
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        HTTP Basic Auth using your API key credentials. Use the username and
        password issued from the Developer Portal. Encode them as
        `Base64(username:password)` and pass in the `Authorization: Basic
        <token>` header.

````