Shoplazza Product API
The Product API from Shoplazza — 21 operation(s) for product.
The Product API from Shoplazza — 21 operation(s) for product.
openapi: 3.1.0
info:
title: SPZ Admin Access Product API
version: '2022.01'
servers:
- url: https://{subdomain}.myshoplaza.com
variables:
subdomain:
default: developer
security:
- sec0: []
tags:
- name: Product
description: ''
paths:
/openapi/2022-01/products:
get:
tags:
- Product
summary: Product List
description: ''
operationId: product_list
parameters:
- name: ids
in: query
description: 'Product''s IDs, separated by comma, for example: `9e79ca1f-9ff2-409b-976f-98be343d38a3,9e79ca1f-9ff2-409b-976f-98be343d38ae`'
schema:
type: string
- name: title
in: query
description: product's title
schema:
type: string
- name: collection_id
in: query
description: 'Collection UUID, for example: `9e79ca1f-9ff2-409b-976f-98be343d38a3`'
schema:
type: string
- name: created_at_min
in: query
description: 'filter products created at or after date, for example: `2018-10-01T16:15:47-04:00`'
schema:
type: string
- name: created_at_max
in: query
description: 'filter products created at or before date, for example: `2018-10-01T16:15:47-04:00`'
schema:
type: string
- name: updated_at_min
in: query
description: 'filter products last updated at or after date, for example: `2018-10-01T16:15:47-04:00`'
schema:
type: string
- name: updated_at_max
in: query
description: 'filter products last updated at or before date, for example: `2018-10-01T16:15:47-04:00`'
schema:
type: string
- name: published_at_min
in: query
description: 'filter products published at or after date, for example: `2018-10-01T16:15:47-04:00`'
schema:
type: string
- name: published_at_max
in: query
description: 'filter products published at or before date, for example: `2018-10-01T16:15:47-04:00`'
schema:
type: string
- name: published_status
in: query
description: 'filter by published status: `published`, `unpublished`, `any`'
schema:
type: string
- name: spus
in: query
description: 'Product''s SPUs, separated by comma, for example: `spu1,spu2`'
schema:
type: string
- name: pre_cursor
in: query
description: pre cursor-based pagination, please see https://www.shoplazza.dev/reference/cursor-pagination for more information
schema:
type: string
- name: cursor
in: query
description: cursor-based pagination, please see https://www.shoplazza.dev/reference/cursor-pagination for more information
schema:
type: string
- name: per_page
in: query
description: limit per page
schema:
type: integer
format: int32
default: 1
- name: fields
in: query
description: 'filter fields return in responses, separated by comma, for example: `title, id`'
schema:
type: string
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"cursor\": \"MjAyMS0wNy0wOVQwMToxNzowNFojN2JiMWUwMTUtMDVhMi00Yzk0LWIxNDktMTE1MDEzYmEwODEz\",\n \"pre_cursor\": \"MjAyMy0wNS0zMFQwNzozNzoyNVojYmIyZjJhMDgtYzdkNi00MTMzLTkzNmYtNWIzMDgxOGNhYmUz\",\n \"products\": [\n {\n \"id\": \"c1d5b2a3-fab1-4e26-8582-75d3b2677042\",\n \"title\": \"aasd\",\n \"brief\": \"asd\",\n \"description\": \"asd\",\n \"published\": false,\n \"requires_shipping\": false,\n \"taxable\": false,\n \"tags\": \"\",\n \"vendor\": \"asd\",\n \"vendor_url\": \"asd\",\n \"inventory_quantity\": 123,\n \"published_at\": null,\n \"created_at\": \"2022-01-10T06:11:45Z\",\n \"updated_at\": \"2022-01-10T06:11:45Z\",\n \"note\": \"asd\",\n \"seo_title\": \"asd\",\n \"seo_description\": \"asd\",\n \"seo_keywords\": \"asd\",\n \"handle\": \"asd-bkpq\",\n \"has_only_default_variant\": false,\n \"inventory_tracking\": false,\n \"inventory_policy\": \"continue\",\n \"need_variant_image\": false,\n \"spu\": \"asd\",\n \"fake_sales\": 123,\n \"display_fake_sales\": false,\n \"image\": {\n \"src\": \"//cdn.shoplazza.com/shirt.png\",\n \"width\": 100,\n \"height\": 100,\n \"alt\": \"\",\n \"path\": \"shirt.png\"\n },\n \"images\": [\n {\n \"id\": \"fe0ae4b6-cb7b-4d1c-a7f0-727750b73d16\",\n \"product_id\": \"c1d5b2a3-fab1-4e26-8582-75d3b2677042\",\n \"position\": 1,\n \"src\": \"//cdn.shoplazza.com/shirt.png\",\n \"width\": 100,\n \"height\": 100,\n \"alt\": \"\",\n \"created_at\": \"2022-01-10T06:11:45Z\",\n \"updated_at\": \"2022-01-10T06:11:45Z\"\n }\n ],\n \"options\": [\n {\n \"id\": \"b5109277-0daa-42f5-afa3-1bb609d13199\",\n \"product_id\": \"c1d5b2a3-fab1-4e26-8582-75d3b2677042\",\n \"position\": 1,\n \"name\": \"qwe\",\n \"values\": [\n \"qwe\"\n ]\n }\n ],\n \"variants\": [\n {\n \"id\": \"8ecc0550-fb48-4860-9bb3-9b85e3c2b44a\",\n \"product_id\": \"c1d5b2a3-fab1-4e26-8582-75d3b2677042\",\n \"image_id\": \"\",\n \"created_at\": \"2022-01-10T06:11:45Z\",\n \"updated_at\": \"2022-01-10T06:11:45Z\",\n \"title\": \"qwe\",\n \"option1\": \"qwe\",\n \"option2\": \"\",\n \"option3\": \"\",\n \"image\": null,\n \"position\": 1,\n \"compare_at_price\": \"132.00\",\n \"price\": \"123.00\",\n \"sku\": \"asd\",\n \"barcode\": \"asd\",\n \"note\": \"asd\",\n \"inventory_quantity\": 123,\n \"weight\": \"123\",\n \"weight_unit\": \"kg\",\n \"cost_price\": \"120.00\"\n }\n ]\n }\n ]\n}"
schema:
type: object
properties:
cursor:
type: string
example: MjAyMS0wNy0wOVQwMToxNzowNFojN2JiMWUwMTUtMDVhMi00Yzk0LWIxNDktMTE1MDEzYmEwODEz
pre_cursor:
type: string
example: MjAyMy0wNS0zMFQwNzozNzoyNVojYmIyZjJhMDgtYzdkNi00MTMzLTkzNmYtNWIzMDgxOGNhYmUz
products:
type: array
items:
type: object
properties:
id:
type: string
example: c1d5b2a3-fab1-4e26-8582-75d3b2677042
title:
type: string
example: aasd
brief:
type: string
example: asd
description:
type: string
example: asd
published:
type: boolean
example: false
default: true
requires_shipping:
type: boolean
example: false
default: true
taxable:
type: boolean
example: false
default: true
tags:
type: string
example: ''
vendor:
type: string
example: asd
vendor_url:
type: string
example: asd
inventory_quantity:
type: integer
example: 123
default: 0
published_at: {}
created_at:
type: string
example: '2022-01-10T06:11:45Z'
updated_at:
type: string
example: '2022-01-10T06:11:45Z'
note:
type: string
example: asd
seo_title:
type: string
example: asd
seo_description:
type: string
example: asd
seo_keywords:
type: string
example: asd
handle:
type: string
example: asd-bkpq
has_only_default_variant:
type: boolean
example: false
default: true
inventory_tracking:
type: boolean
example: false
default: true
inventory_policy:
type: string
example: continue
need_variant_image:
type: boolean
example: false
default: true
spu:
type: string
example: asd
fake_sales:
type: integer
example: 123
default: 0
display_fake_sales:
type: boolean
example: false
default: true
image:
type: object
properties:
src:
type: string
example: //cdn.shoplazza.com/shirt.png
width:
type: integer
example: 100
default: 0
height:
type: integer
example: 100
default: 0
alt:
type: string
example: ''
path:
type: string
example: shirt.png
images:
type: array
items:
type: object
properties:
id:
type: string
example: fe0ae4b6-cb7b-4d1c-a7f0-727750b73d16
product_id:
type: string
example: c1d5b2a3-fab1-4e26-8582-75d3b2677042
position:
type: integer
example: 1
default: 0
src:
type: string
example: //cdn.shoplazza.com/shirt.png
width:
type: integer
example: 100
default: 0
height:
type: integer
example: 100
default: 0
alt:
type: string
example: ''
created_at:
type: string
example: '2022-01-10T06:11:45Z'
updated_at:
type: string
example: '2022-01-10T06:11:45Z'
options:
type: array
items:
type: object
properties:
id:
type: string
example: b5109277-0daa-42f5-afa3-1bb609d13199
product_id:
type: string
example: c1d5b2a3-fab1-4e26-8582-75d3b2677042
position:
type: integer
example: 1
default: 0
name:
type: string
example: qwe
values:
type: array
items:
type: string
example: qwe
variants:
type: array
items:
type: object
properties:
id:
type: string
example: 8ecc0550-fb48-4860-9bb3-9b85e3c2b44a
product_id:
type: string
example: c1d5b2a3-fab1-4e26-8582-75d3b2677042
image_id:
type: string
example: ''
created_at:
type: string
example: '2022-01-10T06:11:45Z'
updated_at:
type: string
example: '2022-01-10T06:11:45Z'
title:
type: string
example: qwe
option1:
type: string
example: qwe
option2:
type: string
example: ''
option3:
type: string
example: ''
image: {}
position:
type: integer
example: 1
default: 0
compare_at_price:
type: string
example: '132.00'
price:
type: string
example: '123.00'
sku:
type: string
example: asd
barcode:
type: string
example: asd
note:
type: string
example: asd
inventory_quantity:
type: integer
example: 123
default: 0
weight:
type: string
example: '123'
weight_unit:
type: string
example: kg
cost_price:
type: string
example: '120.00'
deprecated: false
post:
tags:
- Product
summary: Create Product
description: ''
operationId: create_product
requestBody:
content:
application/json:
schema:
type: object
properties:
product:
type: object
required:
- title
- has_only_default_variant
properties:
title:
type: string
description: Product's title
brief:
type: string
description: Product's briefing description
description:
type: string
description: Product's description
published:
type: boolean
description: whether it is published or not
requires_shipping:
type: boolean
description: whether it is required to shipping
taxable:
type: boolean
description: is it taxable?
tags:
type: string
description: 'tags, separated by comma, for example: `tag1,tag2`'
vendor:
type: string
description: vendor's name
vendor_url:
type: string
description: vendor's URL
note:
type: string
description: note
seo_title:
type: string
description: SEO title
seo_description:
type: string
description: SEO description
seo_keywords:
type: string
description: 'SEO keywords, separated by comma, for example: `key1,key2`'
handle:
type: string
description: product's handle
has_only_default_variant:
type: boolean
description: is it a single variant?
inventory_tracking:
type: boolean
description: whether to tracking inventory
inventory_policy:
type: string
description: 'inventory policy: `continue`, `deny`, `auto_unpublished`, required while `inventory_tracking` is true'
need_variant_image:
type: boolean
description: whether variant image is needed. It's required if `has_only_default_variant` is false
spu:
type: string
description: product's SPU
fake_sales:
type: integer
description: product's fake sales
format: int32
display_fake_sales:
type: boolean
description: whether to display fake sales
options:
type: array
items:
properties:
name:
type: string
description: Option's name (eg. "color","size")
values:
type: array
description: 'Option''s values, for example: `["red", "black"]`,`["small", "large"]`'
default: []
items:
type: string
required:
- name
- values
type: object
images:
type: array
items:
properties:
src:
type: string
description: Image's URL
width:
type: integer
description: Image's width in px
format: int32
height:
type: integer
description: Image's height in px
format: int32
alt:
type: string
description: Image's alt
required:
- src
type: object
variants:
type: array
items:
properties:
option1:
type: string
description: Option 1
option2:
type: string
description: Option 2
option3:
type: string
description: Option 3
image:
type: object
description: 'variant''s images, e.g.: `{"src":"//cn.cdn.shoplazza.com/c8bf5695d347092d7a010f00182581f7.jpeg"}`'
properties:
src:
type: string
description: Image's URL
width:
type: integer
description: 'Image''s width, in px, for example: `400`'
format: int32
height:
type: integer
description: 'Image''s height, in px, for example: `300`'
format: int32
alt:
type: string
description: Image's alt
compare_at_price:
type: string
description: compare at price ( original price )
price:
type: string
description: price, set it to "0.00" if you want to leave the price empty.
sku:
type: string
description: SKU
barcode:
type: string
description: bar code
note:
type: string
description: note
inventory_quantity:
type: integer
description: inventory quantity
format: int32
weight:
type: string
description: weight
weight_unit:
type: string
description: 'unit of weight, possible value are: `kg`, `g`, `lb`, `oz`'
cost_price:
type: string
description: cost price
required:
- price
type: object
metafield:
type: array
items:
properties:
namespace:
type: string
description: namespace for meta field
value:
type: string
description: meta field's value
value_type:
type: string
description: meta field's value type, like "integer"
key:
type: string
description: meta field's key
description:
type: string
description: meta field's description
required:
- namespace
- value
- value_type
- key
type: object
unique_token:
type: string
description: 'unique_token is a unique string identifier generated by your app, for example: e6cc4df1-d4f5-4ad4-a019-2e0f3ddd6e63'
responses:
'200':
description: '200'
content:
application/json:
examples:
Result:
value: "{\n \"product\": {\n \"id\": \"c1d5b2a3-fab1-4e26-8582-75d3b2677042\",\n \"title\": \"aasd\",\n \"brief\": \"asd\",\n \"description\": \"asd\",\n \"published\": false,\n \"requires_shipping\": false,\n \"taxable\": false,\n \"tags\": \"\",\n \"vendor\": \"asd\",\n \"vendor_url\": \"asd\",\n \"inventory_quantity\": 123,\n \"published_at\": null,\n \"created_at\": \"2022-01-10T06:11:45Z\",\n \"updated_at\": \"2022-01-10T06:11:45Z\",\n \"note\": \"asd\",\n \"seo_title\": \"asd\",\n \"seo_description\": \"asd\",\n \"seo_keywords\": \"asd\",\n \"handle\": \"asd-bkpq\",\n \"has_only_default_variant\": false,\n \"inventory_tracking\": false,\n \"inventory_policy\": \"continue\",\n \"need_variant_image\": false,\n \"spu\": \"asd\",\n \"fake_sales\": 123,\n \"display_fake_sales\": false,\n \"image\": {\n \"src\": \"//cdn.shoplazza.com/shirt.png\",\n \"width\": 100,\n \"height\": 100,\n \"alt\": \"\",\n \"path\": \"shirt.png\"\n },\n \"images\": [\n {\n \"id\": \"fe0ae4b6-cb7b-4d1c-a7f0-727750b73d16\",\n \"product_id\": \"c1d5b2a3-fab1-4e26-8582-75d3b2677042\",\n \"position\": 1,\n \"src\": \"//cdn.shoplazza.com/shirt.png\",\n \"width\": 100,\n \"height\": 100,\n \"alt\": \"\",\n \"created_at\": \"2022-01-10T06:11:45Z\",\n \"updated_at\": \"2022-01-10T06:11:45Z\"\n }\n ],\n \"options\": [\n {\n \"id\": \"b5109277-0daa-42f5-afa3-1bb609d13199\",\n \"product_id\": \"c1d5b2a3-fab1-4e26-8582-75d3b2677042\",\n \"position\": 1,\n \"name\": \"qwe\",\n \"values\": [\n \"qwe\"\n ]\n }\n ],\n \"variants\": [\n {\n \"id\": \"8ecc0550-fb48-4860-9bb3-9b85e3c2b44a\",\n \"product_id\": \"c1d5b2a3-fab1-4e26-8582-75d3b2677042\",\n \"image_id\": \"\",\n \"created_at\": \"2022-01-10T06:11:45Z\",\n \"updated_at\": \"2022-01-10T06:11:45Z\",\n \"title\": \"qwe\",\n \"option1\": \"qwe\",\n \"option2\": \"\",\n \"option3\": \"\",\n \"image\": null,\n \"position\": 1,\n \"compare_at_price\": \"132.00\",\n \"price\": \"123.00\",\n \"sku\": \"asd\",\n \"barcode\": \"asd\",\n \"note\": \"asd\",\n \"inventory_quantity\": 123,\n \"weight\": \"123\",\n \"weight_unit\": \"kg\",\n \"cost_price\": \"120.00\"\n }\n ]\n }\n}"
schema:
type: object
properties:
product:
type: object
properties:
id:
type: string
example: c1d5b2a3-fab1-4e26-8582-75d3b2677042
title:
type: string
example: aasd
brief:
type: string
example: asd
description:
type: string
example: asd
published:
type: boolean
example: false
default: true
requires_shipping:
type: boolean
example: false
default: true
taxable:
type: boolean
example: false
default: true
tags:
type: string
example: ''
vendor:
type: string
example: asd
vendor_url:
type: string
example: asd
inventory_quantity:
type: integer
example: 123
default: 0
published_at: {}
created_at:
type: string
example: '2022-01-10T06:11:45Z'
updated_at:
type: string
example: '2022-01-10T06:11:45Z'
note:
type: string
example: asd
seo_title:
type: string
example: asd
seo_description:
type: string
example: asd
seo_keywords:
type: string
example: asd
handle:
type: string
example: asd-bkpq
has_only_default_variant:
type: boolean
example: false
default: true
inventory_tracking:
type: boolean
example: false
default: true
inventory_policy:
type: string
example: continue
need_variant_image:
type: boolean
example: false
default: true
spu:
type: string
example: asd
fake_sales:
type: integer
example: 123
default: 0
display_fake_sales:
# --- truncated at 32 KB (168 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/shoplazza/refs/heads/main/openapi/shoplazza-product-api-openapi.yml