Spree Commerce Stock Locations API

The Stock Locations API from Spree Commerce — 2 operation(s) for stock locations.

Operations 5

GET /api/v2/platform/stock_locations Return a list of Stock Locations #
POST /api/v2/platform/stock_locations Create a Stock Location #
GET /api/v2/platform/stock_locations/{id} Return a Stock Location #
PATCH /api/v2/platform/stock_locations/{id} Update a Stock Location #
DELETE /api/v2/platform/stock_locations/{id} Delete a Stock Location #

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-stock-locations-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-stock-locations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Platform Stock Locations 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: Stock Locations
paths:
  /api/v2/platform/stock_locations:
    get:
      summary: Return a list of Stock Locations
      tags:
      - Stock Locations
      security:
      - bearer_auth: []
      description: Returns a list of Stock Locations
      operationId: stock-locations-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: country
        schema:
          type: string
      responses:
        '200':
          description: Records returned
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                    - id: '175'
                      type: stock_location
                      attributes:
                        name: Jonnie Pollich
                        created_at: '2022-11-08T19:35:30.989Z'
                        updated_at: '2022-11-08T19:35:30.989Z'
                        default: false
                        address1: 1600 Pennsylvania Ave NW
                        address2: null
                        city: Washington
                        state_name: null
                        zipcode: '20500'
                        phone: (202) 456-1111
                        active: true
                        backorderable_default: true
                        propagate_all_variants: false
                        admin_name: null
                      relationships:
                        country:
                          data:
                            id: '413'
                            type: country
                    - id: '176'
                      type: stock_location
                      attributes:
                        name: Lidia Hamill
                        created_at: '2022-11-08T19:35:30.991Z'
                        updated_at: '2022-11-08T19:35:30.991Z'
                        default: false
                        address1: 1600 Pennsylvania Ave NW
                        address2: null
                        city: Washington
                        state_name: null
                        zipcode: '20500'
                        phone: (202) 456-1111
                        active: true
                        backorderable_default: true
                        propagate_all_variants: false
                        admin_name: null
                      relationships:
                        country:
                          data:
                            id: '413'
                            type: country
                    meta:
                      count: 2
                      total_count: 2
                      total_pages: 1
                    links:
                      self: http://www.example.com/api/v2/platform/stock_locations?page=1&per_page=&include=
                      next: http://www.example.com/api/v2/platform/stock_locations?include=&page=1&per_page=
                      prev: http://www.example.com/api/v2/platform/stock_locations?include=&page=1&per_page=
                      last: http://www.example.com/api/v2/platform/stock_locations?include=&page=1&per_page=
                      first: http://www.example.com/api/v2/platform/stock_locations?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 Stock Location
      tags:
      - Stock Locations
      security:
      - bearer_auth: []
      description: Creates a Stock Location
      operationId: create-stock-location
      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: country
        schema:
          type: string
      responses:
        '201':
          description: Record created
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '179'
                      type: stock_location
                      attributes:
                        name: Lon McClure
                        created_at: '2022-11-08T19:35:31.517Z'
                        updated_at: '2022-11-08T19:35:31.517Z'
                        default: false
                        address1: 1600 Pennsylvania Ave NW
                        address2: null
                        city: Washington
                        state_name: null
                        zipcode: '20500'
                        phone: (202) 456-1111
                        active: true
                        backorderable_default: true
                        propagate_all_variants: false
                        admin_name: null
                      relationships:
                        country:
                          data:
                            id: '415'
                            type: country
              schema:
                $ref: '#/components/schemas/resource'
        '422':
          description: Invalid request
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: Name can't be blank
                    errors:
                      name:
                      - can't be blank
              schema:
                $ref: '#/components/schemas/validation_errors'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_stock_location_params'
  /api/v2/platform/stock_locations/{id}:
    get:
      summary: Return a Stock Location
      tags:
      - Stock Locations
      security:
      - bearer_auth: []
      description: Returns a Stock Location
      operationId: show-stock-location
      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: country
        schema:
          type: string
      responses:
        '200':
          description: Record found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '180'
                      type: stock_location
                      attributes:
                        name: Dian Hills
                        created_at: '2022-11-08T19:35:31.785Z'
                        updated_at: '2022-11-08T19:35:31.785Z'
                        default: false
                        address1: 1600 Pennsylvania Ave NW
                        address2: null
                        city: Washington
                        state_name: null
                        zipcode: '20500'
                        phone: (202) 456-1111
                        active: true
                        backorderable_default: true
                        propagate_all_variants: false
                        admin_name: null
                      relationships:
                        country:
                          data:
                            id: '417'
                            type: country
              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 Stock Location
      tags:
      - Stock Locations
      security:
      - bearer_auth: []
      description: Updates a Stock Location
      operationId: update-stock-location
      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: country
        schema:
          type: string
      responses:
        '200':
          description: Record updated
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '182'
                      type: stock_location
                      attributes:
                        name: Warehouse 3
                        created_at: '2022-11-08T19:35:32.309Z'
                        updated_at: '2022-11-08T19:35:32.538Z'
                        default: true
                        address1: South Street 8/2
                        address2: null
                        city: Los Angeles
                        state_name: null
                        zipcode: '11223'
                        phone: (202) 456-1111
                        active: true
                        backorderable_default: true
                        propagate_all_variants: false
                        admin_name: null
                      relationships:
                        country:
                          data:
                            id: '420'
                            type: country
              schema:
                $ref: '#/components/schemas/resource'
        '422':
          description: Invalid request
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: Name can't be blank
                    errors:
                      name:
                      - 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_stock_location_params'
    delete:
      summary: Delete a Stock Location
      tags:
      - Stock Locations
      security:
      - bearer_auth: []
      description: Deletes a Stock Location
      operationId: delete-stock-location
      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'
components:
  schemas:
    resource_properties:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        attributes:
          type: object
        relationships:
          type: object
      required:
      - id
      - type
      - attributes
      x-internal: false
    create_stock_location_params:
      type: object
      properties:
        stock_location:
          type: object
          required:
          - name
          properties:
            name:
              type: string
              example: Warehouse 3
            default:
              type: boolean
            address1:
              type: string
              example: South St. 8
            address2:
              type: string
              example: South St. 109
            country_id:
              type: string
              example: '2'
            state_id:
              type: string
              example: '4'
            city:
              type: string
              example: Los Angeles
            state_name:
              type: string
              example: California
            zipcode:
              type: string
              example: '90005'
            phone:
              type: string
              example: '23333456'
            active:
              type: boolean
            backorderable_default:
              type: boolean
            propagate_all_variants:
              type: boolean
            admin_name:
              type: string
      required:
      - stock_location
      x-internal: false
    resources_list:
      type: object
      properties:
        data:
          type: array
          items:
            allOf:
            - $ref: '#/components/schemas/resource_properties'
        meta:
          type: object
          properties:
            count:
              type: integer
            total_count:
              type: integer
            total_pages:
              type: integer
          required:
          - count
          - total_count
          - total_pages
        links:
          type: object
          properties:
            self:
              type: string
            next:
              type: string
            prev:
              type: string
            last:
              type: string
            first:
              type: string
          required:
          - self
          - next
          - prev
          - last
          - first
      required:
      - data
      - meta
      - links
      x-internal: false
    validation_errors:
      type: object
      properties:
        error:
          type: string
        errors:
          type: object
      required:
      - error
      - errors
      x-internal: false
    update_stock_location_params:
      type: object
      properties:
        stock_location:
          type: object
          required:
          - name
          properties:
            name:
              type: string
              example: Warehouse 3
            default:
              type: boolean
            address1:
              type: string
              example: South St. 8
            address2:
              type: string
              example: South St. 109
            country_id:
              type: string
              example: '2'
            state_id:
              type: string
              example: '4'
            city:
              type: string
              example: Los Angeles
            state_name:
              type: string
              example: California
            zipcode:
              type: string
              example: '90005'
            phone:
              type: string
              example: '23333456'
            active:
              type: boolean
            backorderable_default:
              type: boolean
            propagate_all_variants:
              type: boolean
            admin_name:
              type: string
      required:
      - stock_location
      x-internal: false
    resource:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/resource_properties'
      required:
      - data
      x-internal: false
    error:
      type: object
      properties:
        error:
          type: string
      required:
      - error
      x-internal: false
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer