> ## 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.

# Get a replenishment

> Returns a replenishment with its lines, the quantities received so far, the supplier invoice
numbers captured at reception and the documents uploaded during receiving.

- `replenishment_products[].received_quantity` counts units physically received for the line
  (counted at the dock, stored, or reserved), so it is `0` until receiving starts and excludes
  sell-ahead units that have not arrived.
- `replenishment_products[].received_by_invoice` splits `received_quantity` by the supplier
  invoice (factura) number each unit was stamped with at reception. Units received without a
  captured invoice fall into the `invoice_number: null` bucket, which is listed last. The
  buckets always add up to `received_quantity`. Supplier invoice capture must be enabled for the
  warehouse or the store by Cubbo support; otherwise everything lands in the `null` bucket.
- `supplier_invoices` lists the distinct supplier invoice numbers captured for this replenishment
  (the fiscal record, kept even after the units are put away). `supplier_invoice_files` lists the
  documents uploaded during receiving as short-lived download links (valid for 15 minutes).
- `return` is filled only when the replenishment is the reception of a return (`is_return: true`).




## OpenAPI

````yaml /openapi.yaml get /replenishments/{replenishment_id}
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:
  /replenishments/{replenishment_id}:
    get:
      tags:
        - Replenishments
      summary: Get a replenishment
      description: >
        Returns a replenishment with its lines, the quantities received so far,
        the supplier invoice

        numbers captured at reception and the documents uploaded during
        receiving.


        - `replenishment_products[].received_quantity` counts units physically
        received for the line
          (counted at the dock, stored, or reserved), so it is `0` until receiving starts and excludes
          sell-ahead units that have not arrived.
        - `replenishment_products[].received_by_invoice` splits
        `received_quantity` by the supplier
          invoice (factura) number each unit was stamped with at reception. Units received without a
          captured invoice fall into the `invoice_number: null` bucket, which is listed last. The
          buckets always add up to `received_quantity`. Supplier invoice capture must be enabled for the
          warehouse or the store by Cubbo support; otherwise everything lands in the `null` bucket.
        - `supplier_invoices` lists the distinct supplier invoice numbers
        captured for this replenishment
          (the fiscal record, kept even after the units are put away). `supplier_invoice_files` lists the
          documents uploaded during receiving as short-lived download links (valid for 15 minutes).
        - `return` is filled only when the replenishment is the reception of a
        return (`is_return: true`).
      operationId: getReplenishment
      parameters:
        - name: replenishment_id
          in: path
          required: true
          description: Cubbo id of the replenishment.
          schema:
            type: integer
          example: 55001
      responses:
        '200':
          description: The replenishment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Replenishment'
              example:
                id: 55001
                status: PROCESSING
                store_id: 1234
                notes: Pallet 2 contains fragile items
                created_at: '2026-10-12T14:03:11.512Z'
                expected_arrived_at: '2026-11-02T15:00:00.000Z'
                sell_ahead: false
                declared_value: null
                is_return: false
                completed_at: null
                supplier_invoices:
                  - invoice_number: F-111
                  - invoice_number: F-222
                supplier_invoice_files:
                  - url: >-
                      https://files.example.com/replenishments/55001/factura.pdf?signature=fake
                    filename: factura.pdf
                    content_type: application/pdf
                    byte_size: 48213
                    expires_at: '2026-10-12T14:18:11Z'
                return: null
                replenishment_products:
                  - product_id: 9001
                    expected_quantity: 100
                    unit_value: '12.5'
                    product:
                      id: 9001
                      name: Red T-shirt M
                      bar_code: '7501234567890'
                      is_scannable: true
                      product_codes:
                        - id: 31001
                          sku: SKU-RED-M
                    received_quantity: 80
                    received_by_invoice:
                      - invoice_number: F-111
                        quantity: 50
                      - invoice_number: F-222
                        quantity: 20
                      - invoice_number: null
                        quantity: 10
                  - product_id: 9002
                    expected_quantity: 48
                    unit_value: null
                    product:
                      id: 9002
                      name: Blue box
                      bar_code: '7501234567891'
                      is_scannable: true
                      product_codes:
                        - id: 31002
                          sku: SKU-BOX-BLUE
                    received_quantity: 0
                    received_by_invoice: []
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: Validation or business error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                notFound:
                  value:
                    error: no replenishment with id 55001 was found.
                invalidId:
                  value:
                    error: '''replenishment_id'' is not a valid Integer'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    Replenishment:
      type: object
      description: >-
        Replenishment as returned by GET, including reception progress and
        supplier invoices.
      properties:
        id:
          type: integer
          description: Replenishment id.
          example: 55001
        status:
          $ref: '#/components/schemas/ReplenishmentStatus'
        store_id:
          type: integer
          description: Store the replenishment belongs to.
          example: 1234
        notes:
          type:
            - string
            - 'null'
          description: Free-text notes for the warehouse.
          example: Pallet 2 contains fragile items
        created_at:
          type: string
          format: date-time
          description: Creation time.
          example: '2026-10-12T14:03:11.512Z'
        expected_arrived_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Expected arrival date declared on creation.
          example: '2026-11-02T15:00:00.000Z'
        sell_ahead:
          type:
            - boolean
            - 'null'
          description: Whether the announced units were made sellable before arrival.
          example: false
        declared_value:
          type:
            - string
            - 'null'
          description: >-
            Declared total value of the shipment, as a decimal string; usually
            `null`.
          example: null
        is_return:
          type: boolean
          description: '`true` when this replenishment is the reception of a return.'
          example: false
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When receiving finished; `null` until the status is `COMPLETED`.
          example: null
        supplier_invoices:
          type: array
          description: >-
            Distinct supplier invoice numbers captured during receiving, sorted;
            empty when none were captured.
          items:
            $ref: '#/components/schemas/ReplenishmentSupplierInvoice'
        supplier_invoice_files:
          type: array
          description: >-
            Documents uploaded during receiving (invoice PDF and supporting
            files) as short-lived links; empty when none.
          items:
            $ref: '#/components/schemas/ReplenishmentSupplierInvoiceFile'
        return:
          oneOf:
            - $ref: '#/components/schemas/ReplenishmentReturn'
            - type: 'null'
          description: >-
            The return being received, or `null` for a regular inbound
            replenishment.
        replenishment_products:
          type: array
          description: Announced lines with reception progress.
          items:
            $ref: '#/components/schemas/ReplenishmentProductReceived'
    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
    ReplenishmentStatus:
      type: string
      description: >
        Lifecycle status of a replenishment.

        - `WITHOUT_SCHEDULING`: created at a warehouse that books receiving
        appointments natively, but no appointment has been scheduled yet.

        - `PENDING`: registered but not yet requested to the warehouse
        (pre-arrival).

        - `REQUESTED`: announced to the warehouse and awaiting arrival; the
        initial status at warehouses without native appointment scheduling, and
        the status after an appointment is booked.

        - `IN_TRANSIT`: the shipment is on its way to the warehouse.

        - `RECEIVED`: the shipment was recorded at the dock; counting has not
        started.

        - `PROCESSING`: the warehouse is receiving and counting the units (stock
        has arrived).

        - `IN_PUTAWAY`: received units are being placed in storage locations.

        - `COMPLETED`: receiving and putaway finished; `completed_at` is set.

        - `CANCELED`: the replenishment was canceled; it no longer counts for
        external-reference uniqueness.
      enum:
        - WITHOUT_SCHEDULING
        - PENDING
        - REQUESTED
        - IN_TRANSIT
        - RECEIVED
        - PROCESSING
        - IN_PUTAWAY
        - COMPLETED
        - CANCELED
      example: REQUESTED
    ReplenishmentSupplierInvoice:
      type: object
      description: A supplier invoice number captured during receiving.
      properties:
        invoice_number:
          type: string
          description: Normalized supplier invoice (factura) number.
          example: F-111
    ReplenishmentSupplierInvoiceFile:
      type: object
      description: >-
        A document uploaded during receiving, served as a short-lived download
        link.
      properties:
        url:
          type: string
          description: >-
            Download URL, valid until `expires_at` (15 minutes after the
            response was built).
          example: >-
            https://files.example.com/replenishments/55001/factura.pdf?signature=fake
        filename:
          type: string
          description: Original file name.
          example: factura.pdf
        content_type:
          type: string
          description: MIME type of the file.
          example: application/pdf
        byte_size:
          type: integer
          description: File size in bytes.
          example: 48213
        expires_at:
          type: string
          format: date-time
          description: Moment after which `url` stops working.
          example: '2026-10-12T14:18:11Z'
    ReplenishmentReturn:
      type: object
      description: >-
        The return this replenishment receives, when the replenishment is the
        reception of a return.
      properties:
        id:
          type: integer
          description: Return id.
          example: 7301
        returned_order_id:
          type:
            - integer
            - 'null'
          description: Id of the order being returned.
          example: 41002
        created_order_id:
          type:
            - integer
            - 'null'
          description: Id of the replacement order created for the return, if any.
          example: null
    ReplenishmentProductReceived:
      allOf:
        - $ref: '#/components/schemas/ReplenishmentProduct'
        - type: object
          properties:
            received_quantity:
              type: integer
              description: >-
                Units of the product physically received so far (counted, stored
                or reserved).
              example: 80
            received_by_invoice:
              type: array
              description: >-
                Breakdown of `received_quantity` by captured supplier invoice;
                the `null` bucket is listed last. Empty when nothing has been
                received.
              items:
                $ref: '#/components/schemas/ReplenishmentReceivedByInvoice'
    ReplenishmentProduct:
      type: object
      description: One announced line of a replenishment.
      properties:
        product_id:
          type: integer
          description: Cubbo product id of the line.
          example: 9001
        expected_quantity:
          type: integer
          description: Number of units announced for this product.
          example: 100
        unit_value:
          type:
            - string
            - 'null'
          description: >-
            Declared unit cost in the store currency, as a decimal string;
            `null` when not declared.
          example: '12.5'
        product:
          $ref: '#/components/schemas/ReplenishmentLineProduct'
    ReplenishmentReceivedByInvoice:
      type: object
      description: Units of a line received under one supplier invoice.
      properties:
        invoice_number:
          type:
            - string
            - 'null'
          description: >-
            Supplier invoice (factura) number captured at reception; `null` for
            units received without a captured invoice.
          example: F-111
        quantity:
          type: integer
          description: Units of the product received under this invoice.
          example: 50
    ReplenishmentLineProduct:
      type: object
      description: Catalog product referenced by a replenishment line.
      properties:
        id:
          type: integer
          description: Cubbo product id.
          example: 9001
        name:
          type: string
          description: Product name.
          example: Red T-shirt M
        bar_code:
          type:
            - string
            - 'null'
          description: Barcode (UPC/EAN) of the product.
          example: '7501234567890'
        is_scannable:
          type: boolean
          description: >-
            Whether units of this product are identified by scanning at the
            warehouse.
          example: true
        product_codes:
          type: array
          description: SKUs registered for the product.
          items:
            type: object
            properties:
              id:
                type: integer
                description: Id of the SKU record.
                example: 31001
              sku:
                type: string
                description: SKU.
                example: SKU-RED-M
  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.