Spree Commerce Option Values API

The Option Values API from Spree Commerce — 2 operation(s) for option values.

Operations 5

GET /api/v2/platform/option_values Return a list of Option Values #
POST /api/v2/platform/option_values Create an Option Value #
GET /api/v2/platform/option_values/{id} Return an Option Value #
PATCH /api/v2/platform/option_values/{id} Update an Option Value #
DELETE /api/v2/platform/option_values/{id} Delete an Option Value #

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-option-values-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-option-values-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Platform Option Values 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: Option Values
paths:
  /api/v2/platform/option_values:
    get:
      summary: Return a list of Option Values
      tags:
      - Option Values
      security:
      - bearer_auth: []
      description: Returns a list of Option Values
      operationId: option-values-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: option_type
        schema:
          type: string
      - name: filter[option_type_id_eq]
        in: query
        description: ''
        example: '1'
        schema:
          type: string
      - name: filter[name_cont]
        in: query
        description: ''
        example: Red
        schema:
          type: string
      responses:
        '200':
          description: Records returned
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                    - id: '68'
                      type: option_value
                      attributes:
                        position: 1
                        name: Size-68
                        presentation: S
                        created_at: '2022-11-08T19:34:33.815Z'
                        updated_at: '2022-11-08T19:34:33.815Z'
                        public_metadata: {}
                        private_metadata: {}
                      relationships:
                        option_type:
                          data:
                            id: '80'
                            type: option_type
                    - id: '69'
                      type: option_value
                      attributes:
                        position: 1
                        name: Size-69
                        presentation: S
                        created_at: '2022-11-08T19:34:33.820Z'
                        updated_at: '2022-11-08T19:34:33.820Z'
                        public_metadata: {}
                        private_metadata: {}
                      relationships:
                        option_type:
                          data:
                            id: '81'
                            type: option_type
                    meta:
                      count: 2
                      total_count: 2
                      total_pages: 1
                    links:
                      self: http://www.example.com/api/v2/platform/option_values?page=1&per_page=&include=&filter[option_type_id_eq]=&filter[name_cont]=
                      next: http://www.example.com/api/v2/platform/option_values?filter%5Bname_cont%5D=&filter%5Boption_type_id_eq%5D=&include=&page=1&per_page=
                      prev: http://www.example.com/api/v2/platform/option_values?filter%5Bname_cont%5D=&filter%5Boption_type_id_eq%5D=&include=&page=1&per_page=
                      last: http://www.example.com/api/v2/platform/option_values?filter%5Bname_cont%5D=&filter%5Boption_type_id_eq%5D=&include=&page=1&per_page=
                      first: http://www.example.com/api/v2/platform/option_values?filter%5Bname_cont%5D=&filter%5Boption_type_id_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 an Option Value
      tags:
      - Option Values
      security:
      - bearer_auth: []
      description: Creates an Option Value
      operationId: create-option-value
      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: option_type
        schema:
          type: string
      responses:
        '201':
          description: Record created
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '72'
                      type: option_value
                      attributes:
                        position: 1
                        name: Size-72
                        presentation: S
                        created_at: '2022-11-08T19:34:34.345Z'
                        updated_at: '2022-11-08T19:34:34.345Z'
                        public_metadata: {}
                        private_metadata: {}
                      relationships:
                        option_type:
                          data: null
              schema:
                $ref: '#/components/schemas/resource'
        '422':
          description: Invalid request
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: Name can't be blank and Presentation can't be blank
                    errors:
                      name:
                      - can't be blank
                      presentation:
                      - can't be blank
              schema:
                $ref: '#/components/schemas/validation_errors'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_option_value_params'
  /api/v2/platform/option_values/{id}:
    get:
      summary: Return an Option Value
      tags:
      - Option Values
      security:
      - bearer_auth: []
      description: Returns an Option Value
      operationId: show-option-value
      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: option_type
        schema:
          type: string
      responses:
        '200':
          description: Record found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '73'
                      type: option_value
                      attributes:
                        position: 1
                        name: Size-73
                        presentation: S
                        created_at: '2022-11-08T19:34:34.613Z'
                        updated_at: '2022-11-08T19:34:34.613Z'
                        public_metadata: {}
                        private_metadata: {}
                      relationships:
                        option_type:
                          data:
                            id: '84'
                            type: option_type
              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 an Option Value
      tags:
      - Option Values
      security:
      - bearer_auth: []
      description: Updates an Option Value
      operationId: update-option-value
      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: option_type
        schema:
          type: string
      responses:
        '200':
          description: Record updated
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '75'
                      type: option_value
                      attributes:
                        position: 1
                        name: M
                        presentation: S
                        created_at: '2022-11-08T19:34:35.140Z'
                        updated_at: '2022-11-08T19:34:35.372Z'
                        public_metadata: {}
                        private_metadata: {}
                      relationships:
                        option_type:
                          data:
                            id: '86'
                            type: option_type
              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_option_value_params'
    delete:
      summary: Delete an Option Value
      tags:
      - Option Values
      security:
      - bearer_auth: []
      description: Deletes an Option Value
      operationId: delete-option-value
      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_option_value_params:
      type: object
      properties:
        option_value:
          type: object
          required:
          - name
          - presentation
          properties:
            name:
              type: string
              example: red
            presentation:
              type: string
              example: Red
            public_metadata:
              type: object
            private_metadata:
              type: object
      required:
      - option_value
      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
    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
    update_option_value_params:
      type: object
      properties:
        option_value:
          type: object
          properties:
            name:
              type: string
              example: red
            presentation:
              type: string
              example: Red
            public_metadata:
              type: object
            private_metadata:
              type: object
      required:
      - option_value
      x-internal: false
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer