Spree Commerce Promotion Categories API
The Promotion Categories API from Spree Commerce — 2 operation(s) for promotion categories.
The Promotion Categories API from Spree Commerce — 2 operation(s) for promotion categories.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/spree-commerce:spree-commerce-promotion-categories-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Platform Promotion Categories 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: Promotion Categories
paths:
/api/v2/platform/promotion_categories:
get:
summary: Return a list of Promotion Categories
tags:
- Promotion Categories
security:
- bearer_auth: []
description: Returns a list of Promotion Categories
operationId: promotion-categories-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: promotions
schema:
type: string
- name: filter[code_eq]
in: query
description: ''
example: BLK-FRI
schema:
type: string
- name: filter[name_eq]
in: query
description: ''
example: 2020 Promotions
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: promotion_category
attributes:
name: Promotion Category
created_at: '2022-11-08T19:34:58.013Z'
updated_at: '2022-11-08T19:34:58.013Z'
code: POP123
relationships:
promotions:
data: []
- id: '2'
type: promotion_category
attributes:
name: Promotion Category
created_at: '2022-11-08T19:34:58.014Z'
updated_at: '2022-11-08T19:34:58.014Z'
code: POP123
relationships:
promotions:
data: []
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/promotion_categories?page=1&per_page=&include=&filter[code_eq]=&filter[name_eq]=
next: http://www.example.com/api/v2/platform/promotion_categories?filter%5Bcode_eq%5D=&filter%5Bname_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/promotion_categories?filter%5Bcode_eq%5D=&filter%5Bname_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/promotion_categories?filter%5Bcode_eq%5D=&filter%5Bname_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/promotion_categories?filter%5Bcode_eq%5D=&filter%5Bname_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 Promotion Category
tags:
- Promotion Categories
security:
- bearer_auth: []
description: Creates a Promotion Category
operationId: create-promotion-category
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: promotions
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '5'
type: promotion_category
attributes:
name: Promotion Category
created_at: '2022-11-08T19:34:58.529Z'
updated_at: '2022-11-08T19:34:58.529Z'
code: 2021-BFM
relationships:
promotions:
data: []
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_promotion_category_params'
/api/v2/platform/promotion_categories/{id}:
get:
summary: Return a Promotion Category
tags:
- Promotion Categories
security:
- bearer_auth: []
description: Returns a Promotion Category
operationId: show-promotion-category
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: promotions
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: promotion_category
attributes:
name: Promotion Category
created_at: '2022-11-08T19:34:58.794Z'
updated_at: '2022-11-08T19:34:58.794Z'
code: MJO
relationships:
promotions:
data: []
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 Promotion Category
tags:
- Promotion Categories
security:
- bearer_auth: []
description: Updates a Promotion Category
operationId: update-promotion-category
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: promotions
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '8'
type: promotion_category
attributes:
name: 2021 Promotions
created_at: '2022-11-08T19:34:59.309Z'
updated_at: '2022-11-08T19:34:59.539Z'
code: 2021-Promos
relationships:
promotions:
data: []
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_promotion_category_params'
delete:
summary: Delete a Promotion Category
tags:
- Promotion Categories
security:
- bearer_auth: []
description: Deletes a Promotion Category
operationId: delete-promotion-category
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:
update_promotion_category_params:
type: object
properties:
promotion_category:
type: object
required:
- name
properties:
name:
type: string
example: Promotions Used in 2021
description: Update the name of this Promotion Category.
code:
type:
- string
- 'null'
example: 2021-PROMOS
description: Change or remove the code for this Promotion Category.
required:
- promotion_category
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
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
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_promotion_category_params:
type: object
properties:
promotion_category:
type: object
required:
- name
properties:
name:
type: string
example: Promotions Used in 2021
description: Give this Promotion Category a name.
code:
type:
- string
- 'null'
example: 2021-PROMOS
description: Give this promotion category a code.
required:
- promotion_category
x-internal: false
error:
type: object
properties:
error:
type: string
required:
- error
x-internal: false
securitySchemes:
bearer_auth:
type: http
scheme: bearer