LeafLink Inventory Command API

The inventory-command API from LeafLink — 13 operation(s) for inventory-command.

Business capability
Inventory Management BC-530

Operations 13

GET /inventory/commands/{id}/status Get command status #
POST /inventory/commands/archive Submit archive command #
POST /inventory/commands/destroy Submit destroy command #
POST /inventory/commands/fulfillment Submit fulfillment command #
POST /inventory/commands/hold Submit hold command #
POST /inventory/commands/putaway Submit putaway command #
POST /inventory/commands/rebuild-projections Rebuild projections for matching streams #
POST /inventory/commands/reconcile Submit reconcile command #
POST /inventory/commands/transfer Submit transfer command #
POST /inventory/commands/unarchive Submit unarchive command #
POST /inventory/commands/unfulfillment Submit unfulfillment command #
POST /inventory/commands/unhold Submit unhold command #
POST /inventory/commands/unreserve Submit unreserve command #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/leaflink-inventory-command-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

leaflink-inventory-command-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LeafLink Inventory Command API
  version: '2022-10-31'
  description: 'This reference specification outlines all the available HTTP operations of the LeafLink API.


    See the [LeafLink Developer Hub](/api) for guides, how-to, and general information of the API.

    '
  termsOfService: https://www.leaflink.com/terms-and-conditions/
  contact:
    email: support@leaflink.com
servers:
- url: https://api.leaflink.com
  description: LeafLink API production URL.
- url: https://staging-api.leaflink.com
  description: LeafLink API staging URL.
security:
- bearerAuth: []
tags:
- name: inventory-command
paths:
  /inventory/commands/{id}/status:
    get:
      operationId: inventory_commands_status_retrieve
      description: Return the execution status of a previously submitted inventory command.
      summary: Get command status
      parameters:
      - in: path
        name: id
        schema:
          type: integer
        required: true
      - name: LeafLink-Version
        description: '[API version docs](/api/getting-started/#versioning)'
        required: false
        in: header
        schema:
          type: string
          format: date
      tags:
      - inventory-command
      security:
      - bearerAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandStatusResponse'
          description: Command status (Pending | Success | Failed)
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '404':
          description: Command not found
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/archive:
    post:
      operationId: inventory_commands_archive_create
      description: Queue an archive command (remove from active circulation). Returns 202 with command_id.
      summary: Submit archive command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/destroy:
    post:
      operationId: inventory_commands_destroy_create
      description: Queue a destroy command (remove inventory). Returns 202 with command_id.
      summary: Submit destroy command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DestroyRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/fulfillment:
    post:
      operationId: inventory_commands_fulfillment_create
      description: Queue a fulfillment command (ship inventory for an order). Returns 202 with command_id.
      summary: Submit fulfillment command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FulfillmentRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/hold:
    post:
      operationId: inventory_commands_hold_create
      description: Queue a hold command (place inventory on hold). Returns 202 with command_id.
      summary: Submit hold command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HoldRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/putaway:
    post:
      operationId: inventory_commands_putaway_create
      description: Queue a putaway command (add inventory to a facility). Returns 202 with command_id for status polling.
      summary: Submit putaway command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutawayRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/rebuild-projections:
    post:
      operationId: inventory_commands_rebuild_projections_create
      description: Look up event streams matching the supplied seller_ids, product_ids, facility_ids, and/or batch_ids filters and queue an update_projection_task for each (stream × registered projection).
      summary: Rebuild projections for matching streams
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RebuildProjectionsRequestRequest'
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RebuildProjectionsResponse'
          description: Streams resolved and projection-update tasks queued
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/reconcile:
    post:
      operationId: inventory_commands_reconcile_create
      description: Queue a reconcile command (set inventory to a quantity). Returns 202 with command_id.
      summary: Submit reconcile command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReconcileRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/transfer:
    post:
      operationId: inventory_commands_transfer_create
      description: Queue a transfer command (move inventory between items). Returns 202 with command_id.
      summary: Submit transfer command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/unarchive:
    post:
      operationId: inventory_commands_unarchive_create
      description: Queue an unarchive command (return to active circulation). Returns 202 with command_id.
      summary: Submit unarchive command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnarchiveRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/unfulfillment:
    post:
      operationId: inventory_commands_unfulfillment_create
      description: Queue an unfulfillment command (reverse shipment). Returns 202 with command_id.
      summary: Submit unfulfillment command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnfulfillmentRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/unhold:
    post:
      operationId: inventory_commands_unhold_create
      description: Queue an unhold command (release from hold). Returns 202 with command_id.
      summary: Submit unhold command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnholdRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
  /inventory/commands/unreserve:
    post:
      operationId: inventory_commands_unreserve_create
      description: Queue an unreserve command (release reserved inventory). Returns 202 with command_id.
      summary: Submit unreserve command
      tags:
      - inventory-command
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnreserveRequestRequest'
        required: true
      security:
      - bearerAuth: []
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandAcceptedResponse'
          description: Command accepted
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '400':
          description: Validation error
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: The requests quota in the time window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: The remaining requests quota in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: The time remaining in the current window, specified in seconds.
            RateLimit-Policy:
              schema:
                type: string
              description: The quota policy information.
        '429':
          description: Rate Limit Error
          headers:
            Retry-After:
              schema:
                type: integer
              description: The time remaining before the rejected request can be tried again, specified in seconds.
components:
  schemas:
    RebuildProjectionsStream:
      type: object
      description: Single stream identifier in the rebuild-projections response.
      properties:
        product_id:
          type: integer
        facility_id:
          type: integer
        batch_id:
          type: integer
      required:
      - batch_id
      - facility_id
      - product_id
    UnreserveRequestRequest:
      type: object
      description: Request body for POST .../commands/unreserve.
      properties:
        product_id:
          type: integer
          minimum: 1
        order_id:
          type: integer
          minimum: 1
        order_product_id:
          type: integer
          minimum: 1
        quantity:
          type: string
          format: decimal
          pattern: ^-?\d{0,18}(?:\.\d{0,2})?$
        created_by:
          type: integer
          minimum: 0
        metadata:
          type: object
          additionalProperties:
            type: string
            minLength: 1
      required:
      - created_by
      - order_id
      - order_product_id
      - product_id
      - quantity
    RebuildProjectionsRequestRequest:
      type: object
      description: 'Request body for POST .../commands/rebuild-projections.


        Accepts any combination of seller_ids, product_ids, facility_ids, and

        batch_ids. At least one filter list must be non-empty. seller_ids are

        expanded to their products at the view layer (Django ORM) before stream

        lookup.'
      properties:
        seller_ids:
          type: array
          items:
            type: integer
            minimum: 1
        product_ids:
          type: array
          items:
            type: integer
            minimum: 1
        facility_ids:
          type: array
          items:
            type: integer
            minimum: 1

# --- truncated at 32 KB (42 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/leaflink/refs/heads/main/openapi/leaflink-inventory-command-api-openapi.yml