Spree Commerce Shipments API

The Shipments API from Spree Commerce — 9 operation(s) for shipments.

Operations 12

GET /api/v2/platform/shipments Return a list of Shipments #
POST /api/v2/platform/shipments Create a Shipment #
GET /api/v2/platform/shipments/{id} Return a Shipment #
PATCH /api/v2/platform/shipments/{id} Update a Shipment #
DELETE /api/v2/platform/shipments/{id} Delete a Shipment #
PATCH /api/v2/platform/shipments/{id}/add_item Adds item (Variant) to an existing Shipment #
PATCH /api/v2/platform/shipments/{id}/remove_item Removes item (Variant) from Shipment #
PATCH /api/v2/platform/shipments/{id}/ready Mark Shipment as ready to be shipped #
PATCH /api/v2/platform/shipments/{id}/ship Mark Shipment as shipped #
PATCH /api/v2/platform/shipments/{id}/cancel Cancels the Shipment #
PATCH /api/v2/platform/shipments/{id}/resume Resumes the Shipment #
PATCH /api/v2/platform/shipments/{id}/pend Moves Shipment back to pending state #

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/spree-commerce-shipments-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

spree-commerce-shipments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Platform Shipments API
  contact:
    name: Vendo Connect Inc.
    url: https://getvendo.com
    email: sales@getvendo.com
  description: Spree Platform API
  version: v2
servers:
- url: http://{defaultHost}
  variables:
    defaultHost:
      default: localhost:3000
tags:
- name: Shipments
paths:
  /api/v2/platform/shipments:
    get:
      summary: Return a list of Shipments
      tags:
      - Shipments
      security:
      - bearer_auth: []
      description: Returns a list of Shipments
      operationId: shipments-list
      parameters:
      - name: page
        in: query
        example: 1
        schema:
          type: integer
      - name: per_page
        in: query
        example: 50
        schema:
          type: integer
      - name: include
        in: query
        description: 'Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
        example: line_items,variants,product
        schema:
          type: string
      - name: filter[state_eq]
        in: query
        description: ''
        example: complete
        schema:
          type: string
      responses:
        '200':
          description: Records returned
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                    - id: '28'
                      type: shipment
                      attributes:
                        tracking: U10000
                        number: H74819281258
                        cost: '100.0'
                        shipped_at: null
                        state: pending
                        created_at: '2022-11-08T19:35:09.196Z'
                        updated_at: '2022-11-08T19:35:09.199Z'
                        adjustment_total: '0.0'
                        additional_tax_total: '0.0'
                        promo_total: '0.0'
                        included_tax_total: '0.0'
                        pre_tax_amount: '0.0'
                        taxable_adjustment_total: '0.0'
                        non_taxable_adjustment_total: '0.0'
                        public_metadata: {}
                        private_metadata: {}
                        display_discounted_cost: $100.00
                        display_item_cost: $0.00
                        display_amount: $100.00
                        display_final_price: $100.00
                        display_cost: $100.00
                        tracking_url: null
                      relationships:
                        order:
                          data:
                            id: '78'
                            type: order
                        address:
                          data: null
                        stock_location:
                          data:
                            id: '106'
                            type: stock_location
                        adjustments:
                          data: []
                        inventory_units:
                          data: []
                        shipping_rates:
                          data:
                          - id: '30'
                            type: shipping_rate
                        state_changes:
                          data: []
                        selected_shipping_rate:
                          data:
                            id: '30'
                            type: shipping_rate
                    - id: '29'
                      type: shipment
                      attributes:
                        tracking: U10000
                        number: H45064150244
                        cost: '100.0'
                        shipped_at: null
                        state: pending
                        created_at: '2022-11-08T19:35:09.230Z'
                        updated_at: '2022-11-08T19:35:09.233Z'
                        adjustment_total: '0.0'
                        additional_tax_total: '0.0'
                        promo_total: '0.0'
                        included_tax_total: '0.0'
                        pre_tax_amount: '0.0'
                        taxable_adjustment_total: '0.0'
                        non_taxable_adjustment_total: '0.0'
                        public_metadata: {}
                        private_metadata: {}
                        display_discounted_cost: $100.00
                        display_item_cost: $0.00
                        display_amount: $100.00
                        display_final_price: $100.00
                        display_cost: $100.00
                        tracking_url: null
                      relationships:
                        order:
                          data:
                            id: '79'
                            type: order
                        address:
                          data: null
                        stock_location:
                          data:
                            id: '107'
                            type: stock_location
                        adjustments:
                          data: []
                        inventory_units:
                          data: []
                        shipping_rates:
                          data:
                          - id: '31'
                            type: shipping_rate
                        state_changes:
                          data: []
                        selected_shipping_rate:
                          data:
                            id: '31'
                            type: shipping_rate
                    meta:
                      count: 2
                      total_count: 2
                      total_pages: 1
                    links:
                      self: http://www.example.com/api/v2/platform/shipments?page=1&per_page=&include=&filter[state_eq]=
                      next: http://www.example.com/api/v2/platform/shipments?filter%5Bstate_eq%5D=&include=&page=1&per_page=
                      prev: http://www.example.com/api/v2/platform/shipments?filter%5Bstate_eq%5D=&include=&page=1&per_page=
                      last: http://www.example.com/api/v2/platform/shipments?filter%5Bstate_eq%5D=&include=&page=1&per_page=
                      first: http://www.example.com/api/v2/platform/shipments?filter%5Bstate_eq%5D=&include=&page=1&per_page=
              schema:
                $ref: '#/components/schemas/resources_list'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
    post:
      summary: Create a Shipment
      tags:
      - Shipments
      security:
      - bearer_auth: []
      description: Creates a Shipment
      operationId: create-shipment
      parameters:
      - name: include
        in: query
        description: 'Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
        example: line_items,variants,product
        schema:
          type: string
      responses:
        '201':
          description: Record created
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '32'
                      type: shipment
                      attributes:
                        tracking: null
                        number: H86798855348
                        cost: '0.0'
                        shipped_at: null
                        state: pending
                        created_at: '2022-11-08T19:35:09.957Z'
                        updated_at: '2022-11-08T19:35:09.970Z'
                        adjustment_total: '0.0'
                        additional_tax_total: '0.0'
                        promo_total: '0.0'
                        included_tax_total: '0.0'
                        pre_tax_amount: '0.0'
                        taxable_adjustment_total: '0.0'
                        non_taxable_adjustment_total: '0.0'
                        public_metadata: {}
                        private_metadata: {}
                        display_discounted_cost: $0.00
                        display_item_cost: $19.99
                        display_amount: $0.00
                        display_final_price: $0.00
                        display_cost: $0.00
                        tracking_url: null
                      relationships:
                        order:
                          data:
                            id: '82'
                            type: order
                        address:
                          data: null
                        stock_location:
                          data:
                            id: '110'
                            type: stock_location
                        adjustments:
                          data: []
                        inventory_units:
                          data:
                          - id: '28'
                            type: inventory_unit
                        shipping_rates:
                          data: []
                        state_changes:
                          data: []
                        selected_shipping_rate:
                          data: null
              schema:
                $ref: '#/components/schemas/resource'
        '422':
          description: Invalid request
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: order_not_found
                    errors: {}
              schema:
                $ref: '#/components/schemas/validation_errors'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_shipment_params'
  /api/v2/platform/shipments/{id}:
    get:
      summary: Return a Shipment
      tags:
      - Shipments
      security:
      - bearer_auth: []
      description: Returns a Shipment
      operationId: show-shipment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: include
        in: query
        description: 'Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
        example: line_items,variants,product
        schema:
          type: string
      responses:
        '200':
          description: Record found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '34'
                      type: shipment
                      attributes:
                        tracking: U10000
                        number: H70979559010
                        cost: '100.0'
                        shipped_at: null
                        state: pending
                        created_at: '2022-11-08T19:35:10.459Z'
                        updated_at: '2022-11-08T19:35:10.475Z'
                        adjustment_total: '0.0'
                        additional_tax_total: '0.0'
                        promo_total: '0.0'
                        included_tax_total: '0.0'
                        pre_tax_amount: '0.0'
                        taxable_adjustment_total: '0.0'
                        non_taxable_adjustment_total: '0.0'
                        public_metadata: {}
                        private_metadata: {}
                        display_discounted_cost: $100.00
                        display_item_cost: $10.00
                        display_amount: $100.00
                        display_final_price: $100.00
                        display_cost: $100.00
                        tracking_url: null
                      relationships:
                        order:
                          data:
                            id: '83'
                            type: order
                        address:
                          data: null
                        stock_location:
                          data:
                            id: '112'
                            type: stock_location
                        adjustments:
                          data: []
                        inventory_units:
                          data:
                          - id: '30'
                            type: inventory_unit
                        shipping_rates:
                          data:
                          - id: '37'
                            type: shipping_rate
                        state_changes:
                          data: []
                        selected_shipping_rate:
                          data:
                            id: '37'
                            type: shipping_rate
              schema:
                $ref: '#/components/schemas/resource'
        '404':
          description: Record not found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The resource you were looking for could not be found.
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
    patch:
      summary: Update a Shipment
      tags:
      - Shipments
      security:
      - bearer_auth: []
      description: Updates a Shipment
      operationId: update-shipment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: include
        in: query
        description: 'Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
        example: line_items,variants,product
        schema:
          type: string
      responses:
        '200':
          description: Record updated
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '38'
                      type: shipment
                      attributes:
                        tracking: MY-TRACKING-NUMBER-1234
                        number: H91981279448
                        cost: '100.0'
                        shipped_at: null
                        state: pending
                        created_at: '2022-11-08T19:35:11.360Z'
                        updated_at: '2022-11-08T19:35:11.610Z'
                        adjustment_total: '0.0'
                        additional_tax_total: '0.0'
                        promo_total: '0.0'
                        included_tax_total: '0.0'
                        pre_tax_amount: '0.0'
                        taxable_adjustment_total: '0.0'
                        non_taxable_adjustment_total: '0.0'
                        public_metadata: {}
                        private_metadata: {}
                        display_discounted_cost: $100.00
                        display_item_cost: $10.00
                        display_amount: $100.00
                        display_final_price: $100.00
                        display_cost: $100.00
                        tracking_url: null
                      relationships:
                        order:
                          data:
                            id: '85'
                            type: order
                        address:
                          data: null
                        stock_location:
                          data:
                            id: '116'
                            type: stock_location
                        adjustments:
                          data: []
                        inventory_units:
                          data:
                          - id: '34'
                            type: inventory_unit
                        shipping_rates:
                          data:
                          - id: '45'
                            type: shipping_rate
                        state_changes:
                          data: []
                        selected_shipping_rate:
                          data:
                            id: '45'
                            type: shipping_rate
              schema:
                $ref: '#/components/schemas/resource'
        '422':
          description: Invalid request
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: Stock location can't be blank
                    errors:
                      stock_location:
                      - can't be blank
              schema:
                $ref: '#/components/schemas/validation_errors'
        '404':
          description: Record not found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The resource you were looking for could not be found.
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_shipment_params'
    delete:
      summary: Delete a Shipment
      tags:
      - Shipments
      security:
      - bearer_auth: []
      description: Deletes a Shipment
      operationId: delete-shipment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Record deleted
        '404':
          description: Record not found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The resource you were looking for could not be found.
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
  /api/v2/platform/shipments/{id}/add_item:
    patch:
      summary: Adds item (Variant) to an existing Shipment
      tags:
      - Shipments
      security:
      - bearer_auth: []
      description: If selected Variant was already added to Order it will increase the quantity of existing Line Item, if not it will create a new Line Item
      operationId: add-item-shipment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: include
        in: query
        description: 'Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
        example: line_items,variants,product
        schema:
          type: string
      responses:
        '200':
          description: Record updated
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '48'
                      type: shipment
                      attributes:
                        tracking: U10000
                        number: H80492609966
                        cost: '0.0'
                        shipped_at: null
                        state: pending
                        created_at: '2022-11-08T19:35:13.675Z'
                        updated_at: '2022-11-08T19:35:13.998Z'
                        adjustment_total: '0.0'
                        additional_tax_total: '0.0'
                        promo_total: '0.0'
                        included_tax_total: '0.0'
                        pre_tax_amount: '0.0'
                        taxable_adjustment_total: '0.0'
                        non_taxable_adjustment_total: '0.0'
                        public_metadata: {}
                        private_metadata: {}
                        display_discounted_cost: $0.00
                        display_item_cost: $29.99
                        display_amount: $0.00
                        display_final_price: $0.00
                        display_cost: $0.00
                        tracking_url: null
                      relationships:
                        order:
                          data:
                            id: '90'
                            type: order
                        address:
                          data: null
                        stock_location:
                          data:
                            id: '126'
                            type: stock_location
                        adjustments:
                          data: []
                        inventory_units:
                          data:
                          - id: '44'
                            type: inventory_unit
                          - id: '45'
                            type: inventory_unit
                        shipping_rates:
                          data:
                          - id: '76'
                            type: shipping_rate
                          - id: '77'
                            type: shipping_rate
                        state_changes:
                          data: []
                        selected_shipping_rate:
                          data:
                            id: '77'
                            type: shipping_rate
              schema:
                $ref: '#/components/schemas/resource'
        '404':
          description: Record not found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The resource you were looking for could not be found.
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add_item_shipment_params'
  /api/v2/platform/shipments/{id}/remove_item:
    patch:
      summary: Removes item (Variant) from Shipment
      tags:
      - Shipments
      security:
      - bearer_auth: []
      description: If selected Variant is removed completely and Shipment doesn't include any other Line Items, Shipment itself will be deleted
      operationId: remove-item-shipment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: include
        in: query
        description: 'Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
        example: line_items,variants,product
        schema:
          type: string
      responses:
        '204':
          description: Record deleted
        '200':
          description: Record updated
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '54'
                      type: shipment
                      attributes:
                        tracking: U10000
                        number: H51498419568
                        cost: '0.0'
                        shipped_at: null
                        state: pending
                        created_at: '2022-11-08T19:35:15.496Z'
                        updated_at: '2022-11-08T19:35:15.944Z'
                        adjustment_total: '0.0'
                        additional_tax_total: '0.0'
                        promo_total: '0.0'
                        included_tax_total: '0.0'
                        pre_tax_amount: '0.0'
                        taxable_adjustment_total: '0.0'
                        non_taxable_adjustment_total: '0.0'
                        public_metadata: {}
                        private_metadata: {}
                        display_discounted_cost: $0.00
                        display_item_cost: $10.00
                        display_amount: $0.00
                        display_final_price: $0.00
                        display_cost: $0.00
                        tracking_url: null
                      relationships:
                        order:
                          data:
                            id: '93'
                            type: order
                        address:
                          data: null
                        stock_location:
                          data:
                            id: '133'
                            type: stock_location
                        adjustments:
                          data: []
                        inventory_units:
                          data:
                          - id: '51'
                            type: inventory_unit
                        shipping_rates:
                          data:
                          - id: '100'
                            type: shipping_rate
                          - id: '101'
                            type: shipping_rate
                        state_changes:
                          data: []
                        selected_shipping_rate:
                          data:
                            id: '97'
                            type: shipping_rate
              schema:
                $ref: '#/components/schemas/resource'
        '404':
          description: Record not found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The resource you were looking for could not be found.
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/remove_item_shipment_params'
  /api/v2/platform/shipments/{id}/ready:
    patch:
      summary: Mark Shipment as ready to be shipped
      tags:
      - Shipments
      security:
      - bearer_auth: []
      description: Marks Shipment as ready to be shipped
      operationId: ready-shipment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: include
        in: query
        description: 'Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
        example: line_items,variants,product
        schema:
          type: string
      responses:
        '200':
          description: Record updated
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '58'
                      type: shipment
                      attributes:
                        tracking: U10000
                        number: H47907335950
                        cost: '100.0'
                        shipped_at: null
                        state: ready
                        created_at: '2022-11-08T19:35:16.670Z'
                        updated_at: '2022-11-08T19:35:16.922Z'
                        adjustment_total: '0.0'
                        additional_tax_total: '0.0'
                        promo_total: '0.0'
                        included_tax_total: '0.0'
                        pre_tax_amount: '0.0'
                        taxable_adjustment_total: '0.0'
                        non_taxable_adjustment_total: '0.0'
                        public_metadata: {}
                        private_metadata: {}
                        display_discounted_cost: $100.00
                        display_item_cost: $10.00
                        display_amount: $100.00
                        display_final_price: $100.00
                        display_cost: $100.00
                        tracking_url: null
                      relationships:
                        order:
                          data:
                            id: '95'
                            type: order
                        address:
                          data: null
                        stock_location:
                          data:
                            id: '137'
                            type: stock_location
                        adjustments:
                          data: []
                        inventory_units:
                          data:
                          - id: '55'
                            type: inventory_unit
                        shipping_rates:
                          data:
                          - id: '109'
                            type: shipping_rate
                        state_changes:
                          data:
                          - id: '25'
                            type: state_change
                        selected_shipping_rate:
                          data:
                            id: '109'
                            type: shipping_rate
              schema:
                $ref: '#/components/schemas/resource'
        '404':
          description: Record not found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The resource you were looking for could not be found.
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
  /api/v2/platform/shipments/{id}/ship:
    patch:
      summary: Mark Shipment as shipped
      tags:
      - Shipments
      security:
      - bearer_auth: []
      description: Marks Shipment as shipped
      operationId: ship-shipment
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: include
        in: query
        description: 'Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
        example: line_items,variants,product
        schema:
          type: string
      responses:
        '200':
          description: Record updated
          content:
            application/vnd.api+json:
              examples

# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/spree-commerce/refs/heads/main/openapi/spree-commerce-shipments-api-openapi.yml