> ## Documentation Index
> Fetch the complete documentation index at: https://developers.cubbo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inventory transactions report

> Returns every inventory movement of a store in a date range as data rows: the same rows the
inventory transactional CSV report carries, with numbers as numbers and timestamps in ISO 8601.
Each row is one movement (inbound, sale, return, damaged, lost, transfer) with its signed
volume, the product's balance after the movement, the warehouse, and the Brazilian invoice
(NF-e) linked to it when there is one.
- **This report must be enabled for your store by Cubbo.** Until it is, every call returns 422 with code `REPORT_NOT_ENABLED`.
- `from` and `to` accept a date (`YYYY-MM-DD`) or a timestamp. A bare date covers the whole day in the report's time zone (America/Sao_Paulo); a timestamp is used as sent. Both must be complete dates (year, month and day).
- The range may not exceed 92 days, and `from` must be on or before `to`.
- At most 10000 rows are returned per call. Larger results are refused with `RESULT_TOO_LARGE` rather than truncated, because `balance_after` is absolute and a narrower range is still correct: split the range and call again.
- `skus[]` restricts the rows to the given SKUs of the store.
- Rows are in chronological order. The data comes from a replica, so very recent movements can lag.
- A store that does not exist or that your token cannot access returns 404 with code `STORE_NOT_FOUND`; the two cases are deliberately indistinguishable.




## OpenAPI

````yaml /openapi.yaml get /reports/inventory-transactions
openapi: 3.1.0
info:
  title: Cubbo Clients API
  version: '1.0'
  summary: >-
    Orders, inventory, replenishments, returns, shipping and webhooks for Cubbo
    fulfillment.
  description: >
    The Cubbo Clients API connects your store, ERP or marketplace with Cubbo's
    fulfillment network.

    All endpoints except `POST /auth/token` require a bearer token; see the
    Authentication guide.

    Request and response bodies are JSON. Errors are JSON objects with an
    `error` key.
  contact:
    name: Cubbo integrations
    email: integraciones@cubbo.com
servers:
  - url: https://api.cubbo.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Exchange client credentials for a bearer token.
  - name: Orders
    description: Create, update, hold, cancel and read sales orders.
  - name: Shipping labels
    description: Read the shipping labels generated for an order.
  - name: Inventory
    description: Products and stock per store.
  - name: Lots
    description: Lot-level inventory for products with expiration or batch tracking.
  - name: Reports
    description: Bulk reports for reconciliation.
  - name: Replenishments
    description: Inbound shipments to the warehouse.
  - name: Returns
    description: Returns and exchanges.
  - name: Stores
    description: Store provisioning and settings.
  - name: Shipping methods
    description: Available shipping methods, coverage and quotes.
  - name: Click and collect
    description: Pickup points and in-store pickup orders.
paths:
  /reports/inventory-transactions:
    get:
      tags:
        - Reports
      summary: Inventory transactions report
      description: >
        Returns every inventory movement of a store in a date range as data
        rows: the same rows the

        inventory transactional CSV report carries, with numbers as numbers and
        timestamps in ISO 8601.

        Each row is one movement (inbound, sale, return, damaged, lost,
        transfer) with its signed

        volume, the product's balance after the movement, the warehouse, and the
        Brazilian invoice

        (NF-e) linked to it when there is one.

        - **This report must be enabled for your store by Cubbo.** Until it is,
        every call returns 422 with code `REPORT_NOT_ENABLED`.

        - `from` and `to` accept a date (`YYYY-MM-DD`) or a timestamp. A bare
        date covers the whole day in the report's time zone (America/Sao_Paulo);
        a timestamp is used as sent. Both must be complete dates (year, month
        and day).

        - The range may not exceed 92 days, and `from` must be on or before
        `to`.

        - At most 10000 rows are returned per call. Larger results are refused
        with `RESULT_TOO_LARGE` rather than truncated, because `balance_after`
        is absolute and a narrower range is still correct: split the range and
        call again.

        - `skus[]` restricts the rows to the given SKUs of the store.

        - Rows are in chronological order. The data comes from a replica, so
        very recent movements can lag.

        - A store that does not exist or that your token cannot access returns
        404 with code `STORE_NOT_FOUND`; the two cases are deliberately
        indistinguishable.
      operationId: getInventoryTransactionsReport
      parameters:
        - name: store_id
          in: query
          required: true
          description: Store to report on.
          schema:
            type: integer
          example: 1234
        - name: from
          in: query
          required: true
          description: >-
            Start of the range. A date (`YYYY-MM-DD`) starts at 00:00:00 of that
            day in America/Sao_Paulo; a timestamp is used as sent.
          schema:
            type: string
          example: '2026-06-01'
        - name: to
          in: query
          required: true
          description: >-
            End of the range. A date (`YYYY-MM-DD`) ends at 23:59:59 of that day
            in America/Sao_Paulo; a timestamp is used as sent (an explicit
            `T00:00:00` is midnight, not the whole day).
          schema:
            type: string
          example: '2026-06-30'
        - name: skus[]
          in: query
          required: false
          description: >-
            Only movements of products carrying one of these SKUs. Repeat the
            parameter for several SKUs.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          example:
            - SKU-RED-M
      responses:
        '200':
          description: The report rows and the resolved range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryTransactionsResponse'
              example:
                data:
                  - cnpj: 00.000.000/0001-00
                    store_name: Example Store
                    transaction_type: inbound
                    invoice_access_key: '00000000000000000000000000000000000000000000'
                    invoice_number: S1 N1001
                    order_number: '5678'
                    inventory_type: physical
                    inbound_outbound: inbound
                    warehouse_code: WH-SP-01
                    warehouse_name: Sao Paulo
                    sku_cph: SKU-RED-M
                    name: Widget Pro Black
                    material_sku: SKU-RED-M
                    volume: 50
                    quantity: 50
                    balance_after: 50
                    timestamp: '2026-06-02T10:15:00-03:00'
                    quality: good
                    quality_source: null
                  - cnpj: 00.000.000/0001-00
                    store_name: Example Store
                    transaction_type: sale
                    invoice_access_key: '00000000000000000000000000000000000000000001'
                    invoice_number: S1 N1002
                    order_number: ORD-0001
                    inventory_type: physical
                    inbound_outbound: outbound
                    warehouse_code: WH-SP-01
                    warehouse_name: Sao Paulo
                    sku_cph: SKU-RED-M
                    name: Widget Pro Black
                    material_sku: SKU-RED-M
                    volume: -2
                    quantity: 2
                    balance_after: 48
                    timestamp: '2026-06-03T16:40:12-03:00'
                    quality: good
                    quality_source: null
                  - cnpj: 00.000.000/0001-00
                    store_name: Example Store
                    transaction_type: lost
                    invoice_access_key: null
                    invoice_number: null
                    order_number: ORD-0002
                    inventory_type: virtual
                    inbound_outbound: inbound
                    warehouse_code: WH-SP-01
                    warehouse_name: Sao Paulo
                    sku_cph: SKU-RED-M
                    name: Widget Pro Black
                    material_sku: SKU-RED-M
                    volume: 1
                    quantity: 1
                    balance_after: 1
                    timestamp: '2026-06-10T09:00:00-03:00'
                    quality: lost
                    quality_source: RETURN
                meta:
                  row_count: 3
                  from: '2026-06-01T00:00:00-03:00'
                  to: '2026-06-30T23:59:59-03:00'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: The store does not exist or your token cannot access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportError'
              example:
                error: store_not_found
                code: STORE_NOT_FOUND
        '422':
          description: >-
            Report not enabled, invalid range, or result too large. `code`
            identifies the case; parameter errors carry a null `code`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportError'
              examples:
                reportNotEnabled:
                  value:
                    error: >-
                      the inventory transactional report is not enabled for this
                      store
                    code: REPORT_NOT_ENABLED
                    context: null
                invalidDate:
                  value:
                    error: '`to` is not a valid date or timestamp'
                    code: INVALID_DATE
                    context: null
                invalidRange:
                  value:
                    error: '`from` must be on or before `to`'
                    code: INVALID_DATE_RANGE
                    context: null
                rangeTooWide:
                  value:
                    error: date range cannot exceed 92 days
                    code: DATE_RANGE_TOO_WIDE
                    context: null
                resultTooLarge:
                  value:
                    error: >-
                      the requested range returns 15230 rows, more than the
                      10000 this endpoint returns at once; request a narrower
                      range
                    code: RESULT_TOO_LARGE
                    context:
                      row_count: 15230
                      max_rows: 10000
                missingParam:
                  value:
                    error: Parameter from is required
                    code: null
                    context: null
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    InventoryTransactionsResponse:
      type: object
      description: Response of `GET /reports/inventory-transactions`.
      properties:
        data:
          type: array
          description: Movements in chronological order.
          items:
            $ref: '#/components/schemas/InventoryTransaction'
        meta:
          type: object
          description: Row count and the range actually applied.
          properties:
            row_count:
              type: integer
              description: Number of rows in `data`.
              example: 3
            from:
              type: string
              format: date-time
              description: Resolved start of the range, in the report time zone.
              example: '2026-06-01T00:00:00-03:00'
            to:
              type: string
              format: date-time
              description: Resolved end of the range, in the report time zone.
              example: '2026-06-30T23:59:59-03:00'
          required:
            - row_count
            - from
            - to
      required:
        - data
        - meta
    ReportError:
      type: object
      description: Error body of the reports endpoint, with a machine-readable code.
      properties:
        error:
          type: string
          description: Human-readable message.
          example: the inventory transactional report is not enabled for this store
        code:
          type:
            - string
            - 'null'
          description: Error code. Null for parameter errors.
          enum:
            - STORE_NOT_FOUND
            - REPORT_NOT_ENABLED
            - INVALID_DATE
            - INVALID_DATE_RANGE
            - DATE_RANGE_TOO_WIDE
            - RESULT_TOO_LARGE
            - null
          example: REPORT_NOT_ENABLED
        context:
          type:
            - object
            - 'null'
          description: >-
            Extra detail for some codes. `RESULT_TOO_LARGE` carries `row_count`
            and `max_rows`.
          additionalProperties: true
          example: null
      required:
        - error
    InventoryTransaction:
      type: object
      description: One inventory movement of a product.
      properties:
        cnpj:
          type:
            - string
            - 'null'
          description: The store's CNPJ (Brazilian company tax id).
          example: 00.000.000/0001-00
        store_name:
          type: string
          description: Store name.
          example: Example Store
        transaction_type:
          type: string
          description: Kind of movement.
          enum:
            - inbound
            - sale
            - return
            - damaged
            - lost
            - transfer_in
            - transfer_out
          example: sale
        invoice_access_key:
          type:
            - string
            - 'null'
          description: >-
            Access key (44 digits) of the NF-e linked to the movement, when
            there is one.
          example: '00000000000000000000000000000000000000000001'
        invoice_number:
          type:
            - string
            - 'null'
          description: Series and number of the linked NF-e, as `S<series> N<number>`.
          example: S1 N1002
        order_number:
          type:
            - string
            - 'null'
          description: >-
            Order number for sale and return movements; replenishment id for
            inbound movements.
          example: ORD-0001
        inventory_type:
          type: string
          description: >-
            `physical` for stock in the warehouse; `virtual` for lost stock,
            which is still owned but cannot be picked.
          enum:
            - physical
            - virtual
          example: physical
        inbound_outbound:
          type: string
          description: Direction of the movement (sign of `volume`).
          enum:
            - inbound
            - outbound
          example: outbound
        warehouse_code:
          type:
            - string
            - 'null'
          description: Code of the warehouse where the movement happened.
          example: WH-SP-01
        warehouse_name:
          type:
            - string
            - 'null'
          description: Name of the warehouse.
          example: Sao Paulo
        sku_cph:
          type:
            - string
            - 'null'
          description: First SKU of the product.
          example: SKU-RED-M
        name:
          type:
            - string
            - 'null'
          description: Product name.
          example: Widget Pro Black
        material_sku:
          type:
            - string
            - 'null'
          description: Second SKU of the product when it has one, otherwise the first.
          example: SKU-RED-M
        volume:
          type: integer
          description: Signed quantity moved (positive inbound, negative outbound).
          example: -2
        quantity:
          type: integer
          description: Absolute quantity moved.
          example: 2
        balance_after:
          type:
            - integer
            - 'null'
          description: Product balance in that quality bucket after the movement.
          example: 48
        timestamp:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the movement happened, in the report time zone
            (America/Sao_Paulo).
          example: '2026-06-03T16:40:12-03:00'
        quality:
          type: string
          description: Stock quality the movement affected.
          enum:
            - good
            - damaged
            - lost
          example: good
        quality_source:
          type:
            - string
            - 'null'
          description: >-
            For damaged and lost movements, where the damage or loss originated.
            Null for good stock.
          enum:
            - REPLENISHMENT
            - RETURN
            - DELIVERY
            - STORAGE
            - null
          example: null
      required:
        - store_name
        - transaction_type
        - inventory_type
        - inbound_outbound
        - volume
        - quantity
        - quality
    Error:
      type: object
      description: Error body returned by every failed request.
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Human-readable description of the failure. For `401` responses it is
            always `Unauthorized`.
          example: Parameter store_id is required
        message:
          type: string
          description: >-
            Present on `401` responses only; the reason the request was
            rejected.
          example: invalid token
        code:
          type:
            - string
            - 'null'
          description: >-
            Stable machine-readable code, present on some order, return and
            replenishment errors.
          example: ORDER_ALREADY_EXISTS
        context:
          type:
            - object
            - 'null'
          description: >-
            Extra data about the failure when available, for example the id of
            the conflicting order.
          additionalProperties: true
          example:
            order_id: 987654
  responses:
    Unauthorized:
      description: >-
        Missing or invalid token, wrong credentials, or no access to the
        requested store.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalidToken:
              value:
                error: Unauthorized
                message: invalid token
            noHeader:
              value:
                error: Unauthorized
                message: no authorization header found
            storeNotAllowed:
              value:
                error: Unauthorized
                message: not allowed to show? this Store
    InternalServerError:
      description: >-
        Unexpected error. Retry with backoff; if it persists, send the timestamp
        to Cubbo support.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'unexpected error, timestamp: 1760000000'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Token returned by `POST /auth/token`, sent as `Authorization: Bearer
        <token>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.