---
openapi: 3.0.3
info:
title: Platform API
contact:
name: Spark Solutions
url: https://sparksolutions.co
email: we@sparksolutions.co
description: Spree Platform API
version: v2
paths:
"/api/v2/platform/addresses":
get:
summary: Return a list of Addresses
tags:
- Addresses
security:
- bearer_auth: []
description: Returns a list of Addresses
operationId: addresses-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:
https://jsonapi.org/format/#fetching-includes'
example: user,country,state
schema:
type: string
- name: filter[user_id_eq]
in: query
description: ''
example: '1'
schema:
type: string
- name: filter[firstname_cont]
in: query
description: ''
example: John
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: address
attributes:
firstname: John
lastname: Doe
address1: 1 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
phone: 555-555-0199
state_name:
alternative_phone: 555-555-0199
company: Company
created_at: '2022-11-08T19:33:50.821Z'
updated_at: '2022-11-08T19:33:50.821Z'
deleted_at:
label:
public_metadata: {}
private_metadata: {}
relationships:
country:
data:
id: '1'
type: country
state:
data:
id: '1'
type: state
user:
data:
- id: '2'
type: address
attributes:
firstname: John
lastname: Doe
address1: 2 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
phone: 555-555-0199
state_name:
alternative_phone: 555-555-0199
company: Company
created_at: '2022-11-08T19:33:50.825Z'
updated_at: '2022-11-08T19:33:50.825Z'
deleted_at:
label:
public_metadata: {}
private_metadata: {}
relationships:
country:
data:
id: '1'
type: country
state:
data:
id: '2'
type: state
user:
data:
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/addresses?page=1&per_page=&include=&filter[user_id_eq]=&filter[firstname_cont]=
next: http://www.example.com/api/v2/platform/addresses?filter%5Bfirstname_cont%5D=&filter%5Buser_id_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/addresses?filter%5Bfirstname_cont%5D=&filter%5Buser_id_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/addresses?filter%5Bfirstname_cont%5D=&filter%5Buser_id_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/addresses?filter%5Bfirstname_cont%5D=&filter%5Buser_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 Address
tags:
- Addresses
security:
- bearer_auth: []
description: Creates an Address
operationId: create-address
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: user,country,state
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '5'
type: address
attributes:
firstname: John
lastname: Doe
address1: 5 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
phone: 555-555-0199
state_name:
alternative_phone: 555-555-0199
company: Company
created_at: '2022-11-08T19:33:51.471Z'
updated_at: '2022-11-08T19:33:51.471Z'
deleted_at:
label:
public_metadata: {}
private_metadata: {}
relationships:
country:
data:
id: '4'
type: country
state:
data:
id: '5'
type: state
user:
data:
id: '1'
type: user
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: First Name can't be blank, Last Name can't be blank, Address
can't be blank, City can't be blank, Country can't be blank,
Zip Code can't be blank, and Phone can't be blank
errors:
firstname:
- can't be blank
lastname:
- can't be blank
address1:
- can't be blank
city:
- can't be blank
country:
- can't be blank
zipcode:
- can't be blank
phone:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_address_params"
"/api/v2/platform/addresses/{id}":
get:
summary: Return an Address
tags:
- Addresses
security:
- bearer_auth: []
description: Returns an Address
operationId: show-address
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:
https://jsonapi.org/format/#fetching-includes'
example: user,country,state
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: address
attributes:
firstname: John
lastname: Doe
address1: 6 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
phone: 555-555-0199
state_name:
alternative_phone: 555-555-0199
company: Company
created_at: '2022-11-08T19:33:51.740Z'
updated_at: '2022-11-08T19:33:51.740Z'
deleted_at:
label:
public_metadata: {}
private_metadata: {}
relationships:
country:
data:
id: '6'
type: country
state:
data:
id: '6'
type: state
user:
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 an Address
tags:
- Addresses
security:
- bearer_auth: []
description: Updates an Address
operationId: update-address
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:
https://jsonapi.org/format/#fetching-includes'
example: user,country,state
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '8'
type: address
attributes:
firstname: Jack
lastname: Doe
address1: 8 Lovely Street
address2: Northwest
city: Herndon
zipcode: '35005'
phone: 555-555-0199
state_name:
alternative_phone: 555-555-0199
company: Company
created_at: '2022-11-08T19:33:52.269Z'
updated_at: '2022-11-08T19:33:52.501Z'
deleted_at:
label:
public_metadata: {}
private_metadata: {}
relationships:
country:
data:
id: '9'
type: country
state:
data:
id: '8'
type: state
user:
data:
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: First Name can't be blank and Last Name can't be blank
errors:
firstname:
- can't be blank
lastname:
- 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_address_params"
delete:
summary: Delete an Address
tags:
- Addresses
security:
- bearer_auth: []
description: Deletes an Address
operationId: delete-address
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/adjustments":
get:
summary: Return a list of Adjustments
tags:
- Adjustments
security:
- bearer_auth: []
description: Returns a list of Adjustments
operationId: adjustments-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:
https://jsonapi.org/format/#fetching-includes'
example: order,adjustable
schema:
type: string
- name: filter[order_id]
in: query
description: ''
example: '1234'
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: adjustment
attributes:
source_type: Spree::TaxRate
adjustable_type: Spree::Order
amount: '100.0'
label: Shipping
mandatory:
eligible: true
created_at: '2022-11-08T19:33:53.732Z'
updated_at: '2022-11-08T19:33:53.732Z'
state: open
included: false
display_amount: "$100.00"
relationships:
order:
data:
id: '1'
type: order
adjustable:
data:
id: '2'
type: order
source:
data:
id: '1'
type: tax_rate
- id: '2'
type: adjustment
attributes:
source_type: Spree::TaxRate
adjustable_type: Spree::Order
amount: '100.0'
label: Shipping
mandatory:
eligible: true
created_at: '2022-11-08T19:33:53.754Z'
updated_at: '2022-11-08T19:33:53.754Z'
state: open
included: false
display_amount: "$100.00"
relationships:
order:
data:
id: '1'
type: order
adjustable:
data:
id: '3'
type: order
source:
data:
id: '2'
type: tax_rate
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/adjustments?page=1&per_page=&include=&filter[order_id]=
next: http://www.example.com/api/v2/platform/adjustments?filter%5Border_id%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/adjustments?filter%5Border_id%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/adjustments?filter%5Border_id%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/adjustments?filter%5Border_id%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 Adjustment
tags:
- Adjustments
security:
- bearer_auth: []
description: Creates an Adjustment
operationId: create-adjustment
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: order,adjustable
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '5'
type: adjustment
attributes:
source_type: Spree::TaxRate
adjustable_type: Spree::LineItem
amount: '100.0'
label: Shipping
mandatory:
eligible: true
created_at: '2022-11-08T19:33:54.527Z'
updated_at: '2022-11-08T19:33:54.527Z'
state: open
included: false
display_amount: "$100.00"
relationships:
order:
data:
id: '7'
type: order
adjustable:
data:
id: '1'
type: line_item
source:
data:
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Adjustable can't be blank, Order can't be blank, Label
can't be blank, and Amount is not a number
errors:
adjustable:
- can't be blank
order:
- can't be blank
label:
- can't be blank
amount:
- is not a number
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_adjustment_params"
"/api/v2/platform/adjustments/{id}":
get:
summary: Return an Adjustment
tags:
- Adjustments
security:
- bearer_auth: []
description: Returns an Adjustment
operationId: show-adjustment
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:
https://jsonapi.org/format/#fetching-includes'
example: order,adjustable
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: adjustment
attributes:
source_type: Spree::TaxRate
adjustable_type: Spree::LineItem
amount: '1.0'
label: Shipping
mandatory:
eligible: true
created_at: '2022-11-08T19:33:54.871Z'
updated_at: '2022-11-08T19:33:54.875Z'
state: open
included: false
display_amount: "$1.00"
relationships:
order:
data:
id: '8'
type: order
adjustable:
data:
id: '2'
type: line_item
source:
data:
id: '5'
type: tax_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 an Adjustment
tags:
- Adjustments
security:
- bearer_auth: []
description: Updates an Adjustment
operationId: update-adjustment
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:
https://jsonapi.org/format/#fetching-includes'
example: order,adjustable
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '8'
type: adjustment
attributes:
source_type: Spree::TaxRate
adjustable_type: Spree::LineItem
amount: '15.0'
label: New label
mandatory:
eligible: true
created_at: '2022-11-08T19:33:55.540Z'
updated_at: '2022-11-08T19:33:55.775Z'
state: open
included: false
display_amount: "$15.00"
relationships:
order:
data:
id: '10'
type: order
adjustable:
data:
id: '4'
type: line_item
source:
data:
id: '7'
type: tax_rate
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Label can't be blank
errors:
label:
- 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_adjustment_params"
delete:
summary: Delete an Adjustment
tags:
- Adjustments
security:
- bearer_auth: []
description: Deletes an Adjustment
operationId: delete-adjustment
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/classifications":
get:
summary: Return a list of Classifications
tags:
- Classifications
security:
- bearer_auth: []
description: Returns a list of Classifications
operationId: classifications-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:
https://jsonapi.org/format/#fetching-includes'
example: product,taxon
schema:
type: string
- name: filter[taxon_id_eq]
in: query
description: ''
example: '1'
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: classification
attributes:
position: 1
created_at: '2022-11-08T19:33:57.238Z'
updated_at: '2022-11-08T19:33:57.238Z'
relationships:
product:
data:
id: '9'
type: product
taxon:
data:
id: '2'
type: taxon
- id: '2'
type: classification
attributes:
position: 1
created_at: '2022-11-08T19:33:57.322Z'
updated_at: '2022-11-08T19:33:57.322Z'
relationships:
product:
data:
id: '10'
type: product
taxon:
data:
id: '4'
type: taxon
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/classifications?page=1&per_page=&include=&filter[taxon_id_eq]=
next: http://www.example.com/api/v2/platform/classifications?filter%5Btaxon_id_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/classifications?filter%5Btaxon_id_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/classifications?filter%5Btaxon_id_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/classifications?filter%5Btaxon_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 a Classification
tags:
- Classifications
security:
- bearer_auth: []
description: Creates a Classification
operationId: create-classification
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: product,taxon
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '5'
type: classification
attributes:
position: 1
created_at: '2022-11-08T19:33:58.099Z'
updated_at: '2022-11-08T19:33:58.099Z'
relationships:
product:
data:
id: '13'
type: product
taxon:
data:
id: '10'
type: taxon
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Taxon can't be blank and Product can't be blank
errors:
taxon:
- can't be blank
product:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_classification_params"
"/api/v2/platform/classifications/{id}":
get:
summary: Return a Classification
tags:
- Classifications
security:
- bearer_auth: []
description: Returns a Classification
operationId: show-classification
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:
https://jsonapi.org/format/#fetching-includes'
example: product,taxon
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: classification
attributes:
position: 1
created_at: '2022-11-08T19:33:58.452Z'
updated_at: '2022-11-08T19:33:58.452Z'
relationships:
product:
data:
id: '14'
type: product
taxon:
data:
id: '12'
type: taxon
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 Classification
tags:
- Classifications
security:
- bearer_auth: []
description: Updates a Classification
operationId: update-classification
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:
https://jsonapi.org/format/#fetching-includes'
example: product,taxon
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '8'
type: classification
attributes:
position: 1
created_at: '2022-11-08T19:33:59.135Z'
updated_at: '2022-11-08T19:33:59.135Z'
relationships:
product:
data:
id: '16'
type: product
taxon:
data:
id: '16'
type: taxon
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Product can't be blank
errors:
product:
- 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_classification_params"
delete:
summary: Delete a Classification
tags:
- Classifications
security:
- bearer_auth: []
description: Deletes a Classification
operationId: delete-classification
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/cms_pages":
get:
summary: Return a list of CMS Pages
tags:
- CMS Pages
security:
- bearer_auth: []
description: Returns a list of CMS Pages
operationId: cms-pages-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:
https://jsonapi.org/format/#fetching-includes'
example: cms_sections
schema:
type: string
- name: filter[type_eq]
in: query
description: ''
example: Spree::Cms::Pages::FeaturePage
schema:
type: string
- name: filter[locale_eq]
in: query
description: ''
example: en
schema:
type: string
- name: filter[title_cont]
in: query
description: ''
example: About Us
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: cms_page
attributes:
title: Modi soluta tenetur velit odit corporis aut.
meta_title:
content:
meta_description:
visible: true
slug: modi-soluta-tenetur-velit-odit-corporis-aut
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
created_at: '2022-11-08T19:34:00.831Z'
updated_at: '2022-11-08T19:34:00.831Z'
relationships:
cms_sections:
data: []
- id: '2'
type: cms_page
attributes:
title: Distinctio alias numquam porro corrupti enim perferendis
fugiat.
meta_title:
content:
meta_description:
visible: true
slug: distinctio-alias-numquam-porro-corrupti-enim-perferendis-fugiat
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
created_at: '2022-11-08T19:34:00.836Z'
updated_at: '2022-11-08T19:34:00.836Z'
relationships:
cms_sections:
data: []
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/cms_pages?page=1&per_page=&include=&filter[type_eq]=&filter[locale_eq]=&filter[title_cont]=
next: http://www.example.com/api/v2/platform/cms_pages?filter%5Blocale_eq%5D=&filter%5Btitle_cont%5D=&filter%5Btype_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/cms_pages?filter%5Blocale_eq%5D=&filter%5Btitle_cont%5D=&filter%5Btype_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/cms_pages?filter%5Blocale_eq%5D=&filter%5Btitle_cont%5D=&filter%5Btype_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/cms_pages?filter%5Blocale_eq%5D=&filter%5Btitle_cont%5D=&filter%5Btype_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 CMS Page
tags:
- CMS Pages
security:
- bearer_auth: []
description: Creates a CMS Page
operationId: create-cms-page
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: cms_sections
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '5'
type: cms_page
attributes:
title: Eligendi recusandae hic magnam at voluptates delectus
quis.
meta_title:
content:
meta_description:
visible: true
slug: eligendi-recusandae-hic-magnam-at-voluptates-delectus-quis
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
created_at: '2022-11-08T19:34:01.378Z'
updated_at: '2022-11-08T19:34:01.378Z'
relationships:
cms_sections:
data: []
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Title can't be blank, Locale can't be blank, and Type can't
be blank
errors:
title:
- can't be blank
locale:
- can't be blank
type:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
oneOf:
- "$ref": "#/components/schemas/create_standard_cms_page_params"
- "$ref": "#/components/schemas/create_homepage_cms_page_params"
- "$ref": "#/components/schemas/create_feature_cms_page_params"
"/api/v2/platform/cms_pages/{id}":
get:
summary: Return a CMS Page
tags:
- CMS Pages
security:
- bearer_auth: []
description: Returns a CMS Page
operationId: show-cms-page
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:
https://jsonapi.org/format/#fetching-includes'
example: cms_sections
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: cms_page
attributes:
title: Tempora ut laudantium occaecati sunt magnam quae consequuntur.
meta_title:
content:
meta_description:
visible: true
slug: tempora-ut-laudantium-occaecati-sunt-magnam-quae-consequuntur
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
created_at: '2022-11-08T19:34:01.659Z'
updated_at: '2022-11-08T19:34:01.659Z'
relationships:
cms_sections:
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 CMS Page
tags:
- CMS Pages
security:
- bearer_auth: []
description: Updates a CMS Page
operationId: update-cms-page
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:
https://jsonapi.org/format/#fetching-includes'
example: cms_sections
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '8'
type: cms_page
attributes:
title: My Super Page
meta_title:
content:
meta_description:
visible: true
slug: cumque-excepturi-nisi-cupiditate-dolore
type: Spree::Cms::Pages::StandardPage
locale: en
deleted_at:
created_at: '2022-11-08T19:34:02.188Z'
updated_at: '2022-11-08T19:34:02.420Z'
relationships:
cms_sections:
data: []
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Title can't be blank
errors:
title:
- 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:
oneOf:
- "$ref": "#/components/schemas/update_standard_cms_page_params"
- "$ref": "#/components/schemas/update_homepage_cms_page_params"
- "$ref": "#/components/schemas/update_feature_cms_page_params"
delete:
summary: Delete a CMS Page
tags:
- CMS Pages
security:
- bearer_auth: []
description: Deletes a CMS Page
operationId: delete-cms-page
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/cms_sections":
get:
summary: Return a list of CMS Sections
tags:
- CMS Sections
security:
- bearer_auth: []
description: Returns a list of CMS Sections
operationId: cms-sections-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:
https://jsonapi.org/format/#fetching-includes'
example: product
schema:
type: string
- name: filter[name_eq]
in: query
description: ''
example: Hero
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: cms_section
attributes:
name: Culpa natus incidunt nisi itaque quod harum quisquam
nesciunt.
content: {}
settings:
gutters: No Gutters
fit: Screen
destination:
type: Spree::Cms::Sections::HeroImage
position: 1
linked_resource_type: Spree::Taxon
created_at: '2022-11-08T19:34:03.525Z'
updated_at: '2022-11-08T19:34:03.525Z'
relationships:
cms_page:
data:
id: '13'
type: cms_page
linked_resource:
data:
- id: '2'
type: cms_section
attributes:
name: Aperiam quo deserunt qui quidem unde ratione.
content:
link_type_one: Spree::Taxon
link_type_two: Spree::Taxon
link_type_three: Spree::Taxon
settings:
layout_style: Default
fit: Container
destination:
type: Spree::Cms::Sections::ImageGallery
position: 2
linked_resource_type:
created_at: '2022-11-08T19:34:03.529Z'
updated_at: '2022-11-08T19:34:03.529Z'
relationships:
cms_page:
data:
id: '13'
type: cms_page
linked_resource:
data:
- id: '3'
type: cms_section
attributes:
name: Molestiae quo distinctio enim dignissimos laborum cumque.
content: {}
settings:
gutters: No Gutters
fit: Screen
destination:
type: Spree::Cms::Sections::FeaturedArticle
position: 3
linked_resource_type: Spree::Taxon
created_at: '2022-11-08T19:34:03.534Z'
updated_at: '2022-11-08T19:34:03.534Z'
relationships:
cms_page:
data:
id: '13'
type: cms_page
linked_resource:
data:
- id: '4'
type: cms_section
attributes:
name: Quaerat ad enim consequuntur vitae.
content: {}
settings:
gutters: No Gutters
fit: Screen
destination:
type: Spree::Cms::Sections::HeroImage
position: 4
linked_resource_type: Spree::Product
created_at: '2022-11-08T19:34:03.539Z'
updated_at: '2022-11-08T19:34:03.539Z'
relationships:
cms_page:
data:
id: '13'
type: cms_page
linked_resource:
data:
id: '21'
type: product
- id: '5'
type: cms_section
attributes:
name: Quod saepe occaecati et eaque eum expedita ut.
content: {}
settings:
gutters: No Gutters
fit: Screen
destination:
type: Spree::Cms::Sections::HeroImage
position: 5
linked_resource_type: Spree::Product
created_at: '2022-11-08T19:34:03.543Z'
updated_at: '2022-11-08T19:34:03.543Z'
relationships:
cms_page:
data:
id: '13'
type: cms_page
linked_resource:
data:
id: '21'
type: product
meta:
count: 5
total_count: 5
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/cms_sections?page=1&per_page=&include=&filter[name_eq]=
next: http://www.example.com/api/v2/platform/cms_sections?filter%5Bname_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/cms_sections?filter%5Bname_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/cms_sections?filter%5Bname_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/cms_sections?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 CMS Section
tags:
- CMS Sections
security:
- bearer_auth: []
description: Creates a CMS Section
operationId: create-cms-section
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: product
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '13'
type: cms_section
attributes:
name: Hic iste cupiditate corrupti esse minima.
content: {}
settings:
gutters: No Gutters
fit: Screen
destination:
type: Spree::Cms::Sections::HeroImage
position: 3
linked_resource_type: Spree::Product
created_at: '2022-11-08T19:34:04.185Z'
updated_at: '2022-11-08T19:34:04.185Z'
relationships:
cms_page:
data:
id: '15'
type: cms_page
linked_resource:
data:
id: '23'
type: product
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Name can't be blank, Cms page can't be blank, and Type
can't be blank
errors:
name:
- can't be blank
cms_page:
- can't be blank
type:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
oneOf:
- "$ref": "#/components/schemas/create_hero_image_cms_section_params"
- "$ref": "#/components/schemas/create_product_carousel_cms_section_params"
- "$ref": "#/components/schemas/create_side_by_side_images_cms_section_params"
- "$ref": "#/components/schemas/create_featured_article_cms_section_params"
- "$ref": "#/components/schemas/create_image_gallery_cms_section_params"
- "$ref": "#/components/schemas/create_rich_text_cms_section_params"
"/api/v2/platform/cms_sections/{id}":
get:
summary: Return a CMS Section
tags:
- CMS Sections
security:
- bearer_auth: []
description: Returns a CMS Section
operationId: show-cms-section
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:
https://jsonapi.org/format/#fetching-includes'
example: product
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '19'
type: cms_section
attributes:
name: Debitis rerum nulla maiores quam ut impedit.
content: {}
settings:
gutters: No Gutters
fit: Screen
destination:
type: Spree::Cms::Sections::HeroImage
position: 4
linked_resource_type: Spree::Product
created_at: '2022-11-08T19:34:04.573Z'
updated_at: '2022-11-08T19:34:04.573Z'
relationships:
cms_page:
data:
id: '17'
type: cms_page
linked_resource:
data:
id: '25'
type: product
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 CMS Section
tags:
- CMS Sections
security:
- bearer_auth: []
description: Updates a CMS Section
operationId: update-cms-section
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:
https://jsonapi.org/format/#fetching-includes'
example: product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '29'
type: cms_section
attributes:
name: Super Hero
content: {}
settings:
gutters: No Gutters
fit: Screen
destination:
type: Spree::Cms::Sections::HeroImage
position: 1
linked_resource_type: Spree::Product
created_at: '2022-11-08T19:34:05.290Z'
updated_at: '2022-11-08T19:34:05.525Z'
relationships:
cms_page:
data:
id: '20'
type: cms_page
linked_resource:
data:
id: '28'
type: product
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:
oneOf:
- "$ref": "#/components/schemas/update_hero_image_cms_section_params"
- "$ref": "#/components/schemas/update_product_carousel_cms_section_params"
- "$ref": "#/components/schemas/update_side_by_side_images_cms_section_params"
- "$ref": "#/components/schemas/update_featured_article_cms_section_params"
- "$ref": "#/components/schemas/update_image_gallery_cms_section_params"
- "$ref": "#/components/schemas/update_rich_text_cms_section_params"
delete:
summary: Delete a CMS Section
tags:
- CMS Sections
security:
- bearer_auth: []
description: Deletes a CMS Section
operationId: delete-cms-section
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/countries":
get:
summary: Returns a list of Countries
tags:
- Countries
security:
- bearer_auth: []
operationId: countries-list
description: Returns a list of Countries
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '72'
type: country
attributes:
iso_name: UNITED STATES
iso: US
iso3: USA
name: United States of America
numcode: 840
states_required: true
updated_at: '2022-11-08T19:34:06.932Z'
zipcode_required: true
created_at: '2022-11-08T19:34:06.932Z'
relationships:
states:
data: []
- id: '73'
type: country
attributes:
iso_name: ISO_NAME_2
iso: I2
iso3: IS2
name: NAME_2
numcode: 840
states_required: false
updated_at: '2022-11-08T19:34:06.937Z'
zipcode_required: true
created_at: '2022-11-08T19:34:06.937Z'
relationships:
states:
data: []
- id: '74'
type: country
attributes:
iso_name: ISO_NAME_3
iso: I3
iso3: IS3
name: NAME_3
numcode: 840
states_required: false
updated_at: '2022-11-08T19:34:06.939Z'
zipcode_required: true
created_at: '2022-11-08T19:34:06.939Z'
relationships:
states:
data: []
meta:
count: 3
total_count: 3
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/countries
next: http://www.example.com/api/v2/platform/countries?page=1
prev: http://www.example.com/api/v2/platform/countries?page=1
last: http://www.example.com/api/v2/platform/countries?page=1
first: http://www.example.com/api/v2/platform/countries?page=1
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"
"/api/v2/platform/countries/{id}":
get:
summary: Returns a Country
tags:
- Countries
security:
- bearer_auth: []
operationId: show-country
description: Returns a Country
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '79'
type: country
attributes:
iso_name: ISO_NAME_6
iso: I6
iso3: IS6
name: NAME_6
numcode: 840
states_required: false
updated_at: '2022-11-08T19:34:07.232Z'
zipcode_required: true
created_at: '2022-11-08T19:34:07.232Z'
relationships:
states:
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"
"/api/v2/platform/digital_links":
get:
summary: Return a list of Digital Links
tags:
- Digital Links
security:
- bearer_auth: []
description: Returns a list of Digital Links
operationId: digital-links-list
parameters:
- name: page
in: query
example: 1
schema:
type: integer
- name: per_page
in: query
example: 50
schema:
type: integer
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: digital_link
attributes:
token: K5s8uUkdD2TjL8MySKcT3d4Y
access_counter: 0
relationships:
digital:
data:
id: '1'
type: digital
line_item:
data:
id: '9'
type: line_item
- id: '2'
type: digital_link
attributes:
token: kCrqhTH4d6jUnzGnvx6vRjMH
access_counter: 0
relationships:
digital:
data:
id: '2'
type: digital
line_item:
data:
id: '10'
type: line_item
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/digital_links?page=1&per_page=
next: http://www.example.com/api/v2/platform/digital_links?page=1&per_page=
prev: http://www.example.com/api/v2/platform/digital_links?page=1&per_page=
last: http://www.example.com/api/v2/platform/digital_links?page=1&per_page=
first: http://www.example.com/api/v2/platform/digital_links?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 Digital Link
tags:
- Digital Links
security:
- bearer_auth: []
description: Creates a Digital Link
operationId: create-digital-link
parameters: []
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '5'
type: digital_link
attributes:
token: 6bPn1uP9HWaYecdMFkFAkcc3
access_counter: 0
relationships:
digital:
data:
id: '5'
type: digital
line_item:
data:
id: '13'
type: line_item
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Digital can't be blank, Line item can't be blank, and Access
counter is not a number
errors:
digital:
- can't be blank
line_item:
- can't be blank
access_counter:
- is not a number
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_digital_link_params"
"/api/v2/platform/digital_links/{id}":
get:
summary: Return a Digital Link
tags:
- Digital Links
security:
- bearer_auth: []
description: Returns a Digital Link
operationId: show-digital-link
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: digital_link
attributes:
token: vxRU3WSqXJ2J2WbjaC2kLHpg
access_counter: 0
relationships:
digital:
data:
id: '6'
type: digital
line_item:
data:
id: '14'
type: line_item
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 Digital Link
tags:
- Digital Links
security:
- bearer_auth: []
description: Updates a Digital Link
operationId: update-digital-link
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '8'
type: digital_link
attributes:
token: hv6VNk8yK2oiZRPsB1pQnazN
access_counter: 0
relationships:
digital:
data:
id: '8'
type: digital
line_item:
data:
id: '16'
type: line_item
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Access counter is not a number
errors:
access_counter:
- is not a number
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_digital_link_params"
delete:
summary: Delete a Digital Link
tags:
- Digital Links
security:
- bearer_auth: []
description: Deletes a Digital Link
operationId: delete-digital-link
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/digital_links/{id}/reset":
patch:
summary: Reset a Digital Link
tags:
- Digital Links
security:
- bearer_auth: []
operationId: reset-digital-link
description: Resets a digital link, allowing further downloads.
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '13'
type: digital_link
attributes:
token: NBDYF1WRkrnFJewp4PqjATdQ
access_counter: 0
relationships:
digital:
data:
id: '13'
type: digital
line_item:
data:
id: '21'
type: line_item
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/digitals":
get:
summary: Return a list of Digital Assets
tags:
- Digital Assets
security:
- bearer_auth: []
description: Returns a list of Digital Assets
operationId: digitals-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:
https://jsonapi.org/format/#fetching-includes'
example: variant
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '15'
type: digital
attributes:
url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBJQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--fd5f8cec8849d4ccb3d1b3142c05292c54a61183/thinking-cat.jpg"
content_type: image/jpeg
filename: thinking-cat.jpg
byte_size: 18090
relationships:
variant:
data:
id: '80'
type: variant
- id: '16'
type: digital
attributes:
url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBJUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a5cdd34bda2b6ab554834bbebc5eabfe55065258/thinking-cat.jpg"
content_type: image/jpeg
filename: thinking-cat.jpg
byte_size: 18090
relationships:
variant:
data:
id: '82'
type: variant
- id: '17'
type: digital
attributes:
url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBJZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--86cfdf96a18ded007d9ec0ae05dd122cee26fef5/thinking-cat.jpg"
content_type: image/jpeg
filename: thinking-cat.jpg
byte_size: 18090
relationships:
variant:
data:
id: '84'
type: variant
meta:
count: 3
total_count: 3
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/digitals?page=1&per_page=&include=
next: http://www.example.com/api/v2/platform/digitals?include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/digitals?include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/digitals?include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/digitals?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 Digital Asset
tags:
- Digital Assets
security:
- bearer_auth: []
description: Creates a Digital Asset
operationId: create-digital
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: variant
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '24'
type: digital
attributes:
url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBLUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--6cac9cd14eb0139474e42d68585bead023589c85/icon_256x256.jpg"
content_type: image/png
filename: icon_256x256.jpg
byte_size: 818
relationships:
variant:
data:
id: '94'
type: variant
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Attachment can't be blank and Variant can't be blank
errors:
attachment:
- can't be blank
variant:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
multipart/form-data:
schema:
"$ref": "#/components/schemas/create_digital_params"
"/api/v2/platform/digitals/{id}":
get:
summary: Return a Digital Asset
tags:
- Digital Assets
security:
- bearer_auth: []
description: Returns a Digital Asset
operationId: show-digital
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:
https://jsonapi.org/format/#fetching-includes'
example: variant
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '28'
type: digital
attributes:
url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBMUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--0b80fde2e739c30ef5390b1ca35d677810a2d02c/thinking-cat.jpg"
content_type: image/jpeg
filename: thinking-cat.jpg
byte_size: 18090
relationships:
variant:
data:
id: '112'
type: variant
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 Digital Asset
tags:
- Digital Assets
security:
- bearer_auth: []
description: Updates a Digital Asset
operationId: update-digital
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:
https://jsonapi.org/format/#fetching-includes'
example: variant
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '36'
type: digital
attributes:
url: "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBPQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f87d494de28c18444adcd95623dbd33fd728c466/icon_256x256.jpg"
content_type: image/png
filename: icon_256x256.jpg
byte_size: 818
relationships:
variant:
data:
id: '134'
type: variant
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Variant can't be blank
errors:
variant:
- 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:
multipart/form-data:
schema:
"$ref": "#/components/schemas/update_digital_params"
delete:
summary: Delete a Digital Asset
tags:
- Digital Assets
security:
- bearer_auth: []
description: Deletes a Digital Asset
operationId: delete-digital
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/line_items":
get:
summary: Return a list of Line Items
tags:
- Line Items
security:
- bearer_auth: []
description: Returns a list of Line Items
operationId: line-items-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:
https://jsonapi.org/format/#fetching-includes'
example: order,tax_category,variant.product,digital_links
schema:
type: string
- name: filter[order_id_eq]
in: query
description: ''
example: '123'
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '23'
type: line_item
attributes:
quantity: 1
price: '10.0'
created_at: '2022-11-08T19:34:19.541Z'
updated_at: '2022-11-08T19:34:19.550Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
additional_tax_total: '0.0'
promo_total: '0.0'
included_tax_total: '0.0'
pre_tax_amount: '10.0'
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
public_metadata: {}
private_metadata: {}
display_discounted_amount: "$10.00"
display_amount: "$10.00"
display_final_amount: "$10.00"
display_subtotal: "$10.00"
display_pre_tax_amount: "$10.00"
display_price: "$10.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$10.00"
display_included_tax_total: "$0.00"
relationships:
order:
data:
id: '29'
type: order
tax_category:
data:
id: '70'
type: tax_category
variant:
data:
id: '183'
type: variant
adjustments:
data: []
inventory_units:
data: []
digital_links:
data: []
- id: '24'
type: line_item
attributes:
quantity: 1
price: '10.0'
created_at: '2022-11-08T19:34:19.584Z'
updated_at: '2022-11-08T19:34:19.590Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
additional_tax_total: '0.0'
promo_total: '0.0'
included_tax_total: '0.0'
pre_tax_amount: '10.0'
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
public_metadata: {}
private_metadata: {}
display_discounted_amount: "$10.00"
display_amount: "$10.00"
display_final_amount: "$10.00"
display_subtotal: "$10.00"
display_pre_tax_amount: "$10.00"
display_price: "$10.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$10.00"
display_included_tax_total: "$0.00"
relationships:
order:
data:
id: '29'
type: order
tax_category:
data:
id: '70'
type: tax_category
variant:
data:
id: '184'
type: variant
adjustments:
data: []
inventory_units:
data: []
digital_links:
data: []
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/line_items?page=1&per_page=&include=&filter[order_id_eq]=
next: http://www.example.com/api/v2/platform/line_items?filter%5Border_id_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/line_items?filter%5Border_id_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/line_items?filter%5Border_id_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/line_items?filter%5Border_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 a Line Item
tags:
- Line Items
security:
- bearer_auth: []
description: Creates a Line Item
operationId: create-line-item
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: order,tax_category,variant.product,digital_links
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '27'
type: line_item
attributes:
quantity: 1
price: '10.0'
created_at: '2022-11-08T19:34:20.312Z'
updated_at: '2022-11-08T19:34:20.352Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
additional_tax_total: '0.0'
promo_total: '0.0'
included_tax_total: '0.0'
pre_tax_amount: '10.0'
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
public_metadata: {}
private_metadata: {}
display_discounted_amount: "$10.00"
display_amount: "$10.00"
display_final_amount: "$10.00"
display_subtotal: "$10.00"
display_pre_tax_amount: "$10.00"
display_price: "$10.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$10.00"
display_included_tax_total: "$0.00"
relationships:
order:
data:
id: '31'
type: order
tax_category:
data:
id: '72'
type: tax_category
variant:
data:
id: '187'
type: variant
adjustments:
data: []
inventory_units:
data: []
digital_links:
data: []
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Variant can't be blank, Price is not a number, Currency
Must match order currency
errors:
variant:
- can't be blank
price:
- is not a number
currency:
- Must match order currency
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_line_item_params"
"/api/v2/platform/line_items/{id}":
get:
summary: Return a Line Item
tags:
- Line Items
security:
- bearer_auth: []
description: Returns a Line Item
operationId: show-line-item
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:
https://jsonapi.org/format/#fetching-includes'
example: order,tax_category,variant.product,digital_links
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '28'
type: line_item
attributes:
quantity: 1
price: '10.0'
created_at: '2022-11-08T19:34:20.761Z'
updated_at: '2022-11-08T19:34:20.769Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
additional_tax_total: '0.0'
promo_total: '0.0'
included_tax_total: '0.0'
pre_tax_amount: '10.0'
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
public_metadata: {}
private_metadata: {}
display_discounted_amount: "$10.00"
display_amount: "$10.00"
display_final_amount: "$10.00"
display_subtotal: "$10.00"
display_pre_tax_amount: "$10.00"
display_price: "$10.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$10.00"
display_included_tax_total: "$0.00"
relationships:
order:
data:
id: '33'
type: order
tax_category:
data:
id: '73'
type: tax_category
variant:
data:
id: '188'
type: variant
adjustments:
data: []
inventory_units:
data: []
digital_links:
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 Line Item
tags:
- Line Items
security:
- bearer_auth: []
description: Updates a Line Item
operationId: update-line-item
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:
https://jsonapi.org/format/#fetching-includes'
example: order,tax_category,variant.product,digital_links
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '30'
type: line_item
attributes:
quantity: 4
price: '10.0'
created_at: '2022-11-08T19:34:21.508Z'
updated_at: '2022-11-08T19:34:21.772Z'
currency: USD
cost_price: '17.0'
adjustment_total: '0.0'
additional_tax_total: '0.0'
promo_total: '0.0'
included_tax_total: '0.0'
pre_tax_amount: '40.0'
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
public_metadata: {}
private_metadata: {}
display_discounted_amount: "$40.00"
display_amount: "$40.00"
display_final_amount: "$40.00"
display_subtotal: "$40.00"
display_pre_tax_amount: "$40.00"
display_price: "$10.00"
display_adjustment_total: "$0.00"
display_additional_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$40.00"
display_included_tax_total: "$0.00"
relationships:
order:
data:
id: '35'
type: order
tax_category:
data:
id: '75'
type: tax_category
variant:
data:
id: '192'
type: variant
adjustments:
data: []
inventory_units:
data: []
digital_links:
data: []
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Quantity selected of "Product 1275645" is not available.
errors:
quantity:
- selected of "Product 1275645" is not available.
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_line_item_params"
delete:
summary: Delete a Line Item
tags:
- Line Items
security:
- bearer_auth: []
description: Deletes a Line Item
operationId: delete-line-item
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/menu_items":
get:
summary: Return a list of Menu Items
tags:
- Menu Items
security:
- bearer_auth: []
description: Returns a list of Menu Items
operationId: menu-items-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:
https://jsonapi.org/format/#fetching-includes'
example: menu,icon,parent,children,linked_resource
schema:
type: string
- name: filter[name_eq]
in: query
description: ''
example: T-Shirts
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '2'
type: menu_item
attributes:
name: Link no. 1 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 2
rgt: 3
depth: 1
created_at: '2022-11-08T19:34:23.401Z'
updated_at: '2022-11-08T19:34:23.404Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '13'
type: icon
menu:
data:
id: '1'
type: menu
parent:
data:
id: '1'
type: menu_item
linked_resource:
data:
children:
data: []
- id: '3'
type: menu_item
attributes:
name: Link no. 2 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 4
rgt: 5
depth: 1
created_at: '2022-11-08T19:34:23.425Z'
updated_at: '2022-11-08T19:34:23.428Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '14'
type: icon
menu:
data:
id: '1'
type: menu
parent:
data:
id: '1'
type: menu_item
linked_resource:
data:
children:
data: []
- id: '4'
type: menu_item
attributes:
name: Link no. 3 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 6
rgt: 7
depth: 1
created_at: '2022-11-08T19:34:23.446Z'
updated_at: '2022-11-08T19:34:23.449Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '15'
type: icon
menu:
data:
id: '1'
type: menu
parent:
data:
id: '1'
type: menu_item
linked_resource:
data:
children:
data: []
- id: '5'
type: menu_item
attributes:
name: Link no. 4 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 8
rgt: 9
depth: 1
created_at: '2022-11-08T19:34:23.468Z'
updated_at: '2022-11-08T19:34:23.471Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '16'
type: icon
menu:
data:
id: '1'
type: menu
parent:
data:
id: '1'
type: menu_item
linked_resource:
data:
children:
data: []
- id: '6'
type: menu_item
attributes:
name: Link no. 5 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 10
rgt: 11
depth: 1
created_at: '2022-11-08T19:34:23.491Z'
updated_at: '2022-11-08T19:34:23.494Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '17'
type: icon
menu:
data:
id: '1'
type: menu
parent:
data:
id: '1'
type: menu_item
linked_resource:
data:
children:
data: []
- id: '7'
type: menu_item
attributes:
name: Link no. 6 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 12
rgt: 13
depth: 1
created_at: '2022-11-08T19:34:23.515Z'
updated_at: '2022-11-08T19:34:23.518Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '18'
type: icon
menu:
data:
id: '1'
type: menu
parent:
data:
id: '1'
type: menu_item
linked_resource:
data:
children:
data: []
- id: '8'
type: menu_item
attributes:
name: Link no. 7 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 14
rgt: 15
depth: 1
created_at: '2022-11-08T19:34:23.535Z'
updated_at: '2022-11-08T19:34:23.537Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '19'
type: icon
menu:
data:
id: '1'
type: menu
parent:
data:
id: '1'
type: menu_item
linked_resource:
data:
children:
data: []
- id: '1'
type: menu_item
attributes:
name: Neque a rem deserunt beatae.
subtitle:
destination:
new_window: false
item_type: Container
linked_resource_type: Spree::Linkable::Uri
code:
lft: 1
rgt: 16
depth: 0
created_at: '2022-11-08T19:34:23.379Z'
updated_at: '2022-11-08T19:34:23.545Z'
link:
is_container: true
is_root: true
is_child: false
is_leaf: false
relationships:
icon:
data:
menu:
data:
id: '1'
type: menu
parent:
data:
linked_resource:
data:
children:
data:
- id: '2'
type: menu_item
- id: '3'
type: menu_item
- id: '4'
type: menu_item
- id: '5'
type: menu_item
- id: '6'
type: menu_item
- id: '7'
type: menu_item
- id: '8'
type: menu_item
meta:
count: 8
total_count: 8
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/menu_items?page=1&per_page=&include=&filter[name_eq]=
next: http://www.example.com/api/v2/platform/menu_items?filter%5Bname_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/menu_items?filter%5Bname_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/menu_items?filter%5Bname_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/menu_items?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 Menu Item
tags:
- Menu Items
security:
- bearer_auth: []
description: Creates a Menu Item
operationId: create-menu-item
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: menu,icon,parent,children,linked_resource
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '21'
type: menu_item
attributes:
name: Link no. 18 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 8
rgt: 9
depth: 1
created_at: '2022-11-08T19:34:24.333Z'
updated_at: '2022-11-08T19:34:24.336Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
menu:
data:
id: '3'
type: menu
parent:
data:
id: '17'
type: menu_item
linked_resource:
data:
children:
data: []
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Name can't be blank, Menu can't be blank, and Item type
is not included in the list
errors:
name:
- can't be blank
menu:
- can't be blank
item_type:
- is not included in the list
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_menu_item_params"
"/api/v2/platform/menu_items/{id}":
get:
summary: Return a Menu Item
tags:
- Menu Items
security:
- bearer_auth: []
description: Returns a Menu Item
operationId: show-menu-item
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:
https://jsonapi.org/format/#fetching-includes'
example: menu,icon,parent,children,linked_resource
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '30'
type: menu_item
attributes:
name: Link no. 25 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 8
rgt: 9
depth: 1
created_at: '2022-11-08T19:34:24.785Z'
updated_at: '2022-11-08T19:34:24.788Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '36'
type: icon
menu:
data:
id: '5'
type: menu
parent:
data:
id: '26'
type: menu_item
linked_resource:
data:
children:
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 Menu Item
tags:
- Menu Items
security:
- bearer_auth: []
description: Updates a Menu Item
operationId: update-menu-item
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:
https://jsonapi.org/format/#fetching-includes'
example: menu,icon,parent,children,linked_resource
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '44'
type: menu_item
attributes:
name: Menu Item One
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 8
rgt: 9
depth: 1
created_at: '2022-11-08T19:34:25.609Z'
updated_at: '2022-11-08T19:34:25.857Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '47'
type: icon
menu:
data:
id: '8'
type: menu
parent:
data:
id: '40'
type: menu_item
linked_resource:
data:
children:
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_menu_item_params"
delete:
summary: Delete a Menu Item
tags:
- Menu Items
security:
- bearer_auth: []
description: Deletes a Menu Item
operationId: delete-menu-item
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/menu_items/{id}/reposition":
patch:
summary: Reposition a Menu Item
tags:
- Menu Items
security:
- bearer_auth: []
operationId: reposition-menu-item
description: Reposition a Menu Item
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '77'
type: menu_item
attributes:
name: Link no. 62 To Somewhere
subtitle:
destination:
new_window: false
item_type: Link
linked_resource_type: Spree::Linkable::Uri
code:
lft: 5
rgt: 6
depth: 2
created_at: '2022-11-08T19:34:27.610Z'
updated_at: '2022-11-08T19:34:27.858Z'
link:
is_container: false
is_root: false
is_child: true
is_leaf: true
relationships:
icon:
data:
id: '73'
type: icon
menu:
data:
id: '15'
type: menu
parent:
data:
id: '75'
type: menu_item
linked_resource:
data:
children:
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"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/menu_item_reposition"
"/api/v2/platform/menus":
get:
summary: Return a list of Menus
tags:
- Menus
security:
- bearer_auth: []
description: Returns a list of Menus
operationId: menus-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:
https://jsonapi.org/format/#fetching-includes'
example: menu_items
schema:
type: string
- name: filter[name_eq]
in: query
description: ''
example: Main Menu
schema:
type: string
- name: filter[location_eq]
in: query
description: ''
example: header
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '18'
type: menu
attributes:
name: Main Menu
location: header
locale: en
created_at: '2022-11-08T19:34:28.349Z'
updated_at: '2022-11-08T19:34:28.398Z'
relationships:
menu_items:
data:
- id: '89'
type: menu_item
- id: '90'
type: menu_item
- id: '87'
type: menu_item
- id: '19'
type: menu
attributes:
name: Footer Menu
location: footer
locale: en
created_at: '2022-11-08T19:34:28.357Z'
updated_at: '2022-11-08T19:34:28.448Z'
relationships:
menu_items:
data:
- id: '91'
type: menu_item
- id: '92'
type: menu_item
- id: '88'
type: menu_item
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/menus?page=1&per_page=&include=&filter[name_eq]=&filter[location_eq]=
next: http://www.example.com/api/v2/platform/menus?filter%5Blocation_eq%5D=&filter%5Bname_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/menus?filter%5Blocation_eq%5D=&filter%5Bname_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/menus?filter%5Blocation_eq%5D=&filter%5Bname_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/menus?filter%5Blocation_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 Menu
tags:
- Menus
security:
- bearer_auth: []
description: Creates a Menu
operationId: create-menu
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: menu_items
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '22'
type: menu
attributes:
name: Main Menu
location: header
locale: en
created_at: '2022-11-08T19:34:29.089Z'
updated_at: '2022-11-08T19:34:29.097Z'
relationships:
menu_items:
data:
- id: '99'
type: menu_item
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Name can't be blank, Locale can't be blank, and Location
is not included in the list
errors:
name:
- can't be blank
locale:
- can't be blank
location:
- is not included in the list
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_menu_params"
"/api/v2/platform/menus/{id}":
get:
summary: Return a Menu
tags:
- Menus
security:
- bearer_auth: []
description: Returns a Menu
operationId: show-menu
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:
https://jsonapi.org/format/#fetching-includes'
example: menu_items
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '23'
type: menu
attributes:
name: Main Menu
location: header
locale: en
created_at: '2022-11-08T19:34:29.371Z'
updated_at: '2022-11-08T19:34:29.376Z'
relationships:
menu_items:
data:
- id: '100'
type: menu_item
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 Menu
tags:
- Menus
security:
- bearer_auth: []
description: Updates a Menu
operationId: update-menu
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:
https://jsonapi.org/format/#fetching-includes'
example: menu_items
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '25'
type: menu
attributes:
name: Main Menu
location: header
locale: en
created_at: '2022-11-08T19:34:29.913Z'
updated_at: '2022-11-08T19:34:29.919Z'
relationships:
menu_items:
data:
- id: '102'
type: menu_item
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Name can't be blank, Locale can't be blank, and Location
is not included in the list
errors:
name:
- can't be blank
locale:
- can't be blank
location:
- is not included in the list
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_menu_params"
delete:
summary: Delete a Menu
tags:
- Menus
security:
- bearer_auth: []
description: Deletes a Menu
operationId: delete-menu
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/option_types":
get:
summary: Return a list of Option Types
tags:
- Option Types
security:
- bearer_auth: []
description: Returns a list of Option Types
operationId: option-types-list
parameters:
- name: page
in: query
example: 1
schema:
type: integer
- name: per_page
in: query
example: 50
schema:
type: integer
- name: filter[option_type_id_eq]
in: query
description: ''
example: '1'
schema:
type: string
- name: filter[name_cont]
in: query
description: ''
example: Size
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '68'
type: option_type
attributes:
name: foo-size-68
presentation: Size
position: 1
created_at: '2022-11-08T19:34:31.242Z'
updated_at: '2022-11-08T19:34:31.242Z'
filterable: true
public_metadata: {}
private_metadata: {}
relationships:
option_values:
data: []
- id: '69'
type: option_type
attributes:
name: foo-size-69
presentation: Size
position: 2
created_at: '2022-11-08T19:34:31.244Z'
updated_at: '2022-11-08T19:34:31.244Z'
filterable: true
public_metadata: {}
private_metadata: {}
relationships:
option_values:
data: []
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/option_types?page=1&per_page=&filter[option_type_id_eq]=&filter[name_cont]=
next: http://www.example.com/api/v2/platform/option_types?filter%5Bname_cont%5D=&filter%5Boption_type_id_eq%5D=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/option_types?filter%5Bname_cont%5D=&filter%5Boption_type_id_eq%5D=&page=1&per_page=
last: http://www.example.com/api/v2/platform/option_types?filter%5Bname_cont%5D=&filter%5Boption_type_id_eq%5D=&page=1&per_page=
first: http://www.example.com/api/v2/platform/option_types?filter%5Bname_cont%5D=&filter%5Boption_type_id_eq%5D=&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 Type
tags:
- Option Types
security:
- bearer_auth: []
description: Creates an Option Type
operationId: create-option-type
parameters: []
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '72'
type: option_type
attributes:
name: foo-size-72
presentation: Size
position: 1
created_at: '2022-11-08T19:34:31.761Z'
updated_at: '2022-11-08T19:34:31.761Z'
filterable: true
public_metadata: {}
private_metadata: {}
relationships:
option_values:
data: []
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_type_params"
"/api/v2/platform/option_types/{id}":
get:
summary: Return an Option Type
tags:
- Option Types
security:
- bearer_auth: []
description: Returns an Option Type
operationId: show-option-type
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '73'
type: option_type
attributes:
name: foo-size-73
presentation: Size
position: 1
created_at: '2022-11-08T19:34:32.026Z'
updated_at: '2022-11-08T19:34:32.026Z'
filterable: true
public_metadata: {}
private_metadata: {}
relationships:
option_values:
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 an Option Type
tags:
- Option Types
security:
- bearer_auth: []
description: Updates an Option Type
operationId: update-option-type
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '75'
type: option_type
attributes:
name: Size-X
presentation: Size
position: 1
created_at: '2022-11-08T19:34:32.542Z'
updated_at: '2022-11-08T19:34:32.772Z'
filterable: true
public_metadata: {}
private_metadata: {}
relationships:
option_values:
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_option_type_params"
delete:
summary: Delete an Option Type
tags:
- Option Types
security:
- bearer_auth: []
description: Deletes an Option Type
operationId: delete-option-type
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/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:
https://jsonapi.org/format/#fetching-includes'
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:
https://jsonapi.org/format/#fetching-includes'
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:
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:
https://jsonapi.org/format/#fetching-includes'
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:
https://jsonapi.org/format/#fetching-includes'
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"
"/api/v2/platform/orders":
get:
summary: Return a list of Orders
tags:
- Orders
security:
- bearer_auth: []
description: Returns a list of Orders
operationId: orders-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:
https://jsonapi.org/format/#fetching-includes'
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: '40'
type: order
attributes:
number: R936148131
item_total: '0.0'
total: '0.0'
state: cart
adjustment_total: '0.0'
completed_at:
payment_total: '0.0'
shipment_state:
payment_state:
email: murray_harber@strosin.ca
special_instructions:
created_at: '2022-11-08T19:34:36.444Z'
updated_at: '2022-11-08T19:34:36.444Z'
currency: USD
last_ip_address:
shipment_total: '0.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 0
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$0.00"
display_shipment_total: "$0.00"
display_outstanding_balance: "$0.00"
display_item_total: "$0.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$0.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$0.00"
display_pre_tax_total: "$0.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$0.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
id: '41'
type: user
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '52'
type: address
ship_address:
data:
line_items:
data: []
payments:
data: []
shipments:
data: []
state_changes:
data: []
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_promotions:
data: []
- id: '41'
type: order
attributes:
number: R877925031
item_total: '0.0'
total: '0.0'
state: cart
adjustment_total: '0.0'
completed_at:
payment_total: '0.0'
shipment_state:
payment_state:
email: bronwyn@legroscorkery.ca
special_instructions:
created_at: '2022-11-08T19:34:36.455Z'
updated_at: '2022-11-08T19:34:36.455Z'
currency: USD
last_ip_address:
shipment_total: '0.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 0
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$0.00"
display_shipment_total: "$0.00"
display_outstanding_balance: "$0.00"
display_item_total: "$0.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$0.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$0.00"
display_pre_tax_total: "$0.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$0.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
id: '42'
type: user
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '53'
type: address
ship_address:
data:
line_items:
data: []
payments:
data: []
shipments:
data: []
state_changes:
data: []
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_promotions:
data: []
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/orders?page=1&per_page=&include=&filter[state_eq]=
next: http://www.example.com/api/v2/platform/orders?filter%5Bstate_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/orders?filter%5Bstate_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/orders?filter%5Bstate_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/orders?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: Creates an Order
tags:
- Orders
security:
- bearer_auth: []
description: Creates an Order
operationId: create-order
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '44'
type: order
attributes:
number: R304058941
item_total: '0.0'
total: '0.0'
state: cart
adjustment_total: '0.0'
completed_at:
payment_total: '0.0'
shipment_state:
payment_state:
email:
special_instructions:
created_at: '2022-11-08T19:34:37.269Z'
updated_at: '2022-11-08T19:34:37.289Z'
currency: USD
last_ip_address:
shipment_total: '0.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 0
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$0.00"
display_shipment_total: "$0.00"
display_outstanding_balance: "$0.00"
display_item_total: "$0.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$0.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$20.00"
display_pre_tax_total: "$20.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$0.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '56'
type: address
ship_address:
data:
id: '56'
type: address
line_items:
data:
- id: '35'
type: line_item
payments:
data:
- id: '1'
type: payment
shipments:
data: []
state_changes:
data: []
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_promotions:
data: []
schema:
"$ref": "#/components/schemas/resource"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_order_params"
"/api/v2/platform/orders/{id}":
get:
summary: Return an Order
tags:
- Orders
security:
- bearer_auth: []
description: Returns an Order
operationId: show-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '45'
type: order
attributes:
number: R612921489
item_total: '10.0'
total: '110.0'
state: delivery
adjustment_total: '0.0'
completed_at:
payment_total: '0.0'
shipment_state:
payment_state:
email: salome_rowe@lehner.com
special_instructions:
created_at: '2022-11-08T19:34:37.360Z'
updated_at: '2022-11-08T19:34:37.513Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 1
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$100.00"
display_shipment_total: "$100.00"
display_outstanding_balance: "$110.00"
display_item_total: "$10.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$110.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$10.00"
display_pre_tax_total: "$10.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$110.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
id: '45'
type: user
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '57'
type: address
ship_address:
data:
id: '58'
type: address
line_items:
data:
- id: '36'
type: line_item
payments:
data: []
shipments:
data:
- id: '1'
type: shipment
state_changes:
data: []
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_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 an Order
tags:
- Orders
security:
- bearer_auth: []
description: Updates an Order
operationId: update-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '47'
type: order
attributes:
number: R484277352
item_total: '10.0'
total: '110.0'
state: delivery
adjustment_total: '0.0'
completed_at:
payment_total: '0.0'
shipment_state:
payment_state:
email: new@example.com
special_instructions:
created_at: '2022-11-08T19:34:38.200Z'
updated_at: '2022-11-08T19:34:38.599Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 1
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$100.00"
display_shipment_total: "$100.00"
display_outstanding_balance: "$110.00"
display_item_total: "$10.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$110.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$10.00"
display_pre_tax_total: "$10.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$110.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
id: '47'
type: user
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '61'
type: address
ship_address:
data:
id: '62'
type: address
line_items:
data:
- id: '38'
type: line_item
payments:
data: []
shipments:
data:
- id: '3'
type: shipment
state_changes:
data: []
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_promotions:
data: []
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Email is invalid
errors:
email:
- is invalid
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_order_params"
delete:
summary: Delete an Order
tags:
- Orders
security:
- bearer_auth: []
description: Deletes an Order
operationId: delete-order
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/orders/{id}/advance":
patch:
summary: Advances an Order
tags:
- Orders
security:
- bearer_auth: []
description: Advances an Order
operationId: advance-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '52'
type: order
attributes:
number: R366890627
item_total: '10.0'
total: '110.0'
state: payment
adjustment_total: '0.0'
completed_at:
payment_total: '0.0'
shipment_state:
payment_state:
email: sixta.larkin@bradtke.co.uk
special_instructions:
created_at: '2022-11-08T19:34:40.155Z'
updated_at: '2022-11-08T19:34:40.513Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 1
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$100.00"
display_shipment_total: "$100.00"
display_outstanding_balance: "$110.00"
display_item_total: "$10.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$110.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$10.00"
display_pre_tax_total: "$110.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$110.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
id: '52'
type: user
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '71'
type: address
ship_address:
data:
id: '72'
type: address
line_items:
data:
- id: '43'
type: line_item
payments:
data: []
shipments:
data:
- id: '8'
type: shipment
state_changes:
data:
- id: '2'
type: state_change
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_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"
"/api/v2/platform/orders/{id}/next":
patch:
summary: Next an Order
tags:
- Orders
security:
- bearer_auth: []
description: Moves an Order to the next state
operationId: next-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '54'
type: order
attributes:
number: R268996702
item_total: '10.0'
total: '110.0'
state: payment
adjustment_total: '0.0'
completed_at:
payment_total: '0.0'
shipment_state:
payment_state:
email: deon.sporer@haagortiz.com
special_instructions:
created_at: '2022-11-08T19:34:40.971Z'
updated_at: '2022-11-08T19:34:41.324Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 1
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$100.00"
display_shipment_total: "$100.00"
display_outstanding_balance: "$110.00"
display_item_total: "$10.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$110.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$10.00"
display_pre_tax_total: "$110.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$110.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
id: '54'
type: user
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '75'
type: address
ship_address:
data:
id: '76'
type: address
line_items:
data:
- id: '45'
type: line_item
payments:
data: []
shipments:
data:
- id: '10'
type: shipment
state_changes:
data:
- id: '3'
type: state_change
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_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"
"/api/v2/platform/orders/{id}/complete":
patch:
summary: Completes an Order
tags:
- Orders
security:
- bearer_auth: []
description: Marks an Order as completed
operationId: complete-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '56'
type: order
attributes:
number: R923002122
item_total: '10.0'
total: '110.0'
state: complete
adjustment_total: '0.0'
completed_at: '2022-11-08T19:34:42.207Z'
payment_total: '0.0'
shipment_state: pending
payment_state: balance_due
email: adeline@hodkiewicz.co.uk
special_instructions:
created_at: '2022-11-08T19:34:41.758Z'
updated_at: '2022-11-08T19:34:42.207Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 1
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$100.00"
display_shipment_total: "$100.00"
display_outstanding_balance: "$110.00"
display_item_total: "$10.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$110.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$10.00"
display_pre_tax_total: "$110.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$110.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
id: '56'
type: user
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '79'
type: address
ship_address:
data:
id: '80'
type: address
line_items:
data:
- id: '47'
type: line_item
payments:
data:
- id: '2'
type: payment
shipments:
data:
- id: '12'
type: shipment
state_changes:
data:
- id: '4'
type: state_change
- id: '5'
type: state_change
- id: '8'
type: state_change
- id: '9'
type: state_change
- id: '10'
type: state_change
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_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"
"/api/v2/platform/orders/{id}/empty":
patch:
summary: Empties an Order
tags:
- Orders
security:
- bearer_auth: []
description: Removes all line items, promotions, shipment and payments from
an Order
operationId: empty-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '59'
type: order
attributes:
number: R688998321
item_total: '0.0'
total: '0.0'
state: cart
adjustment_total: '0.0'
completed_at:
payment_total: '0.0'
shipment_state:
payment_state:
email: porsha.shanahan@nicolaszboncak.us
special_instructions:
created_at: '2022-11-08T19:34:42.795Z'
updated_at: '2022-11-08T19:34:43.122Z'
currency: USD
last_ip_address:
shipment_total: '0.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 0
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$0.00"
display_shipment_total: "$0.00"
display_outstanding_balance: "$0.00"
display_item_total: "$0.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$0.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$0.00"
display_pre_tax_total: "$0.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$0.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
id: '59'
type: user
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '85'
type: address
ship_address:
data:
id: '86'
type: address
line_items:
data: []
payments:
data: []
shipments:
data: []
state_changes:
data: []
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_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"
"/api/v2/platform/orders/{id}/approve":
patch:
summary: Approves an Order
tags:
- Orders
security:
- bearer_auth: []
description: Approves an Order, when using a token created for a user, it will
save this user as the approver
operationId: approve-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record approved
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '61'
type: order
attributes:
number: R057732263
item_total: '10.0'
total: '110.0'
state: delivery
adjustment_total: '0.0'
completed_at:
payment_total: '0.0'
shipment_state:
payment_state:
email: horacio_purdy@schroederweimann.com
special_instructions:
created_at: '2022-11-08T19:34:43.561Z'
updated_at: '2022-11-08T19:34:43.641Z'
currency: USD
last_ip_address:
shipment_total: '100.0'
additional_tax_total: '0.0'
promo_total: '0.0'
channel: spree
included_tax_total: '0.0'
item_count: 1
approved_at:
confirmation_delivered: false
canceled_at:
state_lock_version: 0
taxable_adjustment_total: '0.0'
non_taxable_adjustment_total: '0.0'
store_owner_notification_delivered:
public_metadata: {}
private_metadata: {}
internal_note:
display_ship_total: "$100.00"
display_shipment_total: "$100.00"
display_outstanding_balance: "$110.00"
display_item_total: "$10.00"
display_adjustment_total: "$0.00"
display_included_tax_total: "$0.00"
display_additional_tax_total: "$0.00"
display_tax_total: "$0.00"
display_promo_total: "$0.00"
display_total: "$110.00"
display_cart_promo_total: "$0.00"
display_pre_tax_item_amount: "$10.00"
display_pre_tax_total: "$10.00"
display_total_applicable_store_credit: "$0.00"
display_total_applied_store_credit: "$0.00"
display_order_total_after_store_credit: "$110.00"
display_total_available_store_credit: "$0.00"
display_store_credit_remaining_after_capture: "$0.00"
relationships:
user:
data:
id: '61'
type: user
created_by:
data:
approver:
data:
canceler:
data:
bill_address:
data:
id: '89'
type: address
ship_address:
data:
id: '90'
type: address
line_items:
data:
- id: '52'
type: line_item
payments:
data: []
shipments:
data:
- id: '17'
type: shipment
state_changes:
data: []
return_authorizations:
data: []
reimbursements:
data: []
adjustments:
data: []
all_adjustments:
data: []
order_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"
"/api/v2/platform/orders/{id}/cancel":
patch:
summary: Cancels an Order
tags:
- Orders
security:
- bearer_auth: []
description: Cancels an Order, when using a token created for a user, it will
save this user as the canceler
operationId: cancel-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: record canceled
'422':
description: cannot be canceled
'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/orders/{id}/use_store_credit":
patch:
summary: Use Store Credit for an Order
tags:
- Orders
security:
- bearer_auth: []
description: Creates Store Credit payment for an Order
operationId: use-store-credit-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: store credit payment created
'422':
description: user does not have store credit available
'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/amount_param"
"/api/v2/platform/orders/{id}/apply_coupon_code":
patch:
summary: Apply Coupon Code for an Order
tags:
- Orders
security:
- bearer_auth: []
description: Creates Store Credit payment for an Order
operationId: apply-coupon-code-order
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: coupon code applied
'422':
description: coupon code couldn't be applied
'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/coupon_code_param"
"/api/v2/platform/payment_methods":
get:
summary: Return a list of Payment Methods
tags:
- Payment Methods
security:
- bearer_auth: []
description: Returns a list of Payment Methods
operationId: payment-methods-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:
https://jsonapi.org/format/#fetching-includes'
example: stores
schema:
type: string
- name: filter[name]
in: query
description: ''
example: Stripe
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '12'
type: payment_method
attributes:
name: Test
type: Spree::PaymentMethod
description:
active: true
display_on: both
auto_capture:
position: 1
created_at: '2022-11-08T19:34:47.914Z'
updated_at: '2022-11-08T19:34:47.916Z'
deleted_at:
public_metadata: {}
private_metadata: {}
preferences: {}
relationships:
stores:
data:
- id: '287'
type: store
- id: '13'
type: payment_method
attributes:
name: Test
type: Spree::PaymentMethod
description:
active: true
display_on: both
auto_capture:
position: 2
created_at: '2022-11-08T19:34:47.923Z'
updated_at: '2022-11-08T19:34:47.924Z'
deleted_at:
public_metadata: {}
private_metadata: {}
preferences: {}
relationships:
stores:
data:
- id: '287'
type: store
- id: '14'
type: payment_method
attributes:
name: Test
type: Spree::PaymentMethod
description:
active: true
display_on: both
auto_capture:
position: 3
created_at: '2022-11-08T19:34:47.929Z'
updated_at: '2022-11-08T19:34:47.930Z'
deleted_at:
public_metadata: {}
private_metadata: {}
preferences: {}
relationships:
stores:
data:
- id: '287'
type: store
- id: '15'
type: payment_method
attributes:
name: Credit Card
type: Spree::Gateway::Bogus
description:
active: true
display_on: both
auto_capture:
position: 4
created_at: '2022-11-08T19:34:47.935Z'
updated_at: '2022-11-08T19:34:47.937Z'
deleted_at:
public_metadata: {}
private_metadata: {}
preferences:
dummy_key: PUBLICKEY123
test_mode: true
server: test
relationships:
stores:
data:
- id: '287'
type: store
- id: '16'
type: payment_method
attributes:
name: Credit Card
type: Spree::Gateway::Bogus
description:
active: true
display_on: both
auto_capture:
position: 5
created_at: '2022-11-08T19:34:47.941Z'
updated_at: '2022-11-08T19:34:47.943Z'
deleted_at:
public_metadata: {}
private_metadata: {}
preferences:
dummy_key: PUBLICKEY123
test_mode: true
server: test
relationships:
stores:
data:
- id: '287'
type: store
meta:
count: 5
total_count: 5
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/payment_methods?page=1&per_page=&include=&filter[name]=
next: http://www.example.com/api/v2/platform/payment_methods?filter%5Bname%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/payment_methods?filter%5Bname%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/payment_methods?filter%5Bname%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/payment_methods?filter%5Bname%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 Payment Method
tags:
- Payment Methods
security:
- bearer_auth: []
description: Creates a Payment Method
operationId: create-payment-method
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: stores
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '24'
type: payment_method
attributes:
name: API Bogus
type: Spree::Gateway::Bogus
description:
active: true
display_on: both
auto_capture:
position: 3
created_at: '2022-11-08T19:34:48.527Z'
updated_at: '2022-11-08T19:34:48.530Z'
deleted_at:
public_metadata: {}
private_metadata: {}
preferences:
dummy_key: PUBLICKEY123
test_mode: true
server: test
relationships:
stores:
data:
- id: '291'
type: store
- id: '292'
type: store
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_payment_method_params"
"/api/v2/platform/payment_methods/{id}":
get:
summary: Return a Payment Method
tags:
- Payment Methods
security:
- bearer_auth: []
description: Returns a Payment Method
operationId: show-payment-method
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:
https://jsonapi.org/format/#fetching-includes'
example: stores
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '30'
type: payment_method
attributes:
name: Credit Card
type: Spree::Gateway::Bogus
description:
active: true
display_on: both
auto_capture:
position: 4
created_at: '2022-11-08T19:34:48.855Z'
updated_at: '2022-11-08T19:34:48.857Z'
deleted_at:
public_metadata: {}
private_metadata: {}
preferences:
dummy_key: PUBLICKEY123
test_mode: true
server: test
relationships:
stores:
data:
- id: '295'
type: store
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 Payment Method
tags:
- Payment Methods
security:
- bearer_auth: []
description: Updates a Payment Method
operationId: update-payment-method
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:
https://jsonapi.org/format/#fetching-includes'
example: stores
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '40'
type: payment_method
attributes:
name: Credit Card
type: Spree::Gateway::Bogus
description:
active: true
display_on: both
auto_capture:
position: 3
created_at: '2022-11-08T19:34:49.452Z'
updated_at: '2022-11-08T19:34:49.687Z'
deleted_at:
public_metadata: {}
private_metadata: {}
preferences:
dummy_key: UPDATED-DUMMY-KEY-123
test_mode: false
server: production
relationships:
stores:
data:
- id: '301'
type: store
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:
oneOf:
- "$ref": "#/components/schemas/update_payment_method_params"
- "$ref": "#/components/schemas/update_payment_method_params_bogus_gateway"
delete:
summary: Delete a Payment Method
tags:
- Payment Methods
security:
- bearer_auth: []
description: Deletes a Payment Method
operationId: delete-payment-method
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/payments":
get:
summary: Return a list of Payments
tags:
- Payments
security:
- bearer_auth: []
description: Returns a list of Payments
operationId: payments-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:
https://jsonapi.org/format/#fetching-includes'
example: payment_method,order,source
schema:
type: string
- name: filter[payment_method_id_eq]
in: query
description: ''
example: '1'
schema:
type: string
- name: filter[amount_gteq]
in: query
description: ''
example: '99.90'
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '6'
type: payment
attributes:
amount: '45.75'
source_type: Spree::CreditCard
state: invalid
response_code: '12345'
avs_response:
created_at: '2022-11-08T19:34:50.932Z'
updated_at: '2022-11-08T19:34:50.951Z'
number: PPC5V5ZL
cvv_response_code:
cvv_response_message:
public_metadata: {}
private_metadata: {}
display_amount: "$45.75"
relationships:
order:
data:
id: '72'
type: order
payment_method:
data:
id: '60'
type: payment_method
source:
data:
id: '5'
type: credit_card
log_entries:
data: []
state_changes:
data:
- id: '15'
type: state_change
payment_capture_events:
data: []
refunds:
data: []
- id: '7'
type: payment
attributes:
amount: '45.75'
source_type: Spree::CreditCard
state: checkout
response_code: '12345'
avs_response:
created_at: '2022-11-08T19:34:50.949Z'
updated_at: '2022-11-08T19:34:50.949Z'
number: PB59CC7E
cvv_response_code:
cvv_response_message:
public_metadata: {}
private_metadata: {}
display_amount: "$45.75"
relationships:
order:
data:
id: '72'
type: order
payment_method:
data:
id: '60'
type: payment_method
source:
data:
id: '6'
type: credit_card
log_entries:
data: []
state_changes:
data: []
payment_capture_events:
data: []
refunds:
data: []
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/payments?page=1&per_page=&include=&filter[payment_method_id_eq]=&filter[amount_gteq]=
next: http://www.example.com/api/v2/platform/payments?filter%5Bamount_gteq%5D=&filter%5Bpayment_method_id_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/payments?filter%5Bamount_gteq%5D=&filter%5Bpayment_method_id_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/payments?filter%5Bamount_gteq%5D=&filter%5Bpayment_method_id_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/payments?filter%5Bamount_gteq%5D=&filter%5Bpayment_method_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"
"/api/v2/platform/payments/{id}":
get:
summary: Return a Payment
tags:
- Payments
security:
- bearer_auth: []
description: Returns a Payment
operationId: show-payment
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:
https://jsonapi.org/format/#fetching-includes'
example: payment_method,order,source
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '10'
type: payment
attributes:
amount: '45.75'
source_type: Spree::CreditCard
state: checkout
response_code: '12345'
avs_response:
created_at: '2022-11-08T19:34:51.349Z'
updated_at: '2022-11-08T19:34:51.349Z'
number: PROYB91V
cvv_response_code:
cvv_response_message:
public_metadata: {}
private_metadata: {}
display_amount: "$45.75"
relationships:
order:
data:
id: '74'
type: order
payment_method:
data:
id: '66'
type: payment_method
source:
data:
id: '9'
type: credit_card
log_entries:
data: []
state_changes:
data: []
payment_capture_events:
data: []
refunds:
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"
delete:
summary: Delete a Payment
tags:
- Payments
security:
- bearer_auth: []
description: Deletes a Payment
operationId: delete-payment
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/products":
get:
summary: Return a list of Products
tags:
- Products
security:
- bearer_auth: []
description: Returns a list of Products
operationId: products-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:
https://jsonapi.org/format/#fetching-includes'
example: prices
schema:
type: string
- name: filter[name_eq]
in: query
description: ''
example: Green Toy Boat
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '164'
type: product
attributes:
name: Product 1648238
description: |-
Expedita a doloribus dolorum possimus architecto eligendi sunt quod. Officiis rerum nostrum incidunt delectus sint reiciendis doloribus ut. Atque voluptate nostrum voluptas unde repellendus.
Cum natus a id amet eos eligendi laborum. Minus itaque culpa aliquid repudiandae est odio reiciendis temporibus. Nesciunt cum voluptas veniam excepturi ducimus explicabo recusandae. Error quos voluptate reiciendis numquam dicta.
available_on: '2021-11-08T19:34:52.496Z'
deleted_at:
slug: product-1648238
meta_description:
meta_keywords:
created_at: '2022-11-08T19:34:52.514Z'
updated_at: '2022-11-08T19:34:52.520Z'
promotionable: true
meta_title:
discontinue_on:
public_metadata: {}
private_metadata: {}
status: active
make_active_at: '2021-11-08T19:34:52.496Z'
display_compare_at_price:
display_price: "$19.99"
purchasable: true
in_stock: false
backorderable: true
available: true
currency: USD
price: '19.99'
compare_at_price:
relationships:
tax_category:
data:
id: '108'
type: tax_category
primary_variant:
data:
id: '231'
type: variant
default_variant:
data:
id: '231'
type: variant
variants:
data: []
option_types:
data: []
product_properties:
data: []
taxons:
data: []
images:
data: []
- id: '165'
type: product
attributes:
name: Product 1653934
description: |-
Blanditiis deleniti tempora provident culpa id doloremque. Quibusdam commodi minus magni asperiores nemo odio. Laborum mollitia alias quisquam exercitationem aliquam ex occaecati doloremque. Quos optio voluptatum suscipit soluta assumenda quaerat maxime fugit. In saepe quaerat exercitationem earum sequi.
Quidem nesciunt provident dicta explicabo autem nemo sunt. Iusto in provident officiis sed. Eveniet quam distinctio ipsam optio sint. Et autem ducimus vel voluptas facere.
Earum inventore ut eum eos numquam. Omnis nam provident atque temporibus. Natus illo voluptas enim ex optio eveniet ullam. Labore repudiandae laudantium non suscipit est quae. Odio provident a ad fuga accusamus distinctio vitae.
Doloremque quod similique ipsa quas perferendis rerum earum excepturi. Minus explicabo autem quod incidunt. Earum magnam voluptatem expedita eveniet reiciendis dolores atque et.
Inventore odio voluptate dicta dolore natus aut occaecati molestiae. Aut eum consequatur soluta voluptatum animi delectus accusantium asperiores. Facere exercitationem consequuntur adipisci nulla similique perferendis ullam. Illo ad aliquid maiores non ea.
available_on: '2021-11-08T19:34:52.538Z'
deleted_at:
slug: product-1653934
meta_description:
meta_keywords:
created_at: '2022-11-08T19:34:52.549Z'
updated_at: '2022-11-08T19:34:52.555Z'
promotionable: true
meta_title:
discontinue_on:
public_metadata: {}
private_metadata: {}
status: active
make_active_at: '2021-11-08T19:34:52.538Z'
display_compare_at_price:
display_price: "$19.99"
purchasable: true
in_stock: false
backorderable: true
available: true
currency: USD
price: '19.99'
compare_at_price:
relationships:
tax_category:
data:
id: '108'
type: tax_category
primary_variant:
data:
id: '232'
type: variant
default_variant:
data:
id: '232'
type: variant
variants:
data: []
option_types:
data: []
product_properties:
data: []
taxons:
data: []
images:
data: []
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/products?page=1&per_page=&include=&filter[name_eq]=
next: http://www.example.com/api/v2/platform/products?filter%5Bname_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/products?filter%5Bname_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/products?filter%5Bname_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/products?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 Product
tags:
- Products
security:
- bearer_auth: []
description: Creates a Product
operationId: create-product
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: prices
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '168'
type: product
attributes:
name: Spinning Top
description:
available_on:
deleted_at:
slug: spinning-top
meta_description:
meta_keywords:
created_at: '2022-11-08T19:34:53.239Z'
updated_at: '2022-11-08T19:34:53.243Z'
promotionable: true
meta_title:
discontinue_on:
public_metadata: {}
private_metadata: {}
status: draft
make_active_at:
display_compare_at_price:
display_price: "$87.43"
purchasable: false
in_stock: false
backorderable: false
available: false
currency: USD
price: '87.43'
compare_at_price:
relationships:
tax_category:
data:
primary_variant:
data:
id: '235'
type: variant
default_variant:
data:
id: '235'
type: variant
variants:
data: []
option_types:
data: []
product_properties:
data: []
taxons:
data: []
images:
data: []
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Name can't be blank, Shipping Category can't be blank,
and Price can't be blank
errors:
name:
- can't be blank
shipping_category:
- can't be blank
price:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_product_params"
"/api/v2/platform/products/{id}":
get:
summary: Return a Product
tags:
- Products
security:
- bearer_auth: []
description: Returns a Product
operationId: show-product
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:
https://jsonapi.org/format/#fetching-includes'
example: prices
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '169'
type: product
attributes:
name: Product 1682525
description: |-
Enim quibusdam et quis in iste. Eius labore corporis tempora suscipit molestiae sunt. Omnis vero numquam nostrum totam illum consectetur similique corporis.
Iusto neque beatae consequatur consequuntur soluta pariatur at. Magnam numquam nisi voluptatem ipsa blanditiis ullam iste mollitia. Incidunt totam earum perferendis eveniet iusto ea. Sapiente est quam corporis veniam eveniet itaque.
Repudiandae autem cumque hic nisi perferendis cum quod nostrum. Voluptatem ipsam esse provident itaque similique quia. Nobis quod blanditiis atque cupiditate eaque perspiciatis ullam in. Sequi aspernatur eaque reiciendis error illo dolorum pariatur.
Sit recusandae reiciendis magni ipsam repudiandae est dolor quae. Veritatis possimus eveniet iusto dignissimos quasi consequatur temporibus. Magni asperiores officiis occaecati provident velit quos a voluptate.
available_on: '2021-11-08T19:34:53.563Z'
deleted_at:
slug: product-1682525
meta_description:
meta_keywords:
created_at: '2022-11-08T19:34:53.582Z'
updated_at: '2022-11-08T19:34:53.588Z'
promotionable: true
meta_title:
discontinue_on:
public_metadata: {}
private_metadata: {}
status: active
make_active_at: '2021-11-08T19:34:53.563Z'
display_compare_at_price:
display_price: "$19.99"
purchasable: true
in_stock: false
backorderable: true
available: true
currency: USD
price: '19.99'
compare_at_price:
relationships:
tax_category:
data:
id: '110'
type: tax_category
primary_variant:
data:
id: '236'
type: variant
default_variant:
data:
id: '236'
type: variant
variants:
data: []
option_types:
data: []
product_properties:
data: []
taxons:
data: []
images:
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 Product
tags:
- Products
security:
- bearer_auth: []
description: Updates a Product
operationId: update-product
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:
https://jsonapi.org/format/#fetching-includes'
example: prices
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '171'
type: product
attributes:
name: Twirling Bottom
description: |-
Ut quod iusto optio quos labore. Blanditiis in sunt sequi dolores eveniet reprehenderit maxime. Iusto consequuntur itaque nostrum placeat.
Laboriosam labore vero voluptatibus suscipit consectetur possimus qui. Ullam commodi corporis cumque voluptatem neque non explicabo. Quaerat atque error nesciunt recusandae rem unde qui quas. Labore perspiciatis consectetur quisquam voluptatibus similique officiis ipsam enim. Labore neque reprehenderit et tempore.
Ea minus nostrum placeat quibusdam laudantium. Illo voluptates in suscipit consequatur harum. Omnis tempora facilis distinctio quos repudiandae ex sapiente. Amet optio temporibus voluptas doloribus.
Odio at porro commodi repudiandae quia quas. Ut sequi atque accusamus voluptatum consequatur delectus explicabo. Nobis laboriosam facere molestias consectetur saepe totam eos ea. Possimus atque adipisci sequi dolorum excepturi quo. Ad esse dolorum accusantium fugiat quaerat.
Voluptas libero magnam earum reprehenderit ullam at veritatis. Magni culpa id quidem hic ad. Quidem ipsum est vero ut eaque veniam. Corrupti sint ratione maxime aspernatur itaque quo nostrum. Qui architecto ducimus quisquam iste saepe ullam.
available_on: '2021-11-08T19:34:54.192Z'
deleted_at:
slug: product-1706992
meta_description:
meta_keywords:
created_at: '2022-11-08T19:34:54.210Z'
updated_at: '2022-11-08T19:34:54.468Z'
promotionable: true
meta_title:
discontinue_on:
public_metadata: {}
private_metadata: {}
status: active
make_active_at: '2021-11-08T19:34:54.192Z'
display_compare_at_price:
display_price: "$33.21"
purchasable: true
in_stock: false
backorderable: true
available: true
currency: USD
price: '33.21'
compare_at_price:
relationships:
tax_category:
data:
id: '112'
type: tax_category
primary_variant:
data:
id: '238'
type: variant
default_variant:
data:
id: '238'
type: variant
variants:
data: []
option_types:
data: []
product_properties:
data: []
taxons:
data: []
images:
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_product_params"
delete:
summary: Delete a Product
tags:
- Products
security:
- bearer_auth: []
description: Deletes a Product
operationId: delete-product
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/promotion_actions":
get:
summary: Return a list of Promotion Actions
tags:
- Promotion Actions
security:
- bearer_auth: []
description: Returns a list of Promotion Actions
operationId: promotion-actions-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:
https://jsonapi.org/format/#fetching-includes'
example: calculator
schema:
type: string
- name: filter[type_eq]
in: query
description: ''
example: Spree::Promotion::Actions::CreateAdjustment
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '5'
type: promotion_action
attributes:
position:
type:
deleted_at:
created_at: '2022-11-08T19:34:55.838Z'
updated_at: '2022-11-08T19:34:55.838Z'
relationships:
promotion:
data:
id: '5'
type: promotion
- id: '6'
type: promotion_action
attributes:
position:
type:
deleted_at:
created_at: '2022-11-08T19:34:55.839Z'
updated_at: '2022-11-08T19:34:55.839Z'
relationships:
promotion:
data:
id: '5'
type: promotion
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/promotion_actions?page=1&per_page=&include=&filter[type_eq]=
next: http://www.example.com/api/v2/platform/promotion_actions?filter%5Btype_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/promotion_actions?filter%5Btype_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/promotion_actions?filter%5Btype_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/promotion_actions?filter%5Btype_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 Action
tags:
- Promotion Actions
security:
- bearer_auth: []
description: Creates a Promotion Action
operationId: create-promotion-action
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: calculator
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '9'
type: promotion_action
attributes:
position:
type:
deleted_at:
created_at: '2022-11-08T19:34:56.379Z'
updated_at: '2022-11-08T19:34:56.379Z'
relationships:
promotion:
data:
id: '7'
type: promotion
schema:
"$ref": "#/components/schemas/resource"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_promotion_action_params"
"/api/v2/platform/promotion_actions/{id}":
get:
summary: Return a Promotion Action
tags:
- Promotion Actions
security:
- bearer_auth: []
description: Returns a Promotion Action
operationId: show-promotion-action
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:
https://jsonapi.org/format/#fetching-includes'
example: calculator
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '10'
type: promotion_action
attributes:
position:
type:
deleted_at:
created_at: '2022-11-08T19:34:56.411Z'
updated_at: '2022-11-08T19:34:56.411Z'
relationships:
promotion:
data:
id: '8'
type: promotion
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 Action
tags:
- Promotion Actions
security:
- bearer_auth: []
description: Updates a Promotion Action
operationId: update-promotion-action
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:
https://jsonapi.org/format/#fetching-includes'
example: calculator
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '12'
type: promotion_action
attributes:
position:
type: Spree::Promotion::Actions::CreateAdjustment
deleted_at:
created_at: '2022-11-08T19:34:56.948Z'
updated_at: '2022-11-08T19:34:57.178Z'
relationships:
promotion:
data:
id: '10'
type: promotion
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/update_promotion_action_params"
delete:
summary: Delete a Promotion Action
tags:
- Promotion Actions
security:
- bearer_auth: []
description: Deletes a Promotion Action
operationId: delete-promotion-action
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/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:
https://jsonapi.org/format/#fetching-includes'
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:
https://jsonapi.org/format/#fetching-includes'
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:
https://jsonapi.org/format/#fetching-includes'
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:
https://jsonapi.org/format/#fetching-includes'
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"
"/api/v2/platform/promotion_rules":
get:
summary: Return a list of Promotion Rules
tags:
- Promotion Rules
security:
- bearer_auth: []
description: Returns a list of Promotion Rules
operationId: promotion-rules-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:
https://jsonapi.org/format/#fetching-includes'
example: user
schema:
type: string
- name: filter[type_eq]
in: query
description: ''
example: Spree::Promotion::Rules::Product
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: promotion_rule
attributes:
type:
created_at: '2022-11-08T19:35:00.589Z'
updated_at: '2022-11-08T19:35:00.589Z'
code:
preferences: {}
relationships:
promotion:
data:
id: '14'
type: promotion
- id: '2'
type: promotion_rule
attributes:
type:
created_at: '2022-11-08T19:35:00.591Z'
updated_at: '2022-11-08T19:35:00.591Z'
code:
preferences: {}
relationships:
promotion:
data:
id: '14'
type: promotion
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/promotion_rules?page=1&per_page=&include=&filter[type_eq]=
next: http://www.example.com/api/v2/platform/promotion_rules?filter%5Btype_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/promotion_rules?filter%5Btype_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/promotion_rules?filter%5Btype_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/promotion_rules?filter%5Btype_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 Rule
tags:
- Promotion Rules
security:
- bearer_auth: []
description: Creates a Promotion Rule
operationId: create-promotion-rule
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: user
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '5'
type: promotion_rule
attributes:
type:
created_at: '2022-11-08T19:35:01.131Z'
updated_at: '2022-11-08T19:35:01.131Z'
code:
preferences: {}
relationships:
promotion:
data:
id: '16'
type: promotion
schema:
"$ref": "#/components/schemas/resource"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_promotion_rule_params"
"/api/v2/platform/promotion_rules/{id}":
get:
summary: Return a Promotion Rule
tags:
- Promotion Rules
security:
- bearer_auth: []
description: Returns a Promotion Rule
operationId: show-promotion-rule
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:
https://jsonapi.org/format/#fetching-includes'
example: user
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: promotion_rule
attributes:
type:
created_at: '2022-11-08T19:35:01.163Z'
updated_at: '2022-11-08T19:35:01.163Z'
code:
preferences: {}
relationships:
promotion:
data:
id: '17'
type: promotion
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 Rule
tags:
- Promotion Rules
security:
- bearer_auth: []
description: Updates a Promotion Rule
operationId: update-promotion-rule
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:
https://jsonapi.org/format/#fetching-includes'
example: user
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '8'
type: promotion_rule
attributes:
type: Spree::Promotion::Rules::Country
created_at: '2022-11-08T19:35:01.723Z'
updated_at: '2022-11-08T19:35:01.953Z'
code:
preferences: {}
relationships:
promotion:
data:
id: '19'
type: promotion
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/update_promotion_rule_params"
delete:
summary: Delete a Promotion Rule
tags:
- Promotion Rules
security:
- bearer_auth: []
description: Deletes a Promotion Rule
operationId: delete-promotion-rule
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/promotions":
get:
summary: Return a list of Promotions
tags:
- Promotions
security:
- bearer_auth: []
description: Returns a list of Promotions
operationId: promotions-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:
https://jsonapi.org/format/#fetching-includes'
example: promotion_category,promotion_rules,promotion_actions,stores
schema:
type: string
- name: filter[code_eq]
in: query
description: ''
example: BLK-FRI
schema:
type: string
- name: filter[name_cont]
in: query
description: ''
example: New Customer
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '23'
type: promotion
attributes:
description:
expires_at:
starts_at:
name: Promo
type:
usage_limit:
match_policy: all
code:
advertise: false
path:
created_at: '2022-11-08T19:35:02.793Z'
updated_at: '2022-11-08T19:35:02.795Z'
public_metadata: {}
private_metadata: {}
relationships:
promotion_category:
data:
promotion_rules:
data: []
promotion_actions:
data: []
stores:
data:
- id: '375'
type: store
- id: '24'
type: promotion
attributes:
description:
expires_at:
starts_at:
name: Promo
type:
usage_limit:
match_policy: all
code:
advertise: false
path:
created_at: '2022-11-08T19:35:02.805Z'
updated_at: '2022-11-08T19:35:02.807Z'
public_metadata: {}
private_metadata: {}
relationships:
promotion_category:
data:
id: '13'
type: promotion_category
promotion_rules:
data: []
promotion_actions:
data:
- id: '16'
type: promotion_action
stores:
data:
- id: '375'
type: store
- id: '25'
type: promotion
attributes:
description:
expires_at:
starts_at:
name: Promo
type:
usage_limit:
match_policy: all
code:
advertise: false
path:
created_at: '2022-11-08T19:35:02.822Z'
updated_at: '2022-11-08T19:35:02.824Z'
public_metadata: {}
private_metadata: {}
relationships:
promotion_category:
data:
id: '13'
type: promotion_category
promotion_rules:
data: []
promotion_actions:
data:
- id: '17'
type: promotion_action
stores:
data:
- id: '375'
type: store
- id: '26'
type: promotion
attributes:
description:
expires_at:
starts_at:
name: Promo
type:
usage_limit:
match_policy: all
code:
advertise: false
path:
created_at: '2022-11-08T19:35:02.837Z'
updated_at: '2022-11-08T19:35:02.839Z'
public_metadata: {}
private_metadata: {}
relationships:
promotion_category:
data:
id: '13'
type: promotion_category
promotion_rules:
data:
- id: '12'
type: promotion_rule
promotion_actions:
data:
- id: '18'
type: promotion_action
stores:
data:
- id: '375'
type: store
meta:
count: 4
total_count: 4
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/promotions?page=1&per_page=&include=&filter[code_eq]=&filter[name_cont]=
next: http://www.example.com/api/v2/platform/promotions?filter%5Bcode_eq%5D=&filter%5Bname_cont%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/promotions?filter%5Bcode_eq%5D=&filter%5Bname_cont%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/promotions?filter%5Bcode_eq%5D=&filter%5Bname_cont%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/promotions?filter%5Bcode_eq%5D=&filter%5Bname_cont%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
tags:
- Promotions
security:
- bearer_auth: []
description: Creates a Promotion
operationId: create-promotion
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: promotion_category,promotion_rules,promotion_actions,stores
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '35'
type: promotion
attributes:
description: First 1000 Customers Save 20%
expires_at: '2022-11-12T19:35:03.283Z'
starts_at: '2022-11-08T19:35:03.283Z'
name: Black Friday 20% Off
type: Spree::Promotion
usage_limit: 1000
match_policy: any
code: BLK-20
advertise: true
path: "/black-fri/today"
created_at: '2022-11-08T19:35:03.521Z'
updated_at: '2022-11-08T19:35:03.533Z'
public_metadata: {}
private_metadata: {}
relationships:
promotion_category:
data:
id: '15'
type: promotion_category
promotion_rules:
data: []
promotion_actions:
data: []
stores:
data:
- id: '382'
type: store
- id: '383'
type: store
- id: '381'
type: store
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_params"
"/api/v2/platform/promotions/{id}":
get:
summary: Return a Promotion
tags:
- Promotions
security:
- bearer_auth: []
description: Returns a Promotion
operationId: show-promotion
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:
https://jsonapi.org/format/#fetching-includes'
example: promotion_category,promotion_rules,promotion_actions,stores
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '44'
type: promotion
attributes:
description:
expires_at:
starts_at:
name: Promo
type:
usage_limit:
match_policy: all
code:
advertise: false
path:
created_at: '2022-11-08T19:35:03.971Z'
updated_at: '2022-11-08T19:35:03.973Z'
public_metadata: {}
private_metadata: {}
relationships:
promotion_category:
data:
id: '17'
type: promotion_category
promotion_rules:
data:
- id: '16'
type: promotion_rule
promotion_actions:
data:
- id: '31'
type: promotion_action
stores:
data:
- id: '387'
type: store
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
tags:
- Promotions
security:
- bearer_auth: []
description: Updates a Promotion
operationId: update-promotion
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:
https://jsonapi.org/format/#fetching-includes'
example: promotion_category,promotion_rules,promotion_actions,stores
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '58'
type: promotion
attributes:
description: This is the new updated promo
expires_at:
starts_at:
name: 10% OFF
type:
usage_limit:
match_policy: all
code: RAND-10
advertise: false
path:
created_at: '2022-11-08T19:35:04.723Z'
updated_at: '2022-11-08T19:35:04.970Z'
public_metadata: {}
private_metadata: {}
relationships:
promotion_category:
data:
id: '20'
type: promotion_category
promotion_rules:
data:
- id: '19'
type: promotion_rule
promotion_actions:
data:
- id: '42'
type: promotion_action
stores:
data:
- id: '396'
type: store
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:
oneOf:
- "$ref": "#/components/schemas/update_promotion_params"
- "$ref": "#/components/schemas/update_promotion_add_rule_params"
- "$ref": "#/components/schemas/update_promotion_update_rule_params"
- "$ref": "#/components/schemas/update_promotion_add_action_params"
- "$ref": "#/components/schemas/update_promotion_change_action_params"
- "$ref": "#/components/schemas/update_promotion_action_calculator_params"
- "$ref": "#/components/schemas/update_promotion_change_calculator_params"
delete:
summary: Delete a Promotion
tags:
- Promotions
security:
- bearer_auth: []
description: Deletes a Promotion
operationId: delete-promotion
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/roles":
get:
summary: Return a list of Roles
tags:
- Roles
security:
- bearer_auth: []
description: Returns a list of Roles
operationId: roles-list
parameters:
- name: page
in: query
example: 1
schema:
type: integer
- name: per_page
in: query
example: 50
schema:
type: integer
- name: filter[name_eq]
in: query
description: ''
example: admin
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: role
attributes:
name: Role 1
created_at: '2022-11-08T19:35:06.596Z'
updated_at: '2022-11-08T19:35:06.596Z'
- id: '2'
type: role
attributes:
name: Role 2
created_at: '2022-11-08T19:35:06.597Z'
updated_at: '2022-11-08T19:35:06.597Z'
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/roles?page=1&per_page=&filter[name_eq]=
next: http://www.example.com/api/v2/platform/roles?filter%5Bname_eq%5D=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/roles?filter%5Bname_eq%5D=&page=1&per_page=
last: http://www.example.com/api/v2/platform/roles?filter%5Bname_eq%5D=&page=1&per_page=
first: http://www.example.com/api/v2/platform/roles?filter%5Bname_eq%5D=&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 Role
tags:
- Roles
security:
- bearer_auth: []
description: Creates a Role
operationId: create-role
parameters: []
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '5'
type: role
attributes:
name: Role 5
created_at: '2022-11-08T19:35:07.110Z'
updated_at: '2022-11-08T19:35:07.110Z'
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_role_params"
"/api/v2/platform/roles/{id}":
get:
summary: Return a Role
tags:
- Roles
security:
- bearer_auth: []
description: Returns a Role
operationId: show-role
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: role
attributes:
name: Role 6
created_at: '2022-11-08T19:35:07.384Z'
updated_at: '2022-11-08T19:35:07.384Z'
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 Role
tags:
- Roles
security:
- bearer_auth: []
description: Updates a Role
operationId: update-role
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '8'
type: role
attributes:
name: administrator
created_at: '2022-11-08T19:35:07.901Z'
updated_at: '2022-11-08T19:35:08.133Z'
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_role_params"
delete:
summary: Delete a Role
tags:
- Roles
security:
- bearer_auth: []
description: Deletes a Role
operationId: delete-role
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":
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:
https://jsonapi.org/format/#fetching-includes'
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:
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:
relationships:
order:
data:
id: '78'
type: order
address:
data:
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:
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:
relationships:
order:
data:
id: '79'
type: order
address:
data:
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:
https://jsonapi.org/format/#fetching-includes'
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:
number: H86798855348
cost: '0.0'
shipped_at:
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:
relationships:
order:
data:
id: '82'
type: order
address:
data:
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:
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:
https://jsonapi.org/format/#fetching-includes'
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:
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:
relationships:
order:
data:
id: '83'
type: order
address:
data:
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:
https://jsonapi.org/format/#fetching-includes'
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:
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:
relationships:
order:
data:
id: '85'
type: order
address:
data:
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:
https://jsonapi.org/format/#fetching-includes'
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:
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:
relationships:
order:
data:
id: '90'
type: order
address:
data:
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:
https://jsonapi.org/format/#fetching-includes'
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:
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:
relationships:
order:
data:
id: '93'
type: order
address:
data:
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:
https://jsonapi.org/format/#fetching-includes'
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:
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:
relationships:
order:
data:
id: '95'
type: order
address:
data:
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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '62'
type: shipment
attributes:
tracking: U10000
number: H98524317894
cost: '100.0'
shipped_at: '2022-11-08T19:35:17.839Z'
state: shipped
created_at: '2022-11-08T19:35:17.583Z'
updated_at: '2022-11-08T19:35:17.839Z'
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:
relationships:
order:
data:
id: '97'
type: order
address:
data:
stock_location:
data:
id: '141'
type: stock_location
adjustments:
data: []
inventory_units:
data:
- id: '59'
type: inventory_unit
shipping_rates:
data:
- id: '117'
type: shipping_rate
state_changes:
data:
- id: '27'
type: state_change
selected_shipping_rate:
data:
id: '117'
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}/cancel":
patch:
summary: Cancels the Shipment
tags:
- Shipments
security:
- bearer_auth: []
description: Cancels the Shipment
operationId: cancel-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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '66'
type: shipment
attributes:
tracking: U10000
number: H87762281833
cost: '100.0'
shipped_at:
state: canceled
created_at: '2022-11-08T19:35:18.498Z'
updated_at: '2022-11-08T19:35:18.748Z'
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:
relationships:
order:
data:
id: '99'
type: order
address:
data:
stock_location:
data:
id: '145'
type: stock_location
adjustments:
data: []
inventory_units:
data:
- id: '63'
type: inventory_unit
shipping_rates:
data:
- id: '125'
type: shipping_rate
state_changes:
data:
- id: '28'
type: state_change
selected_shipping_rate:
data:
id: '125'
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}/resume":
patch:
summary: Resumes the Shipment
tags:
- Shipments
security:
- bearer_auth: []
description: Resumes previously canceled Shipment
operationId: resume-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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '70'
type: shipment
attributes:
tracking: U10000
number: H65608010898
cost: '100.0'
shipped_at:
state: ready
created_at: '2022-11-08T19:35:19.500Z'
updated_at: '2022-11-08T19:35:19.754Z'
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:
relationships:
order:
data:
id: '101'
type: order
address:
data:
stock_location:
data:
id: '149'
type: stock_location
adjustments:
data: []
inventory_units:
data:
- id: '67'
type: inventory_unit
shipping_rates:
data:
- id: '133'
type: shipping_rate
state_changes:
data:
- id: '29'
type: state_change
selected_shipping_rate:
data:
id: '133'
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}/pend":
patch:
summary: Moves Shipment back to pending state
tags:
- Shipments
security:
- bearer_auth: []
description: Moves Shipment back to pending state
operationId: pend-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:
https://jsonapi.org/format/#fetching-includes'
example: line_items,variants,product
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '75'
type: shipment
attributes:
tracking: U10000
number: H29346097126
cost: '100.0'
shipped_at:
state: pending
created_at: '2022-11-08T19:35:20.604Z'
updated_at: '2022-11-08T19:35:20.853Z'
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:
relationships:
order:
data:
id: '104'
type: order
address:
data:
stock_location:
data:
id: '154'
type: stock_location
adjustments:
data: []
inventory_units:
data:
- id: '72'
type: inventory_unit
shipping_rates:
data:
- id: '144'
type: shipping_rate
state_changes:
data:
- id: '30'
type: state_change
selected_shipping_rate:
data:
id: '144'
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/shipping_categories":
get:
summary: Return a list of Shipping Categories
tags:
- Shipping Categories
security:
- bearer_auth: []
description: Returns a list of Shipping Categories
operationId: shipping-categories-list
parameters:
- name: page
in: query
example: 1
schema:
type: integer
- name: per_page
in: query
example: 50
schema:
type: integer
- name: filter[name_i_cont]
in: query
description: ''
example: default
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '134'
type: shipping_category
attributes:
name: ShippingCategory 134
created_at: '2022-11-08T19:35:21.335Z'
updated_at: '2022-11-08T19:35:21.335Z'
- id: '135'
type: shipping_category
attributes:
name: ShippingCategory 135
created_at: '2022-11-08T19:35:21.336Z'
updated_at: '2022-11-08T19:35:21.336Z'
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/shipping_categories?page=1&per_page=&filter[name_i_cont]=
next: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&page=1&per_page=
last: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&page=1&per_page=
first: http://www.example.com/api/v2/platform/shipping_categories?filter%5Bname_i_cont%5D=&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 Shipping Category
tags:
- Shipping Categories
security:
- bearer_auth: []
description: Creates a Shipping Category
operationId: create-shipping-category
parameters: []
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '138'
type: shipping_category
attributes:
name: ShippingCategory 138
created_at: '2022-11-08T19:35:21.863Z'
updated_at: '2022-11-08T19:35:21.863Z'
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_shipping_category_params"
"/api/v2/platform/shipping_categories/{id}":
get:
summary: Return a Shipping Category
tags:
- Shipping Categories
security:
- bearer_auth: []
description: Returns a Shipping Category
operationId: show-shipping-category
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '139'
type: shipping_category
attributes:
name: ShippingCategory 139
created_at: '2022-11-08T19:35:22.131Z'
updated_at: '2022-11-08T19:35:22.131Z'
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 Shipping Category
tags:
- Shipping Categories
security:
- bearer_auth: []
description: Updates a Shipping Category
operationId: update-shipping-category
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '141'
type: shipping_category
attributes:
name: Default
created_at: '2022-11-08T19:35:22.647Z'
updated_at: '2022-11-08T19:35:22.876Z'
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_shipping_category_params"
delete:
summary: Delete a Shipping Category
tags:
- Shipping Categories
security:
- bearer_auth: []
description: Deletes a Shipping Category
operationId: delete-shipping-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"
"/api/v2/platform/shipping_methods":
get:
summary: Return a list of Shipping Methods
tags:
- Shipping Methods
security:
- bearer_auth: []
description: Returns a list of Shipping Methods
operationId: shipping-methods-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:
https://jsonapi.org/format/#fetching-includes'
example: calculator,shipping_categories,shipping_rates,tax_category
schema:
type: string
- name: filter[name]
in: query
description: ''
example: DHL Express
schema:
type: string
- name: filter[title_cont]
in: query
description: ''
example: About Us
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '77'
type: shipping_method
attributes:
name: UPS Ground
code: UPS_GROUND
admin_name:
display_on: both
tracking_url:
created_at: '2022-11-08T19:35:23.928Z'
updated_at: '2022-11-08T19:35:23.928Z'
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
shipping_categories:
data:
- id: '146'
type: shipping_category
shipping_rates:
data: []
tax_category:
data:
calculator:
data:
id: '137'
type: calculator
- id: '78'
type: shipping_method
attributes:
name: UPS Ground
code: UPS_GROUND
admin_name:
display_on: both
tracking_url:
created_at: '2022-11-08T19:35:23.939Z'
updated_at: '2022-11-08T19:35:23.939Z'
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
shipping_categories:
data:
- id: '146'
type: shipping_category
shipping_rates:
data: []
tax_category:
data:
calculator:
data:
id: '138'
type: calculator
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/shipping_methods?page=1&per_page=&include=&filter[name]=&filter[title_cont]=
next: http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/shipping_methods?filter%5Bname%5D=&filter%5Btitle_cont%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 Shipping Method
tags:
- Shipping Methods
security:
- bearer_auth: []
description: Creates a Shipping Method
operationId: create-shipping-method
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: calculator,shipping_categories,shipping_rates,tax_category
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '81'
type: shipping_method
attributes:
name: DHL Express Domestic
code: DDD
admin_name: DHL Express- Zone A
display_on: both
tracking_url:
created_at: '2022-11-08T19:35:24.485Z'
updated_at: '2022-11-08T19:35:24.485Z'
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
shipping_categories:
data:
- id: '148'
type: shipping_category
shipping_rates:
data: []
tax_category:
data:
id: '142'
type: tax_category
calculator:
data:
id: '141'
type: calculator
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Calculator can't be blank, Name can't be blank, Display
on can't be blank, and You must select at least one shipping
category
errors:
calculator:
- can't be blank
name:
- can't be blank
display_on:
- can't be blank
base:
- You must select at least one shipping category
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_shipping_method_params"
"/api/v2/platform/shipping_methods/{id}":
get:
summary: Return a Shipping Method
tags:
- Shipping Methods
security:
- bearer_auth: []
description: Returns a Shipping Method
operationId: show-shipping-method
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:
https://jsonapi.org/format/#fetching-includes'
example: calculator,shipping_categories,shipping_rates,tax_category
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '82'
type: shipping_method
attributes:
name: UPS Ground
code: UPS_GROUND
admin_name:
display_on: both
tracking_url:
created_at: '2022-11-08T19:35:24.769Z'
updated_at: '2022-11-08T19:35:24.769Z'
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
shipping_categories:
data:
- id: '149'
type: shipping_category
shipping_rates:
data: []
tax_category:
data:
calculator:
data:
id: '142'
type: calculator
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 Shipping Method
tags:
- Shipping Methods
security:
- bearer_auth: []
description: Updates a Shipping Method
operationId: update-shipping-method
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:
https://jsonapi.org/format/#fetching-includes'
example: calculator,shipping_categories,shipping_rates,tax_category
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '84'
type: shipping_method
attributes:
name: FedEx Expedited
code: UPS_GROUND
admin_name:
display_on: both
tracking_url:
created_at: '2022-11-08T19:35:25.390Z'
updated_at: '2022-11-08T19:35:25.626Z'
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
shipping_categories:
data:
- id: '151'
type: shipping_category
shipping_rates:
data: []
tax_category:
data:
calculator:
data:
id: '145'
type: calculator
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_shipping_method_params"
delete:
summary: Delete a Shipping Method
tags:
- Shipping Methods
security:
- bearer_auth: []
description: Deletes a Shipping Method
operationId: delete-shipping-method
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/states":
get:
summary: Returns a list of States
tags:
- States
security:
- bearer_auth: []
operationId: states-list
description: Returns a list of States
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:
https://jsonapi.org/format/#fetching-includes'
example: country
schema:
type: string
- name: filter[country_id_eq]
in: query
description: ''
example: '4'
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '230'
type: state
attributes:
name: STATE_NAME_230
abbr: STATE_ABBR_230
updated_at: '2022-11-08T19:35:26.719Z'
created_at: '2022-11-08T19:35:26.719Z'
relationships:
country:
data:
id: '394'
type: country
- id: '231'
type: state
attributes:
name: STATE_NAME_231
abbr: STATE_ABBR_231
updated_at: '2022-11-08T19:35:26.721Z'
created_at: '2022-11-08T19:35:26.721Z'
relationships:
country:
data:
id: '394'
type: country
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/states?page=1&per_page=&include=&filter[country_id_eq]=
next: http://www.example.com/api/v2/platform/states?filter%5Bcountry_id_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/states?filter%5Bcountry_id_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/states?filter%5Bcountry_id_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/states?filter%5Bcountry_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"
"/api/v2/platform/states/{id}":
get:
summary: Returns a State
tags:
- States
security:
- bearer_auth: []
operationId: show-state
description: Returns a State
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '234'
type: state
attributes:
name: STATE_NAME_234
abbr: STATE_ABBR_234
updated_at: '2022-11-08T19:35:27.007Z'
created_at: '2022-11-08T19:35:27.007Z'
relationships:
country:
data:
id: '396'
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"
"/api/v2/platform/stock_items":
get:
summary: Return a list of Stock Items
tags:
- Stock Items
security:
- bearer_auth: []
description: Returns a list of Stock Items
operationId: stock-items-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:
https://jsonapi.org/format/#fetching-includes'
example: stock_location,variant
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '276'
type: stock_item
attributes:
count_on_hand: 0
created_at: '2022-11-08T19:35:27.570Z'
updated_at: '2022-11-08T19:35:27.614Z'
backorderable: false
deleted_at:
public_metadata: {}
private_metadata: {}
is_available: false
relationships:
stock_location:
data:
id: '157'
type: stock_location
variant:
data:
id: '271'
type: variant
- id: '278'
type: stock_item
attributes:
count_on_hand: 10
created_at: '2022-11-08T19:35:27.634Z'
updated_at: '2022-11-08T19:35:27.644Z'
backorderable: true
deleted_at:
public_metadata: {}
private_metadata: {}
is_available: true
relationships:
stock_location:
data:
id: '157'
type: stock_location
variant:
data:
id: '272'
type: variant
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/stock_items?page=1&per_page=&include=
next: http://www.example.com/api/v2/platform/stock_items?include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/stock_items?include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/stock_items?include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/stock_items?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 Item
tags:
- Stock Items
security:
- bearer_auth: []
description: Creates a Stock Item
operationId: create-stock-item
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: stock_location,variant
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '285'
type: stock_item
attributes:
count_on_hand: 0
created_at: '2022-11-08T19:35:28.366Z'
updated_at: '2022-11-08T19:35:28.366Z'
backorderable: false
deleted_at:
public_metadata: {}
private_metadata: {}
is_available: false
relationships:
stock_location:
data:
id: '160'
type: stock_location
variant:
data:
id: '276'
type: variant
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Stock location can't be blank and Variant can't be blank
errors:
stock_location:
- can't be blank
variant:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_stock_item_params"
"/api/v2/platform/stock_items/{id}":
get:
summary: Return a Stock Item
tags:
- Stock Items
security:
- bearer_auth: []
description: Returns a Stock Item
operationId: show-stock-item
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:
https://jsonapi.org/format/#fetching-includes'
example: stock_location,variant
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '287'
type: stock_item
attributes:
count_on_hand: 10
created_at: '2022-11-08T19:35:28.695Z'
updated_at: '2022-11-08T19:35:28.707Z'
backorderable: true
deleted_at:
public_metadata: {}
private_metadata: {}
is_available: true
relationships:
stock_location:
data:
id: '162'
type: stock_location
variant:
data:
id: '277'
type: variant
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 Item
tags:
- Stock Items
security:
- bearer_auth: []
description: Updates a Stock Item
operationId: update-stock-item
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:
https://jsonapi.org/format/#fetching-includes'
example: stock_location,variant
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '291'
type: stock_item
attributes:
count_on_hand: 200
created_at: '2022-11-08T19:35:29.347Z'
updated_at: '2022-11-08T19:35:29.598Z'
backorderable: true
deleted_at:
public_metadata: {}
private_metadata: {}
is_available: true
relationships:
stock_location:
data:
id: '166'
type: stock_location
variant:
data:
id: '279'
type: variant
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Variant can't be blank
errors:
variant:
- 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_item_params"
delete:
summary: Delete a Stock Item
tags:
- Stock Items
security:
- bearer_auth: []
description: Deletes a Stock Item
operationId: delete-stock-item
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/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:
https://jsonapi.org/format/#fetching-includes'
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:
city: Washington
state_name:
zipcode: '20500'
phone: "(202) 456-1111"
active: true
backorderable_default: true
propagate_all_variants: false
admin_name:
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:
city: Washington
state_name:
zipcode: '20500'
phone: "(202) 456-1111"
active: true
backorderable_default: true
propagate_all_variants: false
admin_name:
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:
https://jsonapi.org/format/#fetching-includes'
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:
city: Washington
state_name:
zipcode: '20500'
phone: "(202) 456-1111"
active: true
backorderable_default: true
propagate_all_variants: false
admin_name:
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:
https://jsonapi.org/format/#fetching-includes'
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:
city: Washington
state_name:
zipcode: '20500'
phone: "(202) 456-1111"
active: true
backorderable_default: true
propagate_all_variants: false
admin_name:
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:
https://jsonapi.org/format/#fetching-includes'
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:
city: Los Angeles
state_name:
zipcode: '11223'
phone: "(202) 456-1111"
active: true
backorderable_default: true
propagate_all_variants: false
admin_name:
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"
"/api/v2/platform/store_credit_categories":
get:
summary: Return a list of Store Credit Categories
tags:
- Store Credit Categories
security:
- bearer_auth: []
description: Returns a list of Store Credit Categories
operationId: store-credit-categories-list
parameters:
- name: page
in: query
example: 1
schema:
type: integer
- name: per_page
in: query
example: 50
schema:
type: integer
- name: filter[name_eq]
in: query
description: ''
example: refunded
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '2'
type: store_credit_category
attributes:
name: Exchange
created_at: '2022-11-08T19:35:33.588Z'
updated_at: '2022-11-08T19:35:33.588Z'
- id: '3'
type: store_credit_category
attributes:
name: Exchange
created_at: '2022-11-08T19:35:33.589Z'
updated_at: '2022-11-08T19:35:33.589Z'
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/store_credit_categories?page=1&per_page=&filter[name_eq]=
next: http://www.example.com/api/v2/platform/store_credit_categories?filter%5Bname_eq%5D=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/store_credit_categories?filter%5Bname_eq%5D=&page=1&per_page=
last: http://www.example.com/api/v2/platform/store_credit_categories?filter%5Bname_eq%5D=&page=1&per_page=
first: http://www.example.com/api/v2/platform/store_credit_categories?filter%5Bname_eq%5D=&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 Store Credit Category
tags:
- Store Credit Categories
security:
- bearer_auth: []
description: Creates a Store Credit Category
operationId: create-store-credit-category
parameters: []
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: store_credit_category
attributes:
name: Exchange
created_at: '2022-11-08T19:35:34.099Z'
updated_at: '2022-11-08T19:35:34.099Z'
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_store_credit_category_params"
"/api/v2/platform/store_credit_categories/{id}":
get:
summary: Return a Store Credit Category
tags:
- Store Credit Categories
security:
- bearer_auth: []
description: Returns a Store Credit Category
operationId: show-store-credit-category
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '7'
type: store_credit_category
attributes:
name: Exchange
created_at: '2022-11-08T19:35:34.365Z'
updated_at: '2022-11-08T19:35:34.365Z'
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 Store Credit Category
tags:
- Store Credit Categories
security:
- bearer_auth: []
description: Updates a Store Credit Category
operationId: update-store-credit-category
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '9'
type: store_credit_category
attributes:
name: refunded
created_at: '2022-11-08T19:35:34.884Z'
updated_at: '2022-11-08T19:35:35.112Z'
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_store_credit_category_params"
delete:
summary: Delete a Store Credit Category
tags:
- Store Credit Categories
security:
- bearer_auth: []
description: Deletes a Store Credit Category
operationId: delete-store-credit-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"
"/api/v2/platform/store_credit_types":
get:
summary: Return a list of Store Credit Types
tags:
- Store Credit Types
security:
- bearer_auth: []
description: Returns a list of Store Credit Types
operationId: store-credit-types-list
parameters:
- name: page
in: query
example: 1
schema:
type: integer
- name: per_page
in: query
example: 50
schema:
type: integer
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '2'
type: store_credit_type
attributes:
name: Expiring
priority: 1
created_at: '2022-11-08T19:35:36.152Z'
updated_at: '2022-11-08T19:35:36.152Z'
- id: '3'
type: store_credit_type
attributes:
name: Expiring
priority: 1
created_at: '2022-11-08T19:35:36.153Z'
updated_at: '2022-11-08T19:35:36.153Z'
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/store_credit_types?page=1&per_page=
next: http://www.example.com/api/v2/platform/store_credit_types?page=1&per_page=
prev: http://www.example.com/api/v2/platform/store_credit_types?page=1&per_page=
last: http://www.example.com/api/v2/platform/store_credit_types?page=1&per_page=
first: http://www.example.com/api/v2/platform/store_credit_types?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 Store Credit Type
tags:
- Store Credit Types
security:
- bearer_auth: []
description: Creates a Store Credit Type
operationId: create-store-credit-type
parameters: []
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: store_credit_type
attributes:
name: Expiring
priority: 1
created_at: '2022-11-08T19:35:36.660Z'
updated_at: '2022-11-08T19:35:36.660Z'
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_store_credit_type_params"
"/api/v2/platform/store_credit_types/{id}":
get:
summary: Return a Store Credit Type
tags:
- Store Credit Types
security:
- bearer_auth: []
description: Returns a Store Credit Type
operationId: show-store-credit-type
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '7'
type: store_credit_type
attributes:
name: Expiring
priority: 1
created_at: '2022-11-08T19:35:36.930Z'
updated_at: '2022-11-08T19:35:36.930Z'
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 Store Credit Type
tags:
- Store Credit Types
security:
- bearer_auth: []
description: Updates a Store Credit Type
operationId: update-store-credit-type
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '9'
type: store_credit_type
attributes:
name: default
priority: 1
created_at: '2022-11-08T19:35:37.442Z'
updated_at: '2022-11-08T19:35:37.670Z'
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_store_credit_type_params"
delete:
summary: Delete a Store Credit Type
tags:
- Store Credit Types
security:
- bearer_auth: []
description: Deletes a Store Credit Type
operationId: delete-store-credit-type
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/store_credits":
get:
summary: Return a list of Store Credits
tags:
- Store Credits
security:
- bearer_auth: []
description: Returns a list of Store Credits
operationId: store-credits-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:
https://jsonapi.org/format/#fetching-includes'
example: user,created_by,category,credit_type
schema:
type: string
- name: filter[user_id_eq]
in: query
description: ''
example: '5'
schema:
type: string
- name: filter[created_by_id_eq]
in: query
description: ''
example: '2'
schema:
type: string
- name: filter[amount_gteq]
in: query
description: ''
example: '50.0'
schema:
type: string
- name: filter[currency_eq]
in: query
description: ''
example: USD
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '2'
type: store_credit
attributes:
amount: '150.0'
amount_used: '0.0'
memo:
deleted_at:
currency: USD
amount_authorized: '0.0'
originator_type:
created_at: '2022-11-08T19:35:38.714Z'
updated_at: '2022-11-08T19:35:38.714Z'
public_metadata: {}
private_metadata: {}
display_amount: "$150.00"
display_amount_used: "$0.00"
relationships:
user:
data:
id: '107'
type: user
created_by:
data:
id: '108'
type: user
store_credit_category:
data:
id: '14'
type: store_credit_category
store_credit_type:
data:
id: '14'
type: store_credit_type
store_credit_events:
data:
- id: '3'
type: store_credit_event
- id: '3'
type: store_credit
attributes:
amount: '150.0'
amount_used: '0.0'
memo:
deleted_at:
currency: USD
amount_authorized: '0.0'
originator_type:
created_at: '2022-11-08T19:35:38.722Z'
updated_at: '2022-11-08T19:35:38.722Z'
public_metadata: {}
private_metadata: {}
display_amount: "$150.00"
display_amount_used: "$0.00"
relationships:
user:
data:
id: '107'
type: user
created_by:
data:
id: '109'
type: user
store_credit_category:
data:
id: '15'
type: store_credit_category
store_credit_type:
data:
id: '15'
type: store_credit_type
store_credit_events:
data:
- id: '4'
type: store_credit_event
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/store_credits?page=1&per_page=&include=&filter[user_id_eq]=&filter[created_by_id_eq]=&filter[amount_gteq]=&filter[currency_eq]=
next: http://www.example.com/api/v2/platform/store_credits?filter%5Bamount_gteq%5D=&filter%5Bcreated_by_id_eq%5D=&filter%5Bcurrency_eq%5D=&filter%5Buser_id_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/store_credits?filter%5Bamount_gteq%5D=&filter%5Bcreated_by_id_eq%5D=&filter%5Bcurrency_eq%5D=&filter%5Buser_id_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/store_credits?filter%5Bamount_gteq%5D=&filter%5Bcreated_by_id_eq%5D=&filter%5Bcurrency_eq%5D=&filter%5Buser_id_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/store_credits?filter%5Bamount_gteq%5D=&filter%5Bcreated_by_id_eq%5D=&filter%5Bcurrency_eq%5D=&filter%5Buser_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 a Store Credit
tags:
- Store Credits
security:
- bearer_auth: []
description: Creates a Store Credit
operationId: create-store-credit
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: user,created_by,category,credit_type
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '6'
type: store_credit
attributes:
amount: '150.0'
amount_used: '0.0'
memo:
deleted_at:
currency: USD
amount_authorized: '0.0'
originator_type:
created_at: '2022-11-08T19:35:39.272Z'
updated_at: '2022-11-08T19:35:39.272Z'
public_metadata: {}
private_metadata: {}
display_amount: "$150.00"
display_amount_used: "$0.00"
relationships:
user:
data:
id: '113'
type: user
created_by:
data:
id: '114'
type: user
store_credit_category:
data:
id: '18'
type: store_credit_category
store_credit_type:
data:
id: '18'
type: store_credit_type
store_credit_events:
data:
- id: '7'
type: store_credit_event
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: User can't be blank, Category can't be blank, Created by
can't be blank, Currency can't be blank, Amount must be greater
than 0, Amount used Cannot be greater than amount., and Amount
authorized Exceeds total credits.
errors:
user:
- can't be blank
category:
- can't be blank
created_by:
- can't be blank
currency:
- can't be blank
amount:
- must be greater than 0
amount_used:
- Cannot be greater than amount.
amount_authorized:
- Exceeds total credits.
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_store_credit_params"
"/api/v2/platform/store_credits/{id}":
get:
summary: Return a Store Credit
tags:
- Store Credits
security:
- bearer_auth: []
description: Returns a Store Credit
operationId: show-store-credit
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:
https://jsonapi.org/format/#fetching-includes'
example: user,created_by,category,credit_type
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '7'
type: store_credit
attributes:
amount: '150.0'
amount_used: '0.0'
memo:
deleted_at:
currency: USD
amount_authorized: '0.0'
originator_type:
created_at: '2022-11-08T19:35:39.554Z'
updated_at: '2022-11-08T19:35:39.554Z'
public_metadata: {}
private_metadata: {}
display_amount: "$150.00"
display_amount_used: "$0.00"
relationships:
user:
data:
id: '115'
type: user
created_by:
data:
id: '116'
type: user
store_credit_category:
data:
id: '19'
type: store_credit_category
store_credit_type:
data:
id: '20'
type: store_credit_type
store_credit_events:
data:
- id: '8'
type: store_credit_event
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 Store Credit
tags:
- Store Credits
security:
- bearer_auth: []
description: Updates a Store Credit
operationId: update-store-credit
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:
https://jsonapi.org/format/#fetching-includes'
example: user,created_by,category,credit_type
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '9'
type: store_credit
attributes:
amount: '500.0'
amount_used: '0.0'
memo: The user is awarded
deleted_at:
currency: CAD
amount_authorized: '0.0'
originator_type:
created_at: '2022-11-08T19:35:40.170Z'
updated_at: '2022-11-08T19:35:40.405Z'
public_metadata:
loyalty_reward: true
private_metadata: {}
display_amount: "$500.00"
display_amount_used: "$0.00"
relationships:
user:
data:
id: '119'
type: user
created_by:
data:
id: '120'
type: user
store_credit_category:
data:
id: '21'
type: store_credit_category
store_credit_type:
data:
id: '22'
type: store_credit_type
store_credit_events:
data:
- id: '10'
type: store_credit_event
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Amount must be greater than 0, Amount used Cannot be greater
than amount., and Amount authorized Exceeds total credits.
errors:
amount:
- must be greater than 0
amount_used:
- Cannot be greater than amount.
amount_authorized:
- Exceeds total credits.
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_store_credit_params"
delete:
summary: Delete a Store Credit
tags:
- Store Credits
security:
- bearer_auth: []
description: Deletes a Store Credit
operationId: delete-store-credit
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/tax_categories":
get:
summary: Return a list of Tax Categories
tags:
- Tax Categories
security:
- bearer_auth: []
description: Returns a list of Tax Categories
operationId: tax-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:
https://jsonapi.org/format/#fetching-includes'
example: tax_rates
schema:
type: string
- name: filter[name_eq]
in: query
description: ''
example: Clothing
schema:
type: string
- name: filter[is_default_true]
in: query
description: ''
example: '1'
schema:
type: string
- name: filter[tax_code_eq]
in: query
description: ''
example: 1257L
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '153'
type: tax_category
attributes:
name: TaxCategory - 54232
description: Velit qui dignissimos excepturi eum corrupti.
is_default: false
deleted_at:
created_at: '2022-11-08T19:35:41.496Z'
updated_at: '2022-11-08T19:35:41.496Z'
tax_code:
relationships:
tax_rates:
data: []
- id: '154'
type: tax_category
attributes:
name: TaxCategory - 100586
description: Placeat nihil quaerat nostrum cumque ipsa eius
perferendis.
is_default: false
deleted_at:
created_at: '2022-11-08T19:35:41.497Z'
updated_at: '2022-11-08T19:35:41.497Z'
tax_code:
relationships:
tax_rates:
data: []
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/tax_categories?page=1&per_page=&include=&filter[name_eq]=&filter[is_default_true]=&filter[tax_code_eq]=
next: http://www.example.com/api/v2/platform/tax_categories?filter%5Bis_default_true%5D=&filter%5Bname_eq%5D=&filter%5Btax_code_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/tax_categories?filter%5Bis_default_true%5D=&filter%5Bname_eq%5D=&filter%5Btax_code_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/tax_categories?filter%5Bis_default_true%5D=&filter%5Bname_eq%5D=&filter%5Btax_code_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/tax_categories?filter%5Bis_default_true%5D=&filter%5Bname_eq%5D=&filter%5Btax_code_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 Tax Category
tags:
- Tax Categories
security:
- bearer_auth: []
description: Creates a Tax Category
operationId: create-tax-category
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: tax_rates
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '157'
type: tax_category
attributes:
name: TaxCategory - 646810
description: Facilis quis quos unde reiciendis.
is_default: false
deleted_at:
created_at: '2022-11-08T19:35:42.001Z'
updated_at: '2022-11-08T19:35:42.001Z'
tax_code:
relationships:
tax_rates:
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_tax_category_params"
"/api/v2/platform/tax_categories/{id}":
get:
summary: Return a Tax Category
tags:
- Tax Categories
security:
- bearer_auth: []
description: Returns a Tax Category
operationId: show-tax-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:
https://jsonapi.org/format/#fetching-includes'
example: tax_rates
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '158'
type: tax_category
attributes:
name: TaxCategory - 71294
description: Sunt ut autem corrupti explicabo quibusdam nam
voluptas.
is_default: false
deleted_at:
created_at: '2022-11-08T19:35:42.273Z'
updated_at: '2022-11-08T19:35:42.273Z'
tax_code:
relationships:
tax_rates:
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 Tax Category
tags:
- Tax Categories
security:
- bearer_auth: []
description: Updates a Tax Category
operationId: update-tax-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:
https://jsonapi.org/format/#fetching-includes'
example: tax_rates
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '160'
type: tax_category
attributes:
name: Clothing
description: Men's, women's and children's clothing
is_default: true
deleted_at:
created_at: '2022-11-08T19:35:42.789Z'
updated_at: '2022-11-08T19:35:43.019Z'
tax_code: 1233K
relationships:
tax_rates:
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_tax_category_params"
delete:
summary: Delete a Tax Category
tags:
- Tax Categories
security:
- bearer_auth: []
description: Deletes a Tax Category
operationId: delete-tax-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"
"/api/v2/platform/tax_rates":
get:
summary: Return a list of Tax Rates
tags:
- Tax Rates
security:
- bearer_auth: []
description: Returns a list of Tax Rates
operationId: tax-rates-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:
https://jsonapi.org/format/#fetching-includes'
example: zone,tax_category
schema:
type: string
- name: filter[zone_id_eq]
in: query
description: ''
example: '3'
schema:
type: string
- name: filter[amount_gt]
in: query
description: ''
example: '0.05'
schema:
type: string
- name: filter[tax_category_id_eq]
in: query
description: ''
example: '1'
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '12'
type: tax_rate
attributes:
amount: '0.1'
included_in_price: false
created_at: '2022-11-08T19:35:44.070Z'
updated_at: '2022-11-08T19:35:44.070Z'
name: TaxRate - 903896
show_rate_in_label: true
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
zone:
data:
id: '99'
type: zone
tax_category:
data:
id: '165'
type: tax_category
- id: '13'
type: tax_rate
attributes:
amount: '0.1'
included_in_price: false
created_at: '2022-11-08T19:35:44.073Z'
updated_at: '2022-11-08T19:35:44.073Z'
name: TaxRate - 477775
show_rate_in_label: true
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
zone:
data:
id: '100'
type: zone
tax_category:
data:
id: '165'
type: tax_category
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/tax_rates?page=1&per_page=&include=&filter[zone_id_eq]=&filter[amount_gt]=&filter[tax_category_id_eq]=
next: http://www.example.com/api/v2/platform/tax_rates?filter%5Bamount_gt%5D=&filter%5Btax_category_id_eq%5D=&filter%5Bzone_id_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/tax_rates?filter%5Bamount_gt%5D=&filter%5Btax_category_id_eq%5D=&filter%5Bzone_id_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/tax_rates?filter%5Bamount_gt%5D=&filter%5Btax_category_id_eq%5D=&filter%5Bzone_id_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/tax_rates?filter%5Bamount_gt%5D=&filter%5Btax_category_id_eq%5D=&filter%5Bzone_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 a Tax Rate
tags:
- Tax Rates
security:
- bearer_auth: []
description: Creates a Tax Rate
operationId: create-tax-rate
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: zone,tax_category
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '16'
type: tax_rate
attributes:
amount: '0.1'
included_in_price: false
created_at: '2022-11-08T19:35:44.601Z'
updated_at: '2022-11-08T19:35:44.601Z'
name: TaxRate - 772641
show_rate_in_label: true
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
zone:
data:
tax_category:
data:
id: '167'
type: tax_category
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Calculator can't be blank, Rate can't be blank, Tax category
can't be blank, and Name can't be blank
errors:
calculator:
- can't be blank
amount:
- can't be blank
tax_category:
- can't be blank
name:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_tax_rate_params"
"/api/v2/platform/tax_rates/{id}":
get:
summary: Return a Tax Rate
tags:
- Tax Rates
security:
- bearer_auth: []
description: Returns a Tax Rate
operationId: show-tax-rate
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:
https://jsonapi.org/format/#fetching-includes'
example: zone,tax_category
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '17'
type: tax_rate
attributes:
amount: '0.1'
included_in_price: false
created_at: '2022-11-08T19:35:44.874Z'
updated_at: '2022-11-08T19:35:44.874Z'
name: TaxRate - 83823
show_rate_in_label: true
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
zone:
data:
id: '103'
type: zone
tax_category:
data:
id: '168'
type: tax_category
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 Tax Rate
tags:
- Tax Rates
security:
- bearer_auth: []
description: Updates a Tax Rate
operationId: update-tax-rate
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:
https://jsonapi.org/format/#fetching-includes'
example: zone,tax_category
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '19'
type: tax_rate
attributes:
amount: '25.9'
included_in_price: true
created_at: '2022-11-08T19:35:45.406Z'
updated_at: '2022-11-08T19:35:45.637Z'
name: TaxRate - 33807
show_rate_in_label: true
deleted_at:
public_metadata: {}
private_metadata: {}
relationships:
zone:
data:
id: '106'
type: zone
tax_category:
data:
id: '170'
type: tax_category
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Rate can't be blank
errors:
amount:
- 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_tax_rate_params"
delete:
summary: Delete a Tax Rate
tags:
- Tax Rates
security:
- bearer_auth: []
description: Deletes a Tax Rate
operationId: delete-tax-rate
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/taxonomies":
get:
summary: Return a list of Taxonomies
tags:
- Taxonomies
security:
- bearer_auth: []
description: Returns a list of Taxonomies
operationId: taxonomies-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:
https://jsonapi.org/format/#fetching-includes'
example: taxons,root
schema:
type: string
- name: filter[name_eq]
in: query
description: ''
example: Categories
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '13'
type: taxonomy
attributes:
name: taxonomy_13
created_at: '2022-11-08T19:35:46.789Z'
updated_at: '2022-11-08T19:35:46.801Z'
position: 1
public_metadata: {}
private_metadata: {}
relationships:
taxons:
data:
- id: '25'
type: taxon
root:
data:
id: '25'
type: taxon
- id: '14'
type: taxonomy
attributes:
name: taxonomy_14
created_at: '2022-11-08T19:35:46.804Z'
updated_at: '2022-11-08T19:35:46.814Z'
position: 2
public_metadata: {}
private_metadata: {}
relationships:
taxons:
data:
- id: '26'
type: taxon
root:
data:
id: '26'
type: taxon
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/taxonomies?page=1&per_page=&include=&filter[name_eq]=
next: http://www.example.com/api/v2/platform/taxonomies?filter%5Bname_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/taxonomies?filter%5Bname_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/taxonomies?filter%5Bname_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/taxonomies?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 Taxonomy
tags:
- Taxonomies
security:
- bearer_auth: []
description: Creates a Taxonomy
operationId: create-taxonomy
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: taxons,root
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '17'
type: taxonomy
attributes:
name: taxonomy_17
created_at: '2022-11-08T19:35:47.351Z'
updated_at: '2022-11-08T19:35:47.361Z'
position: 1
public_metadata: {}
private_metadata: {}
relationships:
taxons:
data:
- id: '29'
type: taxon
root:
data:
id: '29'
type: taxon
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_taxonomy_params"
"/api/v2/platform/taxonomies/{id}":
get:
summary: Return a Taxonomy
tags:
- Taxonomies
security:
- bearer_auth: []
description: Returns a Taxonomy
operationId: show-taxonomy
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:
https://jsonapi.org/format/#fetching-includes'
example: taxons,root
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '18'
type: taxonomy
attributes:
name: taxonomy_18
created_at: '2022-11-08T19:35:47.637Z'
updated_at: '2022-11-08T19:35:47.648Z'
position: 1
public_metadata: {}
private_metadata: {}
relationships:
taxons:
data:
- id: '30'
type: taxon
root:
data:
id: '30'
type: taxon
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 Taxonomy
tags:
- Taxonomies
security:
- bearer_auth: []
description: Updates a Taxonomy
operationId: update-taxonomy
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:
https://jsonapi.org/format/#fetching-includes'
example: taxons,root
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '20'
type: taxonomy
attributes:
name: Categories
created_at: '2022-11-08T19:35:48.183Z'
updated_at: '2022-11-08T19:35:48.430Z'
position: 1
public_metadata:
balanced: true
private_metadata: {}
relationships:
taxons:
data:
- id: '32'
type: taxon
root:
data:
id: '32'
type: taxon
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_taxonomy_params"
delete:
summary: Delete a Taxonomy
tags:
- Taxonomies
security:
- bearer_auth: []
description: Deletes a Taxonomy
operationId: delete-taxonomy
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/taxons":
get:
summary: Return a list of Taxons
tags:
- Taxons
security:
- bearer_auth: []
description: Returns a list of Taxons
operationId: taxons-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:
https://jsonapi.org/format/#fetching-includes'
example: taxonomy,parent,children
schema:
type: string
- name: filter[taxonomy_id_eq]
in: query
description: ''
example: '1'
schema:
type: string
- name: filter[name_cont]
in: query
description: ''
example: Shirts
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '38'
type: taxon
attributes:
position: 0
name: Shorts
permalink: taxonomy-25/shorts
lft: 2
rgt: 3
description:
created_at: '2022-11-08T19:35:49.576Z'
updated_at: '2022-11-08T19:35:49.581Z'
meta_title:
meta_description:
meta_keywords:
depth: 1
public_metadata: {}
private_metadata: {}
pretty_name: taxonomy_25 -> Shorts
seo_title: Shorts
is_root: false
is_child: true
is_leaf: true
relationships:
parent:
data:
id: '37'
type: taxon
taxonomy:
data:
id: '25'
type: taxonomy
children:
data: []
image:
data:
id: '89'
type: taxon_image
- id: '39'
type: taxon
attributes:
position: 0
name: taxon_13
permalink: taxonomy-25/taxon-13
lft: 4
rgt: 5
description:
created_at: '2022-11-08T19:35:49.603Z'
updated_at: '2022-11-08T19:35:49.606Z'
meta_title:
meta_description:
meta_keywords:
depth: 1
public_metadata: {}
private_metadata: {}
pretty_name: taxonomy_25 -> taxon_13
seo_title: taxon_13
is_root: false
is_child: true
is_leaf: true
relationships:
parent:
data:
id: '37'
type: taxon
taxonomy:
data:
id: '25'
type: taxonomy
children:
data: []
image:
data:
id: '90'
type: taxon_image
- id: '40'
type: taxon
attributes:
position: 0
name: taxon_14
permalink: taxonomy-25/taxon-14
lft: 6
rgt: 7
description:
created_at: '2022-11-08T19:35:49.625Z'
updated_at: '2022-11-08T19:35:49.628Z'
meta_title:
meta_description:
meta_keywords:
depth: 1
public_metadata: {}
private_metadata: {}
pretty_name: taxonomy_25 -> taxon_14
seo_title: taxon_14
is_root: false
is_child: true
is_leaf: true
relationships:
parent:
data:
id: '37'
type: taxon
taxonomy:
data:
id: '25'
type: taxonomy
children:
data: []
image:
data:
id: '91'
type: taxon_image
- id: '37'
type: taxon
attributes:
position: 0
name: taxonomy_25
permalink: taxonomy-25
lft: 1
rgt: 8
description:
created_at: '2022-11-08T19:35:49.552Z'
updated_at: '2022-11-08T19:35:49.636Z'
meta_title:
meta_description:
meta_keywords:
depth: 0
public_metadata: {}
private_metadata: {}
pretty_name: taxonomy_25
seo_title: taxonomy_25
is_root: true
is_child: false
is_leaf: false
relationships:
parent:
data:
taxonomy:
data:
id: '25'
type: taxonomy
children:
data:
- id: '38'
type: taxon
- id: '39'
type: taxon
- id: '40'
type: taxon
image:
data:
meta:
count: 4
total_count: 4
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/taxons?page=1&per_page=&include=&filter[taxonomy_id_eq]=&filter[name_cont]=
next: http://www.example.com/api/v2/platform/taxons?filter%5Bname_cont%5D=&filter%5Btaxonomy_id_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/taxons?filter%5Bname_cont%5D=&filter%5Btaxonomy_id_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/taxons?filter%5Bname_cont%5D=&filter%5Btaxonomy_id_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/taxons?filter%5Bname_cont%5D=&filter%5Btaxonomy_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 a Taxon
tags:
- Taxons
security:
- bearer_auth: []
description: Creates a Taxon
operationId: create-taxon
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: taxonomy,parent,children
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '47'
type: taxon
attributes:
position: 0
name: taxon_17
permalink: taxonomy-27/taxon-17
lft: 4
rgt: 5
description:
created_at: '2022-11-08T19:35:50.279Z'
updated_at: '2022-11-08T19:35:50.283Z'
meta_title:
meta_description:
meta_keywords:
depth: 1
public_metadata: {}
private_metadata: {}
pretty_name: taxonomy_27 -> taxon_17
seo_title: taxon_17
is_root: false
is_child: true
is_leaf: true
relationships:
parent:
data:
id: '45'
type: taxon
taxonomy:
data:
id: '27'
type: taxonomy
children:
data: []
image:
data:
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Name can't be blank and Taxonomy can't be blank
errors:
name:
- can't be blank
taxonomy:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_taxon_params"
"/api/v2/platform/taxons/{id}":
get:
summary: Return a Taxon
tags:
- Taxons
security:
- bearer_auth: []
description: Returns a Taxon
operationId: show-taxon
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:
https://jsonapi.org/format/#fetching-includes'
example: taxonomy,parent,children
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '52'
type: taxon
attributes:
position: 0
name: taxon_18
permalink: taxonomy-29/taxon-18
lft: 4
rgt: 5
description:
created_at: '2022-11-08T19:35:50.654Z'
updated_at: '2022-11-08T19:35:50.657Z'
meta_title:
meta_description:
meta_keywords:
depth: 1
public_metadata: {}
private_metadata: {}
pretty_name: taxonomy_29 -> taxon_18
seo_title: taxon_18
is_root: false
is_child: true
is_leaf: true
relationships:
parent:
data:
id: '50'
type: taxon
taxonomy:
data:
id: '29'
type: taxonomy
children:
data: []
products:
data: []
image:
data:
id: '98'
type: taxon_image
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 Taxon
tags:
- Taxons
security:
- bearer_auth: []
description: Updates a Taxon
operationId: update-taxon
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:
https://jsonapi.org/format/#fetching-includes'
example: taxonomy,parent,children
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '60'
type: taxon
attributes:
position: 0
name: T-Shirts
permalink: taxonomy-32/taxon-20
lft: 4
rgt: 5
description:
created_at: '2022-11-08T19:35:51.420Z'
updated_at: '2022-11-08T19:35:51.665Z'
meta_title:
meta_description:
meta_keywords:
depth: 1
public_metadata:
profitability: 3
private_metadata: {}
pretty_name: taxonomy_32 -> T-Shirts
seo_title: T-Shirts
is_root: false
is_child: true
is_leaf: true
relationships:
parent:
data:
id: '58'
type: taxon
taxonomy:
data:
id: '32'
type: taxonomy
children:
data: []
image:
data:
id: '103'
type: taxon_image
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_taxon_params"
delete:
summary: Delete a Taxon
tags:
- Taxons
security:
- bearer_auth: []
description: Deletes a Taxon
operationId: delete-taxon
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/taxons/{id}/reposition":
patch:
summary: Reposition a Taxon
tags:
- Taxons
security:
- bearer_auth: []
operationId: reposition-taxon
description: Reposition a Taxon
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '79'
type: taxon
attributes:
position: 0
name: taxon_25
permalink: taxonomy-39/shorts/taxon-25
lft: 3
rgt: 4
description:
created_at: '2022-11-08T19:35:53.074Z'
updated_at: '2022-11-08T19:35:53.324Z'
meta_title:
meta_description:
meta_keywords:
depth: 2
public_metadata: {}
private_metadata: {}
pretty_name: taxonomy_39 -> Shorts -> taxon_25
seo_title: taxon_25
is_root: false
is_child: true
is_leaf: true
relationships:
parent:
data:
id: '78'
type: taxon
taxonomy:
data:
id: '39'
type: taxonomy
children:
data: []
image:
data:
id: '115'
type: taxon_image
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/taxon_reposition"
"/api/v2/platform/users":
get:
summary: Return a list of Users
tags:
- Users
security:
- bearer_auth: []
description: Returns a list of Users
operationId: users-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:
https://jsonapi.org/format/#fetching-includes'
example: ship_address,bill_address
schema:
type: string
- name: filter[user_id_eq]
in: query
description: ''
example: '1'
schema:
type: string
- name: filter[email_cont]
in: query
description: ''
example: spree@example.com
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '129'
type: user
attributes:
email: ivonne.braun@smith.biz
first_name: Liberty
last_name: Becker
created_at: '2022-11-08T19:35:53.726Z'
updated_at: '2022-11-08T19:35:53.726Z'
public_metadata: {}
private_metadata: {}
average_order_value: []
lifetime_value: []
store_credits: []
relationships:
bill_address:
data:
ship_address:
data:
- id: '130'
type: user
attributes:
email: lenita.mayer@kulas.us
first_name: Chasidy
last_name: Strosin
created_at: '2022-11-08T19:35:53.730Z'
updated_at: '2022-11-08T19:35:53.730Z'
public_metadata: {}
private_metadata: {}
average_order_value: []
lifetime_value: []
store_credits: []
relationships:
bill_address:
data:
ship_address:
data:
- id: '131'
type: user
attributes:
email: dewayne@terrybarton.info
first_name: Ruben
last_name: Schmidt
created_at: '2022-11-08T19:35:53.732Z'
updated_at: '2022-11-08T19:35:53.732Z'
public_metadata: {}
private_metadata: {}
average_order_value: []
lifetime_value: []
store_credits: []
relationships:
bill_address:
data:
ship_address:
data:
meta:
count: 3
total_count: 3
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/users?page=1&per_page=&include=&filter[user_id_eq]=&filter[email_cont]=
next: http://www.example.com/api/v2/platform/users?filter%5Bemail_cont%5D=&filter%5Buser_id_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/users?filter%5Bemail_cont%5D=&filter%5Buser_id_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/users?filter%5Bemail_cont%5D=&filter%5Buser_id_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/users?filter%5Bemail_cont%5D=&filter%5Buser_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 a User
tags:
- Users
security:
- bearer_auth: []
description: Creates a User
operationId: create-user
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: ship_address,bill_address
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '136'
type: user
attributes:
email: rex_champlin@breitenberg.com
first_name: Zenia
last_name: King
created_at: '2022-11-08T19:35:54.351Z'
updated_at: '2022-11-08T19:35:54.351Z'
public_metadata: {}
private_metadata: {}
average_order_value: []
lifetime_value: []
store_credits: []
relationships:
bill_address:
data:
ship_address:
data:
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Bill address belongs to other user
errors:
bill_address_id:
- belongs to other user
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_user_params"
"/api/v2/platform/users/{id}":
get:
summary: Return a User
tags:
- Users
security:
- bearer_auth: []
description: Returns a User
operationId: show-user
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:
https://jsonapi.org/format/#fetching-includes'
example: ship_address,bill_address
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '139'
type: user
attributes:
email: gaynell@parisian.biz
first_name: Irwin
last_name: DuBuque
created_at: '2022-11-08T19:35:54.635Z'
updated_at: '2022-11-08T19:35:54.635Z'
public_metadata: {}
private_metadata: {}
average_order_value: []
lifetime_value: []
store_credits: []
relationships:
bill_address:
data:
ship_address:
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 User
tags:
- Users
security:
- bearer_auth: []
description: Updates a User
operationId: update-user
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:
https://jsonapi.org/format/#fetching-includes'
example: ship_address,bill_address
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '144'
type: user
attributes:
email: john@example.com
first_name: Astrid
last_name: Kohler
created_at: '2022-11-08T19:35:55.180Z'
updated_at: '2022-11-08T19:35:55.414Z'
public_metadata: {}
private_metadata: {}
average_order_value: []
lifetime_value: []
store_credits: []
relationships:
bill_address:
data:
ship_address:
data:
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Bill address belongs to other user
errors:
bill_address_id:
- belongs to other user
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_user_params"
delete:
summary: Delete a User
tags:
- Users
security:
- bearer_auth: []
description: Deletes a User
operationId: delete-user
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/variants":
get:
summary: Return a list of Variants
tags:
- Variants
security:
- bearer_auth: []
description: Returns a list of Variants
operationId: variants-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:
https://jsonapi.org/format/#fetching-includes'
example: product,tax_category,images,digitals
schema:
type: string
- name: filter[product_id_eq]
in: query
description: ''
example: '1'
schema:
type: string
- name: filter[sku_i_cont]
in: query
description: ''
example: SKU123
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '284'
type: variant
attributes:
sku: SKU-283
weight: '0.0'
height:
depth:
deleted_at:
is_master: true
cost_price: '17.0'
position: 1
cost_currency: USD
track_inventory: true
updated_at: '2022-11-08T19:35:56.573Z'
discontinue_on:
created_at: '2022-11-08T19:35:56.573Z'
public_metadata: {}
private_metadata: {}
barcode:
display_price: "$19.99"
display_compare_at_price:
name: Product 213286
options_text: ''
total_on_hand: 0
purchasable: true
in_stock: false
backorderable: true
available: true
currency: USD
price: '19.99'
compare_at_price:
relationships:
product:
data:
id: '214'
type: product
tax_category:
data:
digitals:
data: []
images:
data: []
option_values:
data: []
stock_items:
data:
- id: '300'
type: stock_item
stock_locations:
data:
- id: '187'
type: stock_location
- id: '285'
type: variant
attributes:
sku: SKU-284
weight: '23.12'
height: '92.8'
depth: '47.37'
deleted_at:
is_master: false
cost_price: '17.0'
position: 2
cost_currency: USD
track_inventory: true
updated_at: '2022-11-08T19:35:56.608Z'
discontinue_on:
created_at: '2022-11-08T19:35:56.605Z'
public_metadata: {}
private_metadata: {}
barcode:
display_price: "$19.99"
display_compare_at_price:
name: Product 213286
options_text: 'Size: S'
total_on_hand: 0
purchasable: true
in_stock: false
backorderable: true
available: true
currency: USD
price: '19.99'
compare_at_price:
relationships:
product:
data:
id: '214'
type: product
tax_category:
data:
digitals:
data: []
images:
data: []
option_values:
data:
- id: '83'
type: option_value
stock_items:
data:
- id: '301'
type: stock_item
stock_locations:
data:
- id: '187'
type: stock_location
- id: '286'
type: variant
attributes:
sku: SKU-285
weight: '90.94'
height: '108.64'
depth: '191.7'
deleted_at:
is_master: false
cost_price: '17.0'
position: 3
cost_currency: USD
track_inventory: true
updated_at: '2022-11-08T19:35:56.633Z'
discontinue_on:
created_at: '2022-11-08T19:35:56.629Z'
public_metadata: {}
private_metadata: {}
barcode:
display_price: "$19.99"
display_compare_at_price:
name: Product 213286
options_text: 'Size: S'
total_on_hand: 0
purchasable: true
in_stock: false
backorderable: true
available: true
currency: USD
price: '19.99'
compare_at_price:
relationships:
product:
data:
id: '214'
type: product
tax_category:
data:
digitals:
data: []
images:
data: []
option_values:
data:
- id: '84'
type: option_value
stock_items:
data:
- id: '302'
type: stock_item
stock_locations:
data:
- id: '187'
type: stock_location
meta:
count: 3
total_count: 3
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/variants?page=1&per_page=&include=&filter[product_id_eq]=&filter[sku_i_cont]=
next: http://www.example.com/api/v2/platform/variants?filter%5Bproduct_id_eq%5D=&filter%5Bsku_i_cont%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/variants?filter%5Bproduct_id_eq%5D=&filter%5Bsku_i_cont%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/variants?filter%5Bproduct_id_eq%5D=&filter%5Bsku_i_cont%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/variants?filter%5Bproduct_id_eq%5D=&filter%5Bsku_i_cont%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"
"/api/v2/platform/variants/{id}":
get:
summary: Return a Variant
tags:
- Variants
security:
- bearer_auth: []
description: Returns a Variant
operationId: show-variant
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:
https://jsonapi.org/format/#fetching-includes'
example: product,tax_category,images,digitals
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '291'
type: variant
attributes:
sku: SKU-290
weight: '185.0'
height: '33.55'
depth: '3.78'
deleted_at:
is_master: false
cost_price: '17.0'
position: 2
cost_currency: USD
track_inventory: true
updated_at: '2022-11-08T19:35:57.221Z'
discontinue_on:
created_at: '2022-11-08T19:35:57.218Z'
public_metadata: {}
private_metadata: {}
barcode:
display_price: "$19.99"
display_compare_at_price:
name: Product 2153349
options_text: 'Size: S'
total_on_hand: 0
purchasable: true
in_stock: false
backorderable: true
available: true
currency: USD
price: '19.99'
compare_at_price:
relationships:
product:
data:
id: '216'
type: product
tax_category:
data:
digitals:
data: []
images:
data: []
option_values:
data:
- id: '87'
type: option_value
stock_items:
data:
- id: '307'
type: stock_item
stock_locations:
data:
- id: '189'
type: stock_location
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"
delete:
summary: Delete a Variant
tags:
- Variants
security:
- bearer_auth: []
description: Deletes a Variant
operationId: delete-variant
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/webhooks/events":
get:
summary: Return a list of Webhook Events
tags:
- Webhook Events
security:
- bearer_auth: []
description: Returns a list of Webhook Events
operationId: webhook-events-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:
https://jsonapi.org/format/#fetching-includes'
example: subscriber
schema:
type: string
- name: filter[name_eq]
in: query
description: ''
example: order.canceled
schema:
type: string
- name: filter[request_errors_cont]
in: query
description: ''
example: google
schema:
type: string
- name: filter[response_code_eq]
in: query
description: ''
example: '200'
schema:
type: string
- name: filter[success_eq]
in: query
description: ''
example: 'true'
schema:
type: string
- name: filter[url_cont]
in: query
description: ''
example: mysite
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: event
attributes:
execution_time: 14933
name: order.canceled
request_errors: ''
response_code: '200'
success: true
url: https://www.url1.com/
created_at: '2022-11-08T19:35:58.544Z'
updated_at: '2022-11-08T19:35:58.544Z'
relationships:
subscriber:
data:
id: '1'
type: subscriber
- id: '2'
type: event
attributes:
execution_time: 64917
name: order.canceled
request_errors: ''
response_code: '200'
success: true
url: https://www.url2.com/
created_at: '2022-11-08T19:35:58.547Z'
updated_at: '2022-11-08T19:35:58.547Z'
relationships:
subscriber:
data:
id: '2'
type: subscriber
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/webhooks/events?page=1&per_page=&include=&filter[name_eq]=&filter[request_errors_cont]=&filter[response_code_eq]=&filter[success_eq]=&filter[url_cont]=
next: http://www.example.com/api/v2/platform/webhooks/events?filter%5Bname_eq%5D=&filter%5Brequest_errors_cont%5D=&filter%5Bresponse_code_eq%5D=&filter%5Bsuccess_eq%5D=&filter%5Burl_cont%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/webhooks/events?filter%5Bname_eq%5D=&filter%5Brequest_errors_cont%5D=&filter%5Bresponse_code_eq%5D=&filter%5Bsuccess_eq%5D=&filter%5Burl_cont%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/webhooks/events?filter%5Bname_eq%5D=&filter%5Brequest_errors_cont%5D=&filter%5Bresponse_code_eq%5D=&filter%5Bsuccess_eq%5D=&filter%5Burl_cont%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/webhooks/events?filter%5Bname_eq%5D=&filter%5Brequest_errors_cont%5D=&filter%5Bresponse_code_eq%5D=&filter%5Bsuccess_eq%5D=&filter%5Burl_cont%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"
"/api/v2/platform/webhooks/subscribers":
get:
summary: Return a list of Webhook Subscribers
tags:
- Webhook Subscribers
security:
- bearer_auth: []
description: Returns a list of Webhook Subscribers
operationId: webhook-subscribers-list
parameters:
- name: page
in: query
example: 1
schema:
type: integer
- name: per_page
in: query
example: 50
schema:
type: integer
- name: filter[active_eq]
in: query
description: ''
example: 'true'
schema:
type: string
- name: filter[url_cont]
in: query
description: ''
example: mysite
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '5'
type: subscriber
attributes:
url: https://www.url5.com/
active: true
subscriptions:
- "*"
created_at: '2022-11-08T19:35:58.830Z'
updated_at: '2022-11-08T19:35:58.830Z'
- id: '6'
type: subscriber
attributes:
url: https://www.url6.com/
active: true
subscriptions:
- "*"
created_at: '2022-11-08T19:35:58.831Z'
updated_at: '2022-11-08T19:35:58.831Z'
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/webhooks/subscribers?page=1&per_page=&filter[active_eq]=&filter[url_cont]=
next: http://www.example.com/api/v2/platform/webhooks/subscribers?filter%5Bactive_eq%5D=&filter%5Burl_cont%5D=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/webhooks/subscribers?filter%5Bactive_eq%5D=&filter%5Burl_cont%5D=&page=1&per_page=
last: http://www.example.com/api/v2/platform/webhooks/subscribers?filter%5Bactive_eq%5D=&filter%5Burl_cont%5D=&page=1&per_page=
first: http://www.example.com/api/v2/platform/webhooks/subscribers?filter%5Bactive_eq%5D=&filter%5Burl_cont%5D=&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 Webhook Subscriber
tags:
- Webhook Subscribers
security:
- bearer_auth: []
description: Creates a Webhook Subscriber
operationId: create-webhook-subscriber
parameters: []
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '9'
type: subscriber
attributes:
url: https://www.url9.com/
active: true
subscriptions:
- "*"
created_at: '2022-11-08T19:35:59.334Z'
updated_at: '2022-11-08T19:35:59.334Z'
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Url must be a valid URL, Url can't be blank, and Url the
URL must have a path
errors:
url:
- must be a valid URL
- can't be blank
- the URL must have a path
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_webhook_subscriber_params"
"/api/v2/platform/webhooks/subscribers/{id}":
get:
summary: Return a Webhook Subscriber
tags:
- Webhook Subscribers
security:
- bearer_auth: []
description: Returns a Webhook Subscriber
operationId: show-webhook-subscriber
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '10'
type: subscriber
attributes:
url: https://www.url10.com/
active: true
subscriptions:
- "*"
created_at: '2022-11-08T19:35:59.604Z'
updated_at: '2022-11-08T19:35:59.604Z'
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 Webhook Subscriber
tags:
- Webhook Subscribers
security:
- bearer_auth: []
description: Updates a Webhook Subscriber
operationId: update-webhook-subscriber
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '12'
type: subscriber
attributes:
url: https://www.url12.com/
active: true
subscriptions:
- "*"
created_at: '2022-11-08T19:36:00.130Z'
updated_at: '2022-11-08T19:36:00.130Z'
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Url must be a valid URL, Url can't be blank, and Url the
URL must have a path
errors:
url:
- must be a valid URL
- can't be blank
- the URL must have a path
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_webhook_subscriber_params"
delete:
summary: Delete a Webhook Subscriber
tags:
- Webhook Subscribers
security:
- bearer_auth: []
description: Deletes a Webhook Subscriber
operationId: delete-webhook-subscriber
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/wished_items":
get:
summary: Return a list of Wished Items
tags:
- Wished Items
security:
- bearer_auth: []
description: Returns a list of Wished Items
operationId: wished-items-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:
https://jsonapi.org/format/#fetching-includes'
example: variant
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '1'
type: wished_item
attributes:
quantity: 1
created_at: '2022-11-08T19:36:01.546Z'
updated_at: '2022-11-08T19:36:01.546Z'
display_total: "$19.99"
display_price: "$19.99"
price: '19.99'
total: '19.99'
relationships:
variant:
data:
id: '301'
type: variant
- id: '2'
type: wished_item
attributes:
quantity: 1
created_at: '2022-11-08T19:36:01.616Z'
updated_at: '2022-11-08T19:36:01.616Z'
display_total: "$19.99"
display_price: "$19.99"
price: '19.99'
total: '19.99'
relationships:
variant:
data:
id: '303'
type: variant
- id: '3'
type: wished_item
attributes:
quantity: 1
created_at: '2022-11-08T19:36:01.685Z'
updated_at: '2022-11-08T19:36:01.685Z'
display_total: "$19.99"
display_price: "$19.99"
price: '19.99'
total: '19.99'
relationships:
variant:
data:
id: '305'
type: variant
- id: '4'
type: wished_item
attributes:
quantity: 1
created_at: '2022-11-08T19:36:01.752Z'
updated_at: '2022-11-08T19:36:01.752Z'
display_total: "$19.99"
display_price: "$19.99"
price: '19.99'
total: '19.99'
relationships:
variant:
data:
id: '307'
type: variant
meta:
count: 4
total_count: 4
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/wished_items?page=1&per_page=&include=
next: http://www.example.com/api/v2/platform/wished_items?include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/wished_items?include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/wished_items?include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/wished_items?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 Wished Item
tags:
- Wished Items
security:
- bearer_auth: []
description: Creates a Wished Item
operationId: create-wished-item
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: variant
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '9'
type: wished_item
attributes:
quantity: 1
created_at: '2022-11-08T19:36:02.710Z'
updated_at: '2022-11-08T19:36:02.710Z'
display_total: "$19.99"
display_price: "$19.99"
price: '19.99'
total: '19.99'
relationships:
variant:
data:
id: '319'
type: variant
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Variant can't be blank, Wishlist can't be blank, and Quantity
is not a number
errors:
variant:
- can't be blank
wishlist:
- can't be blank
quantity:
- is not a number
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_wished_item_params"
"/api/v2/platform/wished_items/{id}":
get:
summary: Return a Wished Item
tags:
- Wished Items
security:
- bearer_auth: []
description: Returns a Wished Item
operationId: show-wished-item
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:
https://jsonapi.org/format/#fetching-includes'
example: variant
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '10'
type: wished_item
attributes:
quantity: 1
created_at: '2022-11-08T19:36:03.208Z'
updated_at: '2022-11-08T19:36:03.208Z'
display_total: "$19.99"
display_price: "$19.99"
price: '19.99'
total: '19.99'
relationships:
variant:
data:
id: '325'
type: variant
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 Wished Item
tags:
- Wished Items
security:
- bearer_auth: []
description: Updates a Wished Item
operationId: update-wished-item
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:
https://jsonapi.org/format/#fetching-includes'
example: variant
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '12'
type: wished_item
attributes:
quantity: 3
created_at: '2022-11-08T19:36:04.166Z'
updated_at: '2022-11-08T19:36:04.397Z'
display_total: "$59.97"
display_price: "$19.99"
price: '19.99'
total: '59.97'
relationships:
variant:
data:
id: '335'
type: variant
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Quantity is not a number
errors:
quantity:
- is not a number
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_wished_item_params"
delete:
summary: Delete a Wished Item
tags:
- Wished Items
security:
- bearer_auth: []
description: Deletes a Wished Item
operationId: delete-wished-item
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/wishlists":
get:
summary: Return a list of Wishlists
tags:
- Wishlists
security:
- bearer_auth: []
description: Returns a list of Wishlists
operationId: wishlists-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:
https://jsonapi.org/format/#fetching-includes'
example: wished_items
schema:
type: string
- name: filter[name_cont]
in: query
description: ''
example: Birthday
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '22'
type: wishlist
attributes:
name: Black Friday
is_private: true
is_default: false
created_at: '2022-11-08T19:36:06.256Z'
updated_at: '2022-11-08T19:36:06.256Z'
token: PunEhftsfcoHddCoVyqQLTYq
variant_included: false
relationships:
wished_items:
data:
- id: '17'
type: wished_item
- id: '18'
type: wished_item
- id: '23'
type: wishlist
attributes:
name: Birthday
is_private: true
is_default: false
created_at: '2022-11-08T19:36:06.257Z'
updated_at: '2022-11-08T19:36:06.257Z'
token: FYKHQXSsnSwAVEaci7RgbPXq
variant_included: false
relationships:
wished_items:
data:
- id: '19'
type: wished_item
- id: '20'
type: wished_item
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/wishlists?page=1&per_page=&include=&filter[name_cont]=
next: http://www.example.com/api/v2/platform/wishlists?filter%5Bname_cont%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/wishlists?filter%5Bname_cont%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/wishlists?filter%5Bname_cont%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/wishlists?filter%5Bname_cont%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 Wishlist
tags:
- Wishlists
security:
- bearer_auth: []
description: Creates a Wishlist
operationId: create-wishlist
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: wished_items
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '26'
type: wishlist
attributes:
name: Wishlist_26
is_private: true
is_default: false
created_at: '2022-11-08T19:36:07.290Z'
updated_at: '2022-11-08T19:36:07.290Z'
token: w7zjAVs9QJd9MLdPXDQcxrqi
variant_included: false
relationships:
wished_items:
data: []
schema:
"$ref": "#/components/schemas/resource"
'422':
description: Invalid request
content:
application/vnd.api+json:
examples:
Example:
value:
error: Name can't be blank and User can't be blank
errors:
name:
- can't be blank
user:
- can't be blank
schema:
"$ref": "#/components/schemas/validation_errors"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/create_wishlist_params"
"/api/v2/platform/wishlists/{id}":
get:
summary: Return a Wishlist
tags:
- Wishlists
security:
- bearer_auth: []
description: Returns a Wishlist
operationId: show-wishlist
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:
https://jsonapi.org/format/#fetching-includes'
example: wished_items
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '27'
type: wishlist
attributes:
name: My Wishlist
is_private: true
is_default: false
created_at: '2022-11-08T19:36:07.570Z'
updated_at: '2022-11-08T19:36:07.570Z'
token: mTKMs2ZP2PQc1Gu64XMvPrtk
variant_included: false
relationships:
wished_items:
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 Wishlist
tags:
- Wishlists
security:
- bearer_auth: []
description: Updates a Wishlist
operationId: update-wishlist
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:
https://jsonapi.org/format/#fetching-includes'
example: wished_items
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '29'
type: wishlist
attributes:
name: My Super Wishlist
is_private: true
is_default: false
created_at: '2022-11-08T19:36:08.103Z'
updated_at: '2022-11-08T19:36:08.334Z'
token: W4TY5oxqYi2kvpYs26XUPH3p
variant_included: false
relationships:
wished_items:
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_wishlist_params"
delete:
summary: Delete a Wishlist
tags:
- Wishlists
security:
- bearer_auth: []
description: Deletes a Wishlist
operationId: delete-wishlist
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/zones":
get:
summary: Return a list of Zones
tags:
- Zones
security:
- bearer_auth: []
description: Returns a list of Zones
operationId: zones-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:
https://jsonapi.org/format/#fetching-includes'
example: zone_members
schema:
type: string
- name: filter[description_eq]
in: query
description: ''
example: The zone containing all EU countries
schema:
type: string
responses:
'200':
description: Records returned
content:
application/vnd.api+json:
examples:
Example:
value:
data:
- id: '113'
type: zone
attributes:
name: Laudantium itaque ab suscipit quo fugit delectus perferendis.
description: Cum nisi esse veniam explicabo praesentium quod
reprehenderit.
default_tax: false
zone_members_count: 0
created_at: '2022-11-08T19:36:09.411Z'
updated_at: '2022-11-08T19:36:09.411Z'
kind: state
relationships:
zone_members:
data: []
- id: '114'
type: zone
attributes:
name: Enim perferendis consectetur in assumenda dolor deserunt.
description: Incidunt iusto vitae architecto nulla voluptate.
default_tax: false
zone_members_count: 0
created_at: '2022-11-08T19:36:09.412Z'
updated_at: '2022-11-08T19:36:09.412Z'
kind: state
relationships:
zone_members:
data: []
meta:
count: 2
total_count: 2
total_pages: 1
links:
self: http://www.example.com/api/v2/platform/zones?page=1&per_page=&include=&filter[description_eq]=
next: http://www.example.com/api/v2/platform/zones?filter%5Bdescription_eq%5D=&include=&page=1&per_page=
prev: http://www.example.com/api/v2/platform/zones?filter%5Bdescription_eq%5D=&include=&page=1&per_page=
last: http://www.example.com/api/v2/platform/zones?filter%5Bdescription_eq%5D=&include=&page=1&per_page=
first: http://www.example.com/api/v2/platform/zones?filter%5Bdescription_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 Zone
tags:
- Zones
security:
- bearer_auth: []
description: Creates a Zone
operationId: create-zone
parameters:
- name: include
in: query
description: 'Select which associated resources you would like to fetch, see:
https://jsonapi.org/format/#fetching-includes'
example: zone_members
schema:
type: string
responses:
'201':
description: Record created
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '117'
type: zone
attributes:
name: Repellat corrupti laudantium soluta dolorum animi quidem
reiciendis.
description: Laudantium tenetur accusamus blanditiis fuga
totam.
default_tax: false
zone_members_count: 0
created_at: '2022-11-08T19:36:09.930Z'
updated_at: '2022-11-08T19:36:09.930Z'
kind: state
relationships:
zone_members:
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_zone_params"
"/api/v2/platform/zones/{id}":
get:
summary: Return a Zone
tags:
- Zones
security:
- bearer_auth: []
description: Returns a Zone
operationId: show-zone
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:
https://jsonapi.org/format/#fetching-includes'
example: zone_members
schema:
type: string
responses:
'200':
description: Record found
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '118'
type: zone
attributes:
name: Molestiae esse ab labore ratione nemo.
description: Impedit vitae in modi quaerat qui quod quia.
default_tax: false
zone_members_count: 0
created_at: '2022-11-08T19:36:10.198Z'
updated_at: '2022-11-08T19:36:10.198Z'
kind: state
relationships:
zone_members:
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 Zone
tags:
- Zones
security:
- bearer_auth: []
description: Updates a Zone
operationId: update-zone
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:
https://jsonapi.org/format/#fetching-includes'
example: zone_members
schema:
type: string
responses:
'200':
description: Record updated
content:
application/vnd.api+json:
examples:
Example:
value:
data:
id: '120'
type: zone
attributes:
name: EU
description: The zone containing all EU countries
default_tax: false
zone_members_count: 0
created_at: '2022-11-08T19:36:10.716Z'
updated_at: '2022-11-08T19:36:10.945Z'
kind: state
relationships:
zone_members:
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_zone_params"
delete:
summary: Delete a Zone
tags:
- Zones
security:
- bearer_auth: []
description: Deletes a Zone
operationId: delete-zone
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"
servers:
- url: http://{defaultHost}
variables:
defaultHost:
default: localhost:3000
tags:
- name: Addresses
- name: Adjustments
- name: Classifications
- name: Countries
- name: CMS Pages
- name: CMS Sections
- name: Digital Assets
- name: Digital Links
- name: Line Items
- name: Menus
- name: Menu Items
- name: Option Types
- name: Option Values
- name: Orders
- name: Payments
- name: Payment Methods
- name: Products
- name: Promotions
- name: Promotion Actions
- name: Promotion Categories
- name: Promotion Rules
- name: Roles
- name: Shipments
- name: Shipping Categories
- name: Shipping Methods
- name: States
- name: Stock Items
- name: Stock Locations
- name: Store Credit Categories
- name: Store Credit Types
- name: Store Credits
- name: Tax Categories
- name: Tax Rates
- name: Taxons
- name: Taxonomies
- name: Users
- name: Variants
- name: Webhook Events
- name: Webhook Subscribers
- name: Wishlists
- name: Wished Items
- name: Zones
components:
securitySchemes:
bearer_auth:
type: http
scheme: bearer
schemas:
create_address_params:
type: object
properties:
address:
type: object
required:
- country_id
- address1
- city
- zipcode
- phone
- firstname
- lastname
properties:
country_id:
type: string
example: '224'
state_id:
type: string
example: '516'
state_name:
type: string
example: New York
address1:
type: string
example: 5th ave
address2:
type: string
example: 1st suite
city:
type: string
example: NY
zipcode:
type: string
example: '10001'
phone:
type: string
example: "+1 123 456 789"
alternative_phone:
type: string
firstname:
type: string
example: John
lastname:
type: string
example: Snow
label:
type: string
example: My home address
company:
type: string
example: Vendo Cloud Inc
user_id:
type: string
public_metadata:
type: object
example:
distance_from_nearest_city_in_km: 10
location_type: building
private_metadata:
type: object
example:
close_to_shop: true
required:
- address
x-internal: false
update_address_params:
type: object
properties:
address:
type: object
properties:
country_id:
type: string
example: '224'
state_id:
type: string
example: '516'
state_name:
type: string
example: New York
address1:
type: string
example: 5th ave
address2:
type: string
example: 1st suite
city:
type: string
example: NY
zipcode:
type: string
example: '10001'
phone:
type: string
example: "+1 123 456 789"
alternative_phone:
type: string
firstname:
type: string
example: John
lastname:
type: string
example: Snow
label:
type: string
example: My home address
company:
type: string
example: Vendo Cloud Inc
user_id:
type: string
public_metadata:
type: object
example:
distance_from_city_in_km: 10
location_type: building
private_metadata:
type: object
example:
close_to_shop: true
required:
- address
x-internal: false
create_adjustment_params:
type: object
properties:
adjustment:
type: object
required:
- order_id
- label
- adjustable_id
- adjustable_type
properties:
order_id:
type: string
label:
type: string
example: Shipping costs
adjustable_id:
type: string
adjustable_type:
type: string
example: Spree::LineItem
source_id:
type: string
source_type:
type: string
example: Spree::TaxRate
amount:
type: number
example: 10.9
mandatory:
type: boolean
eligible:
type: boolean
state:
type: string
example: closed
default: open
enum:
- closed
- open
included:
type: boolean
example: true
default: false
required:
- adjustment
x-internal: false
update_adjustment_params:
type: object
properties:
adjustment:
type: object
properties:
order_id:
type: string
label:
type: string
example: Shipping costs
adjustable_id:
type: string
adjustable_type:
type: string
example: Spree::LineItem
source_id:
type: string
source_type:
type: string
example: Spree::TaxRate
amount:
type: number
example: 10.9
mandatory:
type: boolean
eligible:
type: boolean
state:
type: string
example: closed
default: open
enum:
- closed
- open
included:
type: boolean
example: true
default: false
required:
- adjustment
x-internal: false
create_classification_params:
type: object
properties:
classification:
type: object
required:
- product_id
- taxon_id
- position
properties:
product_id:
type: string
example: '1'
taxon_id:
type: string
example: '1'
position:
type: integer
example: 1
required:
- classification
x-internal: false
update_classification_params:
type: object
properties:
classification:
type: object
properties:
product_id:
type: string
example: '1'
taxon_id:
type: string
example: '1'
position:
type: integer
example: 1
required:
- classification
x-internal: false
create_standard_cms_page_params:
type: object
properties:
cms_page:
type: object
required:
- title
- locale
- type
properties:
title:
type: string
example: About Us
description: Give your page a title.
type:
type: string
enum:
- Spree::Cms::Pages::StandardPage
description: Set the type of page.
meta_title:
type: string
nullable: true
example: Learn More About Super-Shop
description: Set the meta title for this page, this appears in the title
bar of the browser.
content:
type: string
nullable: true
example: Lot's of text..
description: The text content of a standard page, this can be HTML from
a rich text editor.
meta_description:
type: string
nullable: true
example: Learn more about us on this page here...
description: Set a meta description, used for SEO and displayed in search
results.
visible:
type: boolean
enum:
- true
- false
description: This page is publicly visible when set to `true`.
slug:
type: string
nullable: true
example: about-us
description: Set a slug for this page.
locale:
type: string
example: en-US
description: The language this page is written in.
required:
- cms_page
title: Create a Standard Page
x-internal: false
create_homepage_cms_page_params:
type: object
properties:
cms_page:
type: object
required:
- title
- locale
- type
properties:
title:
type: string
example: Our Flash Homepage
description: Give your page a title.
type:
type: string
enum:
- Spree::Cms::Pages::Homepage
description: Set the type of page.
meta_title:
type: string
nullable: true
example: Visit Our Store - Great Deals
description: Set the meta title for this page, this appears in the title
bar of the browser.
meta_description:
type: string
nullable: true
example: Discover great new products that we sell in this store...
description: Set a meta description, used for SEO and displayed in search
results.
visible:
type: boolean
enum:
- true
- false
description: This page is publicly visible when set to `true`.
locale:
type: string
example: en-US
description: The language this page is written in.
required:
- cms_page
title: Create a Homepage
x-internal: false
create_feature_cms_page_params:
type: object
properties:
cms_page:
type: object
required:
- title
- locale
- type
properties:
title:
type: string
example: Featured Product
description: Give your page a title.
type:
type: string
enum:
- Spree::Cms::Pages::FeaturePage
description: Set the type of page.
meta_title:
type: string
nullable: true
example: Learn More About This Featured Product
description: Set the meta title for this page, this appears in the title
bar of the browser.
meta_description:
type: string
nullable: true
example: Learn more about us this amazing product that we sell right
here...
description: Set a meta description, used for SEO and displayed in search
results.
visible:
type: boolean
enum:
- true
- false
description: This page is publicly visible when set to `true`.
slug:
type: string
nullable: true
example: about-us
description: Set a slug for this page.
locale:
type: string
example: en-US
description: The language this page is written in.
required:
- cms_page
title: Create a Feature Page
x-internal: false
update_standard_cms_page_params:
type: object
properties:
cms_page:
type: object
properties:
title:
type: string
example: About Us
description: Update the page title.
type:
type: string
enum:
- Spree::Cms::Pages::StandardPage
- Spree::Cms::Pages::Homepage
- Spree::Cms::Pages::FeaturePage
description: Change the type of page.
meta_title:
type: string
nullable: true
example: Learn More About Super-Shop
description: Update the meta title for this page, this appears in the
title bar of the browser.
content:
type: string
nullable: true
example: Lot's of text..
description: Update the text content of a standard page, this can be
HTML from a rich text editor.
meta_description:
type: string
nullable: true
example: Learn more about us on this page here...
description: Update the meta description, used for SEO and displayed
in search results.
visible:
type: boolean
enum:
- true
- false
description: This page is publicly visible when set to `true`.
slug:
type: string
nullable: true
example: about-us
description: Update the slug for this page.
locale:
type: string
example: en-US
description: Update the language of this page.
required:
- cms_page
title: Update a Standard Page
x-internal: false
update_homepage_cms_page_params:
type: object
properties:
cms_page:
type: object
properties:
title:
type: string
example: Our Flash Homepage
description: Update the page title.
type:
type: string
enum:
- Spree::Cms::Pages::StandardPage
- Spree::Cms::Pages::Homepage
- Spree::Cms::Pages::FeaturePage
description: Change the type of page.
meta_title:
type: string
nullable: true
example: Visit Our Store - Great Deals
description: Update the meta title for this page, this appears in the
title bar of the browser.
meta_description:
type: string
nullable: true
example: Discover great new products that we sell in this store...
description: Update the meta description, used for SEO and displayed
in search results.
visible:
type: boolean
enum:
- true
- false
description: This page is publicly visible when set to `true`.
locale:
type: string
example: en-US
description: Update the language of this page.
required:
- cms_page
title: Update a Homepage
x-internal: false
update_feature_cms_page_params:
type: object
properties:
cms_page:
type: object
properties:
title:
type: string
example: Featured Product
description: Update the page title.
type:
type: string
enum:
- Spree::Cms::Pages::StandardPage
- Spree::Cms::Pages::Homepage
- Spree::Cms::Pages::FeaturePage
description: Change the type of page.
meta_title:
type: string
nullable: true
example: Learn More About This Featured Product
description: Update the meta title for this page, this appears in the
title bar of the browser.
meta_description:
type: string
nullable: true
example: Learn more about us this amazing product that we sell right
here...
description: Update the meta description, used for SEO and displayed
in search results.
visible:
type: boolean
enum:
- true
- false
description: This page is publicly visible when set to `true`.
slug:
type: string
nullable: true
example: about-us
description: Update the slug for this page.
locale:
type: string
example: en-US
description: Update the language of this page.
required:
- cms_page
title: Update a Feature Page
x-internal: false
create_hero_image_cms_section_params:
type: object
properties:
cms_section:
type: object
required:
- name
- cms_page_id
- type
properties:
name:
type: string
description: Give this section a name.
cms_page_id:
type: string
description: Set the `cms_page` ID that this section belongs to.
type:
type: string
enum:
- Spree::Cms::Sections::HeroImage
example: Spree::Cms::Sections::HeroImage
description: Set the section type.
linked_resource_type:
type: string
example: Spree::Taxon
nullable: true
enum:
- Spree::Taxon
- Spree::Product
- Spree::CmsPage
description: Set the resource type that this section links to.
linked_resource_id:
type: string
example: '1'
nullable: true
description: Set the ID of the resource that you would like this section
to link to.
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
gutters:
type: string
example: No Gutters
enum:
- Gutters
- No Gutters
description: This value is used by front end developers for styling
the section padding.
button_text:
type: string
example: Click Here
description: Set the text value of the button used in this section.
title:
type: string
example: Shop Today
description: Create a title for the Hero Section.
cms_section[image_one]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
required:
- cms_section
title: Create a Hero Image Section
x-internal: false
create_product_carousel_cms_section_params:
type: object
properties:
cms_section:
type: object
required:
- name
- cms_page_id
- type
properties:
name:
type: string
description: Give this section a name.
cms_page_id:
type: string
description: Set the `cms_page` ID that this section belongs to.
type:
type: string
enum:
- Spree::Cms::Sections::ProductCarousel
example: Spree::Cms::Sections::ProductCarousel
description: Set the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
linked_resource_id:
type: string
example: '1'
nullable: true
description: Set the ID of the Taxon that you would like displayed as
a Product Carousel.
required:
- cms_section
title: Create a Product Carousel Section
x-internal: false
create_side_by_side_images_cms_section_params:
type: object
properties:
cms_section:
type: object
required:
- name
- cms_page_id
- type
properties:
name:
type: string
description: Give this section a name.
cms_page_id:
type: string
description: Set the `cms_page` ID that this section belongs to.
type:
type: string
enum:
- Spree::Cms::Sections::SideBySideImages
example: Spree::Cms::Sections::SideBySideImages
description: Set the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
link_type_one:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Set the resource type that image one links to.
link_type_two:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Set the resource type that image two links to.
link_one:
type: string
example: men/shirts
nullable: true
description: Set the slug or path that image two links to.
link_two:
type: string
example: white-shirt
nullable: true
description: Set the slug or path that image two links to.
title_one:
type: string
example: Shop Men's Shirts
nullable: true
description: Set the title used in image one.
title_two:
type: string
example: Buy This Men's Shirt
nullable: true
description: Set the title used in image two.
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
subtitle_one:
type: string
example: Save 50% today
nullable: true
description: Set the subtitle used in image one.
subtitle_two:
type: string
example: Save 50% today
nullable: true
description: Set the subtitle used in image two.
gutters:
type: string
example: No Gutters
enum:
- Gutters
- No Gutters
description: This value is used by front end developers for styling
the section padding.
cms_section[image_one]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
cms_section[image_two]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
required:
- cms_section
title: Create a Side-by-Side Image Section
x-internal: false
create_image_gallery_cms_section_params:
type: object
properties:
cms_section:
type: object
required:
- name
- cms_page_id
- type
properties:
name:
type: string
description: Give this section a name.
cms_page_id:
type: string
description: Set the `cms_page` ID that this section belongs to.
type:
type: string
enum:
- Spree::Cms::Sections::ImageGallery
example: Spree::Cms::Sections::ImageGallery
description: Set the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
link_type_one:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Set the resource type that image one links to.
link_type_two:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Set the resource type that image two links to.
link_type_three:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Set the resource type that image three links to.
link_one:
type: string
example: men/shirts
nullable: true
description: Set the slug or path that image two links to.
link_two:
type: string
example: white-shirt
nullable: true
description: Set the slug or path that image two links to.
link_three:
type: string
example: red-shirt
nullable: true
description: Set the slug or path that image three links to.
title_one:
type: string
example: Shop Men's Shirts
nullable: true
description: Set the title used in image one.
title_two:
type: string
example: Buy This Men's Shirt
nullable: true
description: Set the title used in image two.
title_three:
type: string
example: Buy This Women's Skirt
nullable: true
description: Set the title used in image three.
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
layout_style:
type: string
example: Default
enum:
- Default
- Reversed
description: This value is used by front end developers for styling
the order the images appear.
display_labels:
type: string
example: Show
enum:
- Show
- Hide
description: This value is used by front end developers for showing
and hiding the label on the images.
cms_section[image_one]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
cms_section[image_two]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
cms_section[image_three]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
required:
- cms_section
title: Create an Image Gallery Section
x-internal: false
create_featured_article_cms_section_params:
type: object
properties:
cms_section:
type: object
required:
- name
- cms_page_id
- type
properties:
name:
type: string
description: Give this section a name.
cms_page_id:
type: string
description: Set the `cms_page` ID that this section belongs to.
type:
type: string
enum:
- Spree::Cms::Sections::FeaturedArticle
example: Spree::Cms::Sections::FeaturedArticle
description: Set the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
linked_resource_type:
type: string
example: Spree::Taxon
nullable: true
enum:
- Spree::Taxon
- Spree::Product
- Spree::CmsPage
description: Set the resource type that this section links to.
linked_resource_id:
type: string
example: '1'
nullable: true
description: Set the ID of the resource that you would like this section
to link to.
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
gutters:
type: string
example: No Gutters
enum:
- Gutters
- No Gutters
description: This value is used by front end developers for styling
the section padding.
button_text:
type: string
example: Click Here
description: Set the text value of the button used in this section.
title:
type: string
example: Shop Today
description: Create a title for the Section.
subtitle:
type: string
example: Save Big!
description: Create a subtitle for the Section.
rte_content:
type: string
example: Lots of text and content goes here.
description: Set the content, here, this can be rich text editor content.
required:
- cms_section
title: Create a Featured Article Section
x-internal: false
create_rich_text_cms_section_params:
type: object
properties:
cms_section:
type: object
required:
- name
- cms_page_id
- type
properties:
name:
type: string
description: Give this section a name.
cms_page_id:
type: string
description: Set the `cms_page` ID that this section belongs to.
type:
type: string
enum:
- Spree::Cms::Sections::RichTextContent
example: Spree::Cms::Sections::RichTextContent
description: Set the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
rte_content:
type: string
example: Lots of text and content goes here.
description: Set the content, here, this can be rich text editor content.
required:
- cms_section
title: Create a Rich Text Section
x-internal: false
update_hero_image_cms_section_params:
type: object
properties:
cms_section:
type: object
properties:
name:
type: string
description: Update this section name.
type:
type: string
enum:
- Spree::Cms::Sections::HeroImage
- Spree::Cms::Sections::FeaturedArticle
- Spree::Cms::Sections::ProductCarousel
- Spree::Cms::Sections::ImageGallery
- Spree::Cms::Sections::SideBySideImages
- Spree::Cms::Sections::RichTextContent
example: Spree::Cms::Sections::ProductCarousel
description: Change the section type.
linked_resource_type:
type: string
example: Spree::Taxon
nullable: true
enum:
- Spree::Taxon
- Spree::Product
- Spree::CmsPage
description: Update the resource type that this section links to.
linked_resource_id:
type: string
example: '1'
nullable: true
description: Set the ID of the resource that you would like this section
to link to.
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
gutters:
type: string
example: No Gutters
enum:
- Gutters
- No Gutters
description: This value is used by front end developers for styling
the section padding.
button_text:
type: string
example: Click Here
description: Update the text value of the button used in this section.
title:
type: string
example: Shop Today
description: Update the title for this section.
cms_section[image_one]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
required:
- cms_section
title: Update a Hero Image Section
x-internal: false
update_product_carousel_cms_section_params:
type: object
properties:
cms_section:
type: object
properties:
name:
type: string
description: Change this section name.
type:
type: string
enum:
- Spree::Cms::Sections::HeroImage
- Spree::Cms::Sections::FeaturedArticle
- Spree::Cms::Sections::ProductCarousel
- Spree::Cms::Sections::ImageGallery
- Spree::Cms::Sections::SideBySideImages
- Spree::Cms::Sections::RichTextContent
example: Spree::Cms::Sections::ProductCarousel
description: Change the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
linked_resource_id:
type: string
example: '1'
nullable: true
description: Update the ID of the Taxon that you would like displayed
as a Product Carousel.
required:
- cms_section
title: Update a Product Carousel Section
x-internal: false
update_side_by_side_images_cms_section_params:
type: object
properties:
cms_section:
type: object
properties:
name:
type: string
description: Update this section name.
type:
type: string
enum:
- Spree::Cms::Sections::HeroImage
- Spree::Cms::Sections::FeaturedArticle
- Spree::Cms::Sections::ProductCarousel
- Spree::Cms::Sections::ImageGallery
- Spree::Cms::Sections::SideBySideImages
- Spree::Cms::Sections::RichTextContent
example: Spree::Cms::Sections::ProductCarousel
description: Change the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
link_type_one:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Update the resource type that image one links to.
link_type_two:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Update the resource type that image two links to.
link_one:
type: string
example: men/shirts
nullable: true
description: Update the slug or path that image two links to.
link_two:
type: string
example: white-shirt
nullable: true
description: Update the slug or path that image two links to.
title_one:
type: string
example: Shop Men's Shirts
nullable: true
description: Update the title used in image one.
title_two:
type: string
example: Buy This Men's Shirt
nullable: true
description: Update the title used in image two.
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
subtitle_one:
type: string
example: Save 50% today
nullable: true
description: Update the subtitle used in image one.
subtitle_two:
type: string
example: Save 50% today
nullable: true
description: Update the subtitle used in image two.
gutters:
type: string
example: No Gutters
enum:
- Gutters
- No Gutters
description: This value is used by front end developers for styling
the section padding.
cms_section[image_one]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
cms_section[image_two]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
required:
- cms_section
title: Update a Side-by-Side Image Section
x-internal: false
update_image_gallery_cms_section_params:
type: object
properties:
cms_section:
type: object
properties:
name:
type: string
description: Update this section name.
type:
type: string
enum:
- Spree::Cms::Sections::HeroImage
- Spree::Cms::Sections::FeaturedArticle
- Spree::Cms::Sections::ProductCarousel
- Spree::Cms::Sections::ImageGallery
- Spree::Cms::Sections::SideBySideImages
- Spree::Cms::Sections::RichTextContent
example: Spree::Cms::Sections::ProductCarousel
description: Change the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
link_type_one:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Update the resource type that image one links to.
link_type_two:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Update the resource type that image two links to.
link_type_three:
type: string
example: Spree::Taxon
enum:
- Spree::Taxon
- Spree::Product
description: Update the resource type that image three links to.
link_one:
type: string
example: men/shirts
nullable: true
description: Update the slug or path that image two links to.
link_two:
type: string
example: white-shirt
nullable: true
description: Update the slug or path that image two links to.
link_three:
type: string
example: red-shirt
nullable: true
description: Update the slug or path that image three links to.
title_one:
type: string
example: Shop Men's Shirts
nullable: true
description: Update the title used in image one.
title_two:
type: string
example: Buy This Men's Shirt
nullable: true
description: Update the title used in image two.
title_three:
type: string
example: Buy This Women's Skirt
nullable: true
description: Update the title used in image three.
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
layout_style:
type: string
example: Default
enum:
- Default
- Reversed
description: This value is used by front end developers for styling
the order the images appear.
display_labels:
type: string
example: Show
enum:
- Show
- Hide
description: This value is used by front end developers for showing
and hiding the label on the images.
cms_section[image_one]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
cms_section[image_two]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
cms_section[image_three]:
type: string
format: binary
description: Use a `multipart/form-data` request to upload assets.
required:
- cms_section
title: Update an Image Gallery Section
x-internal: false
update_featured_article_cms_section_params:
type: object
properties:
cms_section:
type: object
properties:
name:
type: string
description: Update this section name.
type:
type: string
enum:
- Spree::Cms::Sections::HeroImage
- Spree::Cms::Sections::FeaturedArticle
- Spree::Cms::Sections::ProductCarousel
- Spree::Cms::Sections::ImageGallery
- Spree::Cms::Sections::SideBySideImages
- Spree::Cms::Sections::RichTextContent
example: Spree::Cms::Sections::ProductCarousel
description: Change the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
linked_resource_type:
type: string
example: Spree::Taxon
nullable: true
enum:
- Spree::Taxon
- Spree::Product
- Spree::CmsPage
description: Set the resource type that this section links to.
linked_resource_id:
type: string
example: '1'
nullable: true
description: Change the ID of the resource that you would like this
section to link to.
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
gutters:
type: string
example: No Gutters
enum:
- Gutters
- No Gutters
description: This value is used by front end developers for styling
the section padding.
button_text:
type: string
example: Click Here
description: Update the text value of the button used in this section.
title:
type: string
example: Shop Today
description: Update the title for the Section.
subtitle:
type: string
example: Save Big!
description: Update the subtitle for the Section.
rte_content:
type: string
example: Lots of text and content goes here.
description: Update the content here, this can be rich text editor content.
required:
- cms_section
title: Update a Featured Article Section
x-internal: false
update_rich_text_cms_section_params:
type: object
properties:
cms_section:
type: object
properties:
name:
type: string
description: Update this section name.
type:
type: string
enum:
- Spree::Cms::Sections::HeroImage
- Spree::Cms::Sections::FeaturedArticle
- Spree::Cms::Sections::ProductCarousel
- Spree::Cms::Sections::ImageGallery
- Spree::Cms::Sections::SideBySideImages
- Spree::Cms::Sections::RichTextContent
example: Spree::Cms::Sections::ProductCarousel
description: Change the section type.
position:
type: integer
example: 2
description: 'Pass the position that you want this section to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
fit:
type: string
example: Screen
enum:
- Screen
- Container
description: This value is used by front end developers to set CSS classes
for content that fits the screen edge-to-edge, or stays within the
boundaries of the central container.
rte_content:
type: string
example: Lots of text and content goes here.
description: Update the content, here, this can be rich text editor
content.
required:
- cms_section
title: Update a Rich Text Section
x-internal: false
create_digital_params:
type: object
properties:
digital[attachment]:
type: string
format: binary
digital[variant_id]:
type: string
example: '123'
required:
- digital[attachment]
- digital[variant_id]
x-internal: false
update_digital_params:
type: object
properties:
digital[attachment]:
type: string
format: binary
digital[variant_id]:
type: string
example: '123'
required:
- digital[attachment]
- digital[variant_id]
x-internal: false
create_digital_link_params:
type: object
properties:
digital_link:
type: object
required:
- line_item_id
- digital_id
properties:
access_counter:
type: integer
example: 0
line_item_id:
type: string
example: '1'
digital_id:
type: string
example: '1'
required:
- digital_link
x-internal: false
update_digital_link_params:
type: object
properties:
digital_link:
type: object
properties:
access_counter:
type: integer
example: 0
line_item_id:
type: string
example: '1'
digital_id:
type: string
example: '1'
required:
- digital_link
x-internal: false
create_line_item_params:
type: object
properties:
line_item:
type: object
required:
- order_id
- variant_id
- quantity
properties:
order_id:
type: string
example: '1'
variant_id:
type: string
example: '1'
quantity:
type: integer
example: 2
public_metadata:
type: object
private_metadata:
type: object
required:
- line_item
x-internal: false
update_line_item_params:
type: object
properties:
line_item:
type: object
properties:
variant_id:
type: string
example: '1'
quantity:
type: integer
example: 2
required:
- line_item
x-internal: false
create_menu_params:
type: object
properties:
menu:
type: object
required:
- name
- location
- locale
properties:
name:
type: string
example: Main Menu
description: Give this Menu a name.
location:
type: string
enum:
- header
- footer
description: Set the location this menu appears in the website.
locale:
type: string
example: en-US
description: Set the language of this menu.
required:
- menu
x-internal: false
update_menu_params:
type: object
properties:
menu:
type: object
properties:
name:
type: string
example: Main Menu
description: Update this Menu name.
location:
type: string
enum:
- header
- footer
description: Update the location this menu appears in the website.
locale:
type: string
example: en-US
description: Change the language of this menu.
required:
- menu
x-internal: false
create_menu_item_params:
type: object
properties:
menu_item:
type: object
required:
- name
- menu_id
properties:
name:
type: string
example: T-Shirts
description: The name of this Menu Item
code:
type: string
nullable: true
example: MEN-TS
description: Give this Menu Item a code to identify this Menu Item from
others. This is especially useful when using Container type Menu Items
to group items.
subtitle:
type: string
nullable: true
example: Shop men's T-Shirts
description: Set an optional subtitle for the Menu Item, this is useful
if your menu has promotional links that require more than just a link
name.
destination:
type: string
nullable: true
example: https://getvendo.com
description: 'Used when the linked_resource_type is set to: URL'
menu_id:
type: integer
example: 1
description: Specify the ID of the Menu this item belongs to.
new_window:
type: boolean
description: When set to `true` the link will be opened in a new tab
or window.
item_type:
type: string
enum:
- Link
- Container
description: Links are standard links, where as Containers are used
to group links.
linked_resource_type:
type: string
enum:
- URL
- Spree::Taxon
- Spree::Product
- Spree::CmsPage
description: 'Set the type of resource you want to link to, or set to:
URL to use the destination field for an external link.'
linked_resource_id:
type: integer
example: 1
nullable: true
description: The ID of the resource you are linking to.
required:
- menu_item
title: Create a Menu Item
x-internal: false
update_menu_item_params:
type: object
properties:
menu_item:
type: object
properties:
name:
type: string
example: T-Shirts
description: Update the name of this Menu Item
code:
type: string
nullable: true
example: MEN-TS
description: The Menu Item a code to identifies this Menu Item from
others. This is especially useful when using Container type Menu Items
to group items.
subtitle:
type: string
nullable: true
example: Shop men's T-Shirts
description: Set an optional subtitle for the Menu Item, this is useful
if your menu has promotional links that require more than just a link
name.
destination:
type: string
nullable: true
example: https://getvendo.com
description: 'Used when the linked_resource_type is set to: URL'
menu_id:
type: integer
example: 1
description: Specify the ID of the Menu this item belongs to.
new_window:
type: boolean
description: When set to `true` the link will be opened in a new tab
or window.
item_type:
type: string
enum:
- Link
- Container
description: Links are standard links, where as Containers are used
to group links.
linked_resource_type:
type: string
enum:
- URL
- Spree::Taxon
- Spree::Product
- Spree::CmsPage
description: 'Change the type of resource you want to link to, or set
to: URL to use the destination field for an external link.'
linked_resource_id:
type: integer
example: 1
nullable: true
description: The ID of the resource you are linking to.
required:
- menu_item
title: Update a Menu Item
x-internal: false
menu_item_reposition:
type: object
properties:
menu_item:
type: object
required:
- new_parent_id
- new_position_idx
properties:
new_parent_id:
type: integer
example: 1
description: The ID of the new target parent Menu Item.
new_position_idx:
type: integer
example: 1
description: The new index position of the Menu Item within its parent
required:
- menu_item
title: Reposition a Menu Item
x-internal: false
create_option_type_params:
type: object
properties:
option_type:
type: object
required:
- name
- presentation
properties:
name:
type: string
example: color
presentation:
type: string
example: Color
public_metadata:
type: object
private_metadata:
type: object
required:
- option_type
x-internal: false
update_option_type_params:
type: object
properties:
option_type:
type: object
properties:
name:
type: string
example: color
presentation:
type: string
example: Color
public_metadata:
type: object
private_metadata:
type: object
required:
- option_type
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
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
create_order_params:
type: object
properties:
order:
type: object
properties:
item_total:
type: number
example: 170.9
total:
type: number
example: 190.9
state:
type: string
example: complete
enum:
- cart
- address
- delivery
- payment
- confirm
- complete
- canceled
adjustment_total:
type: number
example: 20.0
user_id:
type: string
example: '1'
completed_at:
type: string
format: date_time
example: 2022-11-08 19:33:50 UTC
bill_address_id:
type: string
example: '1'
ship_address_id:
type: string
example: '1'
payment_total:
type: number
example: 190.9
shipment_state:
type: string
example: shipped
enum:
- backorder
- canceled
- partial
- pending
- ready
- shipped
payment_state:
type: string
example: paid
enum:
- balance_due
- credit_owed
- failed
- paid
- void
email:
type: string
format: email
example: hi@getvendo.com
special_instructions:
type: string
example: I need it ASAP!
currency:
type: string
example: USD
last_ip_address:
type: string
example: 127.0.0.1
created_by_id:
type: string
example: '1'
shipment_total:
type: number
example: 10.0
additional_tax_total:
type: number
example: 10.0
promo_total:
type: number
example: 0.0
channel:
type: string
example: online
included_tax_total:
type: number
example: 0.0
item_count:
type: integer
example: 2
approver_id:
type: string
approved_at:
type: string
format: date_time
example: 2022-11-08 19:33:50 UTC
confirmation_delivered:
type: boolean
example: true
default: false
considered_risky:
type: boolean
example: true
default: false
canceled_at:
type: string
format: date_time
canceler_id:
type: string
taxable_adjustment_total:
type: number
example: 170.9
non_taxable_adjustment_total:
type: number
example: 10.0
store_owner_notification_delivered:
type: boolean
example: true
default: false
bill_address_attributes:
"$ref": "#/components/schemas/update_address_params"
ship_address_attributes:
"$ref": "#/components/schemas/update_address_params"
line_items_attributes:
type: array
items:
"$ref": "#/components/schemas/update_line_item_params"
public_metadata:
type: object
private_metadata:
type: object
required:
- order
x-internal: false
update_order_params:
type: object
properties:
order:
type: object
properties:
item_total:
type: number
example: 170.9
total:
type: number
example: 190.9
state:
type: string
example: complete
enum:
- cart
- address
- delivery
- payment
- confirm
- complete
- canceled
adjustment_total:
type: number
example: 20.0
user_id:
type: string
example: '1'
completed_at:
type: string
format: date_time
example: 2022-11-08 19:33:50 UTC
bill_address_id:
type: string
example: '1'
ship_address_id:
type: string
example: '1'
payment_total:
type: number
example: 190.9
shipment_state:
type: string
example: shipped
enum:
- backorder
- canceled
- partial
- pending
- ready
- shipped
payment_state:
type: string
example: paid
enum:
- balance_due
- credit_owed
- failed
- paid
- void
email:
type: string
format: email
example: hi@getvendo.com
special_instructions:
type: string
example: I need it ASAP!
currency:
type: string
example: USD
last_ip_address:
type: string
example: 127.0.0.1
created_by_id:
type: string
example: '1'
shipment_total:
type: number
example: 10.0
additional_tax_total:
type: number
example: 10.0
promo_total:
type: number
example: 0.0
channel:
type: string
example: online
included_tax_total:
type: number
example: 0.0
item_count:
type: integer
example: 2
approver_id:
type: string
approved_at:
type: string
format: date_time
example: 2022-11-08 19:33:50 UTC
confirmation_delivered:
type: boolean
example: true
default: false
considered_risky:
type: boolean
example: true
default: false
canceled_at:
type: string
format: date_time
canceler_id:
type: string
taxable_adjustment_total:
type: number
example: 170.9
non_taxable_adjustment_total:
type: number
example: 10.0
store_owner_notification_delivered:
type: boolean
example: true
default: false
bill_address_attributes:
"$ref": "#/components/schemas/update_address_params"
ship_address_attributes:
"$ref": "#/components/schemas/update_address_params"
line_items_attributes:
type: array
items:
"$ref": "#/components/schemas/update_line_item_params"
public_metadata:
type: object
private_metadata:
type: object
required:
- order
x-internal: false
create_payment_method_params:
type: object
properties:
payment_method:
type: object
required:
- name
properties:
name:
type: string
example: Test Payment Method
active:
type: boolean
auto_capture:
type: boolean
description:
type: string
example: This is a test payment method
type:
type: string
example: Spree::Gateway::Bogus
enum:
- Spree::Gateway::Bogus
- Spree::PaymentMethod::Check
display_on:
type: string
example: both
enum:
- both
- back_end
- front_end
store_ids:
type: array
items:
allOf:
- type: string
example: '2'
public_metadata:
type: object
private_metadata:
type: object
required:
- payment_method
x-internal: false
update_payment_method_params:
type: object
properties:
payment_method:
type: object
properties:
name:
type: string
example: Test Payment Method
active:
type: boolean
auto_capture:
type: boolean
description:
type: string
example: This is a test payment method
type:
type: string
example: Spree::Gateway::Bogus
enum:
- Spree::Gateway::Bogus
- Spree::PaymentMethod::Check
display_on:
type: string
example: both
enum:
- both
- back_end
- front_end
store_ids:
type: array
items:
allOf:
- type: string
example: '2'
public_metadata:
type: object
private_metadata:
type: object
required:
- payment_method
x-internal: false
title: Update Payment Method
update_payment_method_params_bogus_gateway:
type: object
properties:
payment_method:
type: object
properties:
preferred_dummy_key:
type: string
example: UPDATED-DUMMY-KEY-123
preferred_server:
type: string
example: production
preferred_test_mode:
type: boolean
required:
- payment_method
x-internal: false
title: Update Bogus Gateway
create_product_params:
type: object
properties:
product:
type: object
required:
- name
- price
- shipping_category_id
properties:
name:
type: string
description:
type: string
available_on:
type: string
discontinue_on:
type: string
permalink:
type: string
meta_description:
type: string
meta_keywords:
type: string
price:
type: string
sku:
type: string
deleted_at:
type: string
prototype_id:
type: string
option_values_hash:
type: string
weight:
type: string
height:
type: string
width:
type: string
depth:
type: string
shipping_category_id:
type: string
tax_category_id:
type: string
cost_currency:
type: string
cost_price:
type: string
compare_at_price:
type: string
option_type_ids:
type: string
taxon_ids:
type: string
public_metadata:
type: object
private_metadata:
type: object
required:
- product
x-internal: false
update_product_params:
type: object
properties:
product:
type: object
properties:
name:
type: string
description:
type: string
available_on:
type: string
discontinue_on:
type: string
permalink:
type: string
meta_description:
type: string
meta_keywords:
type: string
price:
type: string
sku:
type: string
deleted_at:
type: string
prototype_id:
type: string
option_values_hash:
type: string
weight:
type: string
height:
type: string
width:
type: string
depth:
type: string
shipping_category_id:
type: string
tax_category_id:
type: string
cost_currency:
type: string
cost_price:
type: string
compare_at_price:
type: string
option_type_ids:
type: string
taxon_ids:
type: string
public_metadata:
type: object
private_metadata:
type: object
required:
- product
x-internal: false
create_promotion_params:
type: object
properties:
promotion:
type: object
required:
- name
properties:
name:
type: string
example: Promotions Used in 2021
description: Give the promotion a name.
code:
type: string
example: BLK-FRI
nullable: true
description: Set the promotion code. Promotions without a code are automatically
applied if the order meets the Promotion Rule requirements.
description:
type: string
example: Save today with discount code XYZ at checkout.
nullable: true
description: Give the promotion a description.
usage_limit:
type: integer
example: 100
nullable: true
description: If you wish you can set a usage limit for this promotion.
advertise:
type: boolean
starts_at:
type: string
format: date_time
nullable: true
description: Set a date and time that this promotion begins.
ends_at:
type: string
format: date_time
nullable: true
description: Set a date and time that this promotion ends.
store_ids:
type: array
items:
allOf:
- type: string
example: '2'
required:
- promotion
title: Create a Promotion
x-internal: false
update_promotion_params:
type: object
properties:
promotion:
type: object
properties:
name:
type: string
example: Promotions Used in 2021
description: Change the promotion a name.
code:
type: string
example: CYB-MON
nullable: true
description: Change or remove the promotion code. Promotions without
a code are automatically applied if the order meets the Promotion
Rule requirements.
description:
type: string
example: Save today with discount code XYZ at checkout.
nullable: true
description: Update the promotion a description.
usage_limit:
type: integer
example: 100
nullable: true
description: If you wish you can set a usage limit for this promotion.
advertise:
type: boolean
starts_at:
type: string
format: date_time
nullable: true
description: Set a date and time that this promotion begins.
ends_at:
type: string
format: date_time
nullable: true
description: Set a date and time that this promotion ends.
store_ids:
type: array
items:
allOf:
- type: string
example: '2'
required:
- promotion
title: Update a Promotion
x-internal: false
update_promotion_add_rule_params:
type: object
properties:
promotion:
type: object
properties:
promotion_rules_attributes:
type: array
items:
allOf:
- properties:
type:
type: string
example: Spree::Promotion::Rules::Country
enum:
- Spree::Promotion::Rules::Country
- Spree::Promotion::Rules::ItemTotal
- Spree::Promotion::Rules::Product
- Spree::Promotion::Rules::User
- Spree::Promotion::Rules::FirstOrder
- Spree::Promotion::Rules::UserLoggedIn
- Spree::Promotion::Rules::OneUsePerUser
- Spree::Promotion::Rules::Taxon
- Spree::Promotion::Rules::OptionValue
description: Set the Promotion Rule type.
preferred_country_id:
type: integer
example: 122
description: 'Each rule type has its own preferred attributes.
In this example we are setting the ID of the Country this
rule applies to. To learn more about Spree preferences visit
TODO: [LINK].'
required:
- promotion
title: Add a Rule to a Promotion
x-internal: false
update_promotion_update_rule_params:
type: object
properties:
promotion:
type: object
properties:
promotion_rules_attributes:
type: array
items:
allOf:
- properties:
id:
type: string
example: '22'
description: To update an existing Promotion Rule, you are required
to pass the ID of the rule you are updating.
type:
type: string
example: Spree::Promotion::Rules::Country
enum:
- Spree::Promotion::Rules::Country
- Spree::Promotion::Rules::ItemTotal
- Spree::Promotion::Rules::Product
- Spree::Promotion::Rules::User
- Spree::Promotion::Rules::FirstOrder
- Spree::Promotion::Rules::UserLoggedIn
- Spree::Promotion::Rules::OneUsePerUser
- Spree::Promotion::Rules::Taxon
- Spree::Promotion::Rules::OptionValue
description: Set the Promotion Rule type.
preferred_country_id:
type: integer
example: 143
description: 'Each rule type has its own preferred attributes.
In this example we are changing the ID of the Country this
rule applies to. To learn more about Spree preferences visit
TODO: [LINK].'
required:
- promotion
title: Update an existing Rule
x-internal: false
update_promotion_add_action_params:
type: object
properties:
promotion:
type: object
properties:
promotion_actions_attributes:
type: array
items:
allOf:
- properties:
type:
type: string
example: Spree::Promotion::Actions::CreateAdjustment
enum:
- Spree::Promotion::Actions::CreateAdjustment
- Spree::Promotion::Actions::CreateItemAdjustments
- Spree::Promotion::Actions::FreeShipping
- Spree::Promotion::Actions::CreateLineItems
description: Set the Promotion Action Type.
required:
- promotion
title: Add an Action to a Promotion
x-internal: false
update_promotion_action_calculator_params:
type: object
properties:
promotion:
type: object
properties:
promotion_actions_attributes:
type: array
items:
allOf:
- properties:
id:
type: string
example: '22'
description: To update an existing Promotion Action, you are
required to pass the ID of the action you wish to update.
calculator_attributes:
properties:
id:
type: string
example: '19'
description: To update an existing Action Calculator, you
are required to pass the ID of the calculator.
type:
type: string
example: Spree::Promotion::Actions::CreateAdjustment
enum:
- Spree::Promotion::Actions::CreateAdjustment
- Spree::Promotion::Actions::CreateItemAdjustments
- Spree::Promotion::Actions::CreateLineItems
- Spree::Promotion::Actions::FreeShipping
description: Set the Type of Promotion Action you wish to
use.
preferred_flat_percent:
type: integer
example: 10
description: In this example we are setting the preferred
flat percentage to `10`.
required:
- promotion
title: Update an Action Calculator
x-internal: false
update_promotion_change_calculator_params:
type: object
properties:
promotion:
type: object
properties:
promotion_actions_attributes:
type: array
items:
allOf:
- properties:
id:
type: string
example: '22'
description: To update an existing Promotion Action, you are
required to pass the ID of the Promotion Action.
calculator_attributes:
properties:
type:
type: string
example: Spree::Calculator::FlatPercentItemTotal
enum:
- Spree::Calculator::FlatPercentItemTotal
- Spree::Calculator::FlatRate
- Spree::Calculator::FlexiRate
- Spree::Calculator::TieredPercent
- Spree::Calculator::TieredFlatRate
- Spree::Calculator::PercentOnLineItem
description: 'To set the Promotion Action Calculator pass
the calculator type. Each Promotion action has certain
Calculators available, to learn more visit TODO: [LINK]'
required:
- promotion
title: Change an Action Calculator
x-internal: false
update_promotion_change_action_params:
type: object
properties:
promotion:
type: object
properties:
promotion_actions_attributes:
type: array
items:
allOf:
- properties:
id:
type: string
example: '22'
description: To update an existing Promotion Action, you are
required to pass the ID of the Promotion Action.
type:
type: string
example: Spree::Promotion::Actions::CreateAdjustment
enum:
- Spree::Promotion::Actions::CreateAdjustment
- Spree::Promotion::Actions::CreateItemAdjustments
- Spree::Promotion::Actions::CreateLineItems
- Spree::Promotion::Actions::FreeShipping
description: Set the Type of Promotion Action you wish to use.
required:
- promotion
title: Change an Action Type
x-internal: false
create_promotion_action_params:
type: object
properties:
promotion_action:
type: object
required:
- type
- promotion_id
properties:
type:
type: string
example: Spree::Promotion::Actions::CreateAdjustment
enum:
- Spree::Promotion::Actions::CreateAdjustment
- Spree::Promotion::Actions::CreateItemAdjustments
- Spree::Promotion::Actions::CreateLineItems
- Spree::Promotion::Actions::FreeShipping
description: Set the Type of Promotion Action you wish to use.
promotion_id:
type: string
example: '22'
description: Set the ID of the promotion this action belongs to.
required:
- promotion_action
title: Create a Promotion Action
x-internal: false
update_promotion_action_params:
type: object
properties:
promotion_action:
type: object
properties:
type:
type: string
example: Spree::Promotion::Actions::CreateAdjustment
enum:
- Spree::Promotion::Actions::CreateAdjustment
- Spree::Promotion::Actions::CreateItemAdjustments
- Spree::Promotion::Actions::CreateLineItems
- Spree::Promotion::Actions::FreeShipping
description: Set the Type of Promotion Action you wish to use.
required:
- promotion_action
title: Create a Promotion Action
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
example: 2021-PROMOS
nullable: true
description: Give this promotion category a code.
required:
- promotion_category
x-internal: false
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
example: 2021-PROMOS
nullable: true
description: Change or remove the code for this Promotion Category.
required:
- promotion_category
x-internal: false
create_promotion_rule_params:
type: object
properties:
promotion_rule:
type: object
required:
- type
- promotion_id
properties:
promotion_id:
type: string
example: '22'
description: Set the ID of the promotion this Promotion Rule belongs
to.
type:
type: string
example: Spree::Promotion::Rules::Country
enum:
- Spree::Promotion::Rules::Country
- Spree::Promotion::Rules::ItemTotal
- Spree::Promotion::Rules::Product
- Spree::Promotion::Rules::User
- Spree::Promotion::Rules::FirstOrder
- Spree::Promotion::Rules::UserLoggedIn
- Spree::Promotion::Rules::OneUsePerUser
- Spree::Promotion::Rules::Taxon
- Spree::Promotion::Rules::OptionValue
description: Set the Promotion Rule type.
required:
- promotion_rule
title: Create a Promotion Rule
x-internal: false
update_promotion_rule_params:
type: object
properties:
promotion_rule:
type: object
properties:
type:
type: string
example: Spree::Promotion::Rules::Country
enum:
- Spree::Promotion::Rules::Country
- Spree::Promotion::Rules::ItemTotal
- Spree::Promotion::Rules::Product
- Spree::Promotion::Rules::User
- Spree::Promotion::Rules::FirstOrder
- Spree::Promotion::Rules::UserLoggedIn
- Spree::Promotion::Rules::OneUsePerUser
- Spree::Promotion::Rules::Taxon
- Spree::Promotion::Rules::OptionValue
description: Set the Promotion Rule type.
required:
- promotion_rule
title: Create a Promotion Rule
x-internal: false
create_role_params:
type: object
properties:
role:
type: object
required:
- name
properties:
name:
type: string
example: vendor
required:
- zone
x-internal: false
update_role_params:
type: object
properties:
role:
type: object
properties:
name:
type: string
example: vendor
required:
- zone
x-internal: false
create_shipment_params:
type: object
properties:
shipment:
type: object
required:
- stock_location_id
- order_id
- variant_id
properties:
stock_location_id:
type: string
example: '101'
order_id:
type: string
example: '101'
variant_id:
type: string
example: '101'
quantity:
type: integer
example: 2
required:
- shipping_category
x-internal: false
update_shipment_params:
type: object
properties:
shipment:
type: object
properties:
tracking:
type: string
example: MY-TRACKING-REF-12324
required:
- shipping_category
x-internal: false
add_item_shipment_params:
type: object
properties:
shipment:
type: object
required:
- variant_id
properties:
variant_id:
type: string
example: '101'
quantity:
type: integer
example: 2
required:
- shipping_category
x-internal: false
remove_item_shipment_params:
type: object
properties:
shipment:
type: object
required:
- variant_id
properties:
variant_id:
type: string
example: '101'
quantity:
type: integer
example: 2
required:
- shipping_category
x-internal: false
create_shipping_category_params:
type: object
properties:
shipping_category:
type: object
required:
- name
properties:
name:
type: string
example: Another Category
required:
- shipping_category
x-internal: false
update_shipping_category_params:
type: object
properties:
shipping_category:
type: object
required:
- name
properties:
name:
type: string
example: Another Category
required:
- shipping_category
x-internal: false
create_shipping_method_params:
type: object
properties:
shipping_method:
type: object
required:
- name
- display_on
- shipping_category_ids
properties:
name:
type: string
example: DHL Express
admin_name:
type: string
example: DHL Area Code D
code:
type: string
example: DHL-A-D
tracking_url:
type: string
example: dhlexpress.com?tracking=
display_on:
type: string
example: both
enum:
- both
- back_end
- front_end
tax_category_id:
type: string
example: '1'
shipping_category_ids:
type: array
items:
allOf:
- type: string
example: '2'
calculator_attributes:
"$ref": "#/components/schemas/shipping_calculator_params"
public_metadata:
type: object
private_metadata:
type: object
required:
- shipping_method
x-internal: false
update_shipping_method_params:
type: object
properties:
shipping_method:
type: object
properties:
name:
type: string
example: DHL Express
admin_name:
type: string
example: DHL Area Code D
code:
type: string
example: DHL-A-D
tracking_url:
type: string
example: dhlexpress.com?tracking=
display_on:
type: string
example: both
enum:
- both
- back_end
- front_end
tax_category_id:
type: string
example: '1'
shipping_category_ids:
type: array
items:
allOf:
- type: string
example: '2'
calculator_attributes:
"$ref": "#/components/schemas/shipping_calculator_params"
public_metadata:
type: object
private_metadata:
type: object
required:
- shipping_method
x-internal: false
shipping_calculator_params:
type: object
properties:
type:
type: string
example: Spree::Calculator::Shipping::FlatPercentItemTotal
enum:
- Spree::Calculator::Shipping::DigitalDelivery
- Spree::Calculator::Shipping::FlatPercentItemTotal
- Spree::Calculator::Shipping::FlatRate
- Spree::Calculator::Shipping::FlexiRate
- Spree::Calculator::Shipping::PerItem
- Spree::Calculator::Shipping::PriceSack
required:
- type
x-internal: false
create_stock_item_params:
type: object
properties:
stock_item:
type: object
required:
- variant_id
- stock_location_id
- count_on_hand
properties:
variant_id:
type: string
example: '2'
stock_location_id:
type: string
example: '2'
count_on_hand:
type: number
example: 200
backorderable:
type: boolean
example: true
default: false
required:
- stock_item
x-internal: false
update_stock_item_params:
type: object
properties:
stock_item:
type: object
required:
- variant_id
- stock_location_id
- count_on_hand
properties:
variant_id:
type: string
example: '2'
stock_location_id:
type: string
example: '2'
count_on_hand:
type: number
example: 200
backorderable:
type: boolean
example: true
default: false
required:
- stock_item
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
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
create_store_credit_category_params:
type: object
properties:
store_credit_category:
type: object
required:
- name
properties:
name:
type: string
example: refunded
required:
- store_credit_category
x-internal: false
update_store_credit_category_params:
type: object
properties:
store_credit_category:
type: object
required:
- name
properties:
name:
type: string
example: refunded
required:
- store_credit_category
x-internal: false
create_store_credit_type_params:
type: object
properties:
store_credit_type:
type: object
required:
- name
properties:
name:
type: string
example: refunded
priority:
type: integer
example: 1
required:
- store_credit_type
x-internal: false
update_store_credit_type_params:
type: object
properties:
store_credit_type:
type: object
properties:
name:
type: string
example: refunded
priority:
type: integer
example: 1
required:
- store_credit_type
x-internal: false
create_store_credit_params:
type: object
properties:
store_credit:
type: object
required:
- user_id
- category_id
- type_id
- created_by_id
- currency
- store_id
- amount
properties:
user_id:
type: string
example: '2'
category_id:
type: string
example: '4'
created_by_id:
type: string
example: '5'
amount:
type: number
example: 25.0
amount_used:
type: number
example: 10.0
memo:
type: string
example: This credit was given as a refund
currency:
type: string
example: USD
amount_authorized:
type: number
example: 15.5
originator_id:
type: string
example: '3'
originator_type:
type: string
example: Refund
type_id:
type: string
example: '1'
store_id:
type: string
example: '2'
public_metadata:
type: object
private_metadata:
type: object
required:
- store_credit
x-internal: false
update_store_credit_params:
type: object
properties:
store_credit:
type: object
required:
- user_id
- category_id
- type_id
- created_by_id
- currency
- store_id
- amount
properties:
user_id:
type: string
example: '2'
category_id:
type: string
example: '4'
created_by_id:
type: string
example: '5'
amount:
type: number
example: 25.0
amount_used:
type: number
example: 10.0
memo:
type: string
example: This credit was given as a refund
currency:
type: string
example: USD
amount_authorized:
type: number
example: 15.5
originator_id:
type: string
example: '3'
originator_type:
type: string
example: Refund
type_id:
type: string
example: '1'
store_id:
type: string
example: '2'
public_metadata:
type: object
private_metadata:
type: object
required:
- store_credit
x-internal: false
create_tax_category_params:
type: object
properties:
tax_category:
type: object
required:
- name
properties:
name:
type: string
example: Clothing
is_default:
type: boolean
example: true
tax_code:
type: string
example: 1257L
description:
type: string
example: Men's, women's and children's branded clothing
required:
- tax_category
x-internal: false
update_tax_category_params:
type: object
properties:
tax_category:
type: object
required:
- name
properties:
name:
type: string
example: Clothing
is_default:
type: boolean
example: true
tax_code:
type: string
example: 1257L
description:
type: string
example: Men's, women's and children's branded clothing
required:
- tax_category
x-internal: false
create_tax_rate_params:
type: object
properties:
tax_rate:
type: object
required:
- amount
- calculator_attributes
- tax_category_id
properties:
amount:
type: number
example: 0.05
zone_id:
type: string
example: '2'
tax_category_id:
type: string
example: '1'
included_in_price:
type: boolean
example: true
name:
type: string
example: California
show_rate_in_label:
type: boolean
example: false
calculator_attributes:
type: object
properties:
type:
type: string
example: Spree::Calculator::FlatRate
preferences:
type: object
example:
amount: 0
currency: USD
required:
- tax_rate
x-internal: false
update_tax_rate_params:
type: object
properties:
tax_rate:
type: object
required:
- amount
- calculator_attributes
- tax_category_id
properties:
amount:
type: number
example: 0.05
zone_id:
type: string
example: '2'
tax_category_id:
type: string
example: '1'
included_in_price:
type: boolean
example: true
name:
type: string
example: California
show_rate_in_label:
type: boolean
example: false
calculator_attributes:
type: object
properties:
type:
type: string
example: Spree::Calculator::FlatRate
preferences:
type: object
example:
amount: 0
currency: USD
required:
- tax_rate
x-internal: false
create_taxon_params:
type: object
properties:
taxon:
type: object
required:
- name
- taxonomy_id
properties:
taxonomy_id:
type: string
parent_id:
type: string
name:
type: string
public_metadata:
type: object
example:
ability_to_recycle: 90%
private_metadata:
type: object
example:
profitability: 2
required:
- taxon
x-internal: false
update_taxon_params:
type: object
properties:
taxon:
type: object
properties:
taxonomy_id:
type: string
parent_id:
type: string
name:
type: string
public_metadata:
type: object
private_metadata:
type: object
required:
- taxon
x-internal: false
taxon_reposition:
type: object
properties:
taxon:
type: object
required:
- new_parent_id
- new_position_idx
properties:
new_parent_id:
type: integer
example: 1
description: The ID of the new target parent Taxon.
new_position_idx:
type: integer
example: 1
description: The new index position of the Taxon within the parent Taxon.
required:
- taxon
title: Reposition a Taxon
x-internal: false
create_taxonomy_params:
type: object
properties:
taxonomy:
type: object
required:
- name
properties:
name:
type: string
position:
type: integer
example: 2
description: 'Pass the position that you want this Taxonomy to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
public_metadata:
type: object
example:
ability_to_recycle: 90%
private_metadata:
type: object
example:
profitability: 2
required:
- taxonomy
x-internal: false
update_taxonomy_params:
type: object
properties:
taxonomy:
type: object
properties:
name:
type: string
position:
type: integer
example: 2
description: 'Pass the position that you want this Taxonomy to appear
in. (The list is not zero indexed, so the first item is position:
`1`)'
public_metadata:
type: object
example:
ability_to_recycle: 90%
private_metadata:
type: object
example:
profitability: 2
required:
- taxonomy
x-internal: false
create_user_params:
type: object
properties:
user:
type: object
required:
- email
- password
- password_confirmation
properties:
email:
type: string
first_name:
type: string
last_name:
type: string
password:
type: string
password_confirmation:
type: string
ship_address_id:
type: string
bill_address_id:
type: string
public_metadata:
type: object
private_metadata:
type: object
required:
- user
x-internal: false
update_user_params:
type: object
properties:
user:
type: object
properties:
email:
type: string
first_name:
type: string
last_name:
type: string
password:
type: string
password_confirmation:
type: string
ship_address_id:
type: string
bill_address_id:
type: string
public_metadata:
type: object
private_metadata:
type: object
required:
- user
x-internal: false
create_webhook_subscriber_params:
type: object
properties:
subscriber:
type: object
required:
- url
properties:
active:
type: boolean
example: true
default: false
subscriptions:
type: array
items:
allOf:
- type: string
example: order.completed
example:
- order.created
- order.completed
- product.updated
default: []
url:
type: string
example: https://www.url.com/
required:
- subscriber
x-internal: false
update_webhook_subscriber_params:
type: object
properties:
subscriber:
type: object
required:
- url
properties:
active:
type: boolean
example: true
default: false
subscriptions:
type: array
items:
allOf:
- type: string
example: order.completed
example:
- order.created
- order.completed
- product.updated
default: []
url:
type: string
example: https://www.url.com/
required:
- subscriber
x-internal: false
create_wishlist_params:
type: object
properties:
wishlist:
type: object
required:
- name
- user_id
properties:
name:
type: string
user_id:
type: string
is_default:
type: boolean
is_private:
type: boolean
required:
- wishlist
x-internal: false
update_wishlist_params:
type: object
properties:
wishlist:
type: object
properties:
name:
type: string
user_id:
type: string
is_default:
type: boolean
is_private:
type: boolean
required:
- wishlist
x-internal: false
create_wished_item_params:
type: object
properties:
wished_item:
type: object
required:
- wishlist_id
- variant_id
- quantity
properties:
wishlist_id:
type: string
variant_id:
type: string
quantity:
type: integer
description: Must be an integer greater than 0
required:
- wished_item
x-internal: false
update_wished_item_params:
type: object
properties:
wished_item:
type: object
required:
- wishlist_id
- variant_id
- quantity
properties:
wishlist_id:
type: string
variant_id:
type: string
quantity:
type: integer
description: Must be an integer greater than 0
required:
- wished_item
x-internal: false
create_zone_params:
type: object
properties:
zone:
type: object
required:
- name
properties:
name:
type: string
example: EU
description:
type: string
example: All countries in the EU
default_tax:
type: boolean
kind:
type: string
example: state
enum:
- state
- country
required:
- zone
x-internal: false
update_zone_params:
type: object
properties:
address:
type: object
properties:
name:
type: string
example: EU
description:
type: string
example: All countries in the EU
default_tax:
type: boolean
kind:
type: string
example: state
enum:
- state
- country
required:
- zone
x-internal: false
amount_param:
type: object
properties:
amount:
type: number
x-internal: false
coupon_code_param:
type: object
properties:
coupon_code:
type: string
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
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
validation_errors:
type: object
properties:
error:
type: string
errors:
type: object
required:
- error
- errors
x-internal: false