Wocart
Wocart API

Products

Server

List products

GET
https://api.wocart.store
/api/products
X-API-Key (header)

Returns a paginated list of products. Soft-deleted products are never returned. Each item includes variantsCount, totalInventory, primaryImage (its gallery's first image), and variants array.

List products › query Parameters

categoryId
​string
status
​string · enum
Enum values:
DRAFT
ACTIVE
ARCHIVED
visibility
​string
search
​string
limit
​integer · max: 100
Default: 50
offset
​integer | null · min: 0
Default: 0

List products › Responses

200

List of products

success
​boolean · required
​Product[] · required
count
​integer · required

Number of items returned


Create product

POST
https://api.wocart.store
/api/products
X-API-Key (header)

Creates a product. SKU rules: simple products (hasVariants=false, the default) must include sku. Variant products (hasVariants=true) must omit sku here — set it on each variant instead. Returns the full product record including empty variants and images arrays.

Create product › Request Body

name
​string · minLength: 1 · required
price
​integer · min: 0 · required
description
​string · maxLength: 100000
descriptionFormat
​string · enum
Enum values:
text
html
handle
​string
compareAtPrice
​integer · min: 0
costPrice
​integer · min: 0
type
​string · enum
Enum values:
PHYSICAL
DIGITAL
Default: PHYSICAL
hasVariants
​boolean
Default: false
​array | null
sku
​string · minLength: 1
inventory
​integer · min: 0
Default: 0
lowStockThreshold
​integer · min: 0
Default: 5
trackInventory
​boolean
Default: true
categoryId
​string | null
tags
​string[]
visibility
​boolean
Default: true
status
​string · enum
Enum values:
DRAFT
ACTIVE
ARCHIVED
Default: ACTIVE
showInStore
​boolean
Default: true
collectionIds
​string[] · maxItems: 100
shippingProfileId
​string | null
metaTitle
​string | null · maxLength: 60
metaDescription
​string | null · maxLength: 160

Create product › Responses

Product created

success
​boolean · required
​ProductDetail · required

List product images

GET
https://api.wocart.store
/api/products/{id}/images
X-API-Key (header)

Returns all images for a product ordered by position.

List product images › path Parameters

id
​string · required

Product ID

Product ID

List product images › Responses

200

List of product images ordered by position

success
​boolean · required
​ProductImage[] · required

Save product image

POST
https://api.wocart.store
/api/products/{id}/images
X-API-Key (header)

Attaches an uploaded image to a product by its Media Key. Upload it first: POST /api/media/uploads, send the file as the ticket says, then POST /api/media/uploads/{id}/complete.

Save product image › path Parameters

id
​string · required

Product ID

Product ID

Save product image › Request Body

mediaKey
​string · minLength: 1 · maxLength: 512 · required

A Media Key: the image's identity in the store's media. Never a URL.

altText
​string | null

Alt text for accessibility

position
​integer · min: 1

Where it goes, 1 = first; the images from there move down one. Omitted or past the end: last

Save product image › Responses

Image record created

success
​boolean · required
​ProductImage · required

Reorder product images

PATCH
https://api.wocart.store
/api/products/{id}/images/reorder
X-API-Key (header)

Sets the display order of a product's images. Send the complete ordered array of image IDs — every existing image ID must be included exactly once. The server assigns position 1, 2, 3… based on the array order. Returns the full reordered image list.

Reorder product images › path Parameters

id
​string · required

Product ID

Product ID

Reorder product images › Request Body

imageIds
​string[] · minItems: 1 · required

Complete ordered list of all image IDs for this product. All existing image IDs must be included — no duplicates, no omissions.

Reorder product images › Responses

Images reordered successfully. Returns updated image list in new order.

success
​boolean · required
​ProductImage[] · required

Delete product image

DELETE
https://api.wocart.store
/api/products/{id}/images/{imageId}
X-API-Key (header)

Removes the image from the product; its file is deleted once nothing else shows it. Variants that showed the image are left without one.

Delete product image › path Parameters

id
​string · required

Product ID

Product ID

imageId
​string · required

Image ID

Image ID

Delete product image › Responses

200

Image deleted

success
​boolean · required

Update product status

PATCH
https://api.wocart.store
/api/products/{id}/status
X-API-Key (header)

Dedicated endpoint for status-only updates. Setting ACTIVE auto-sets publishedAt.

Update product status › path Parameters

id
​string · required

Product ID

Product ID

Update product status › Request Body

status
​string · enum · required
Enum values:
DRAFT
ACTIVE
ARCHIVED

Update product status › Responses

200

Status updated. Returns full updated product record.

success
​boolean · required
​Product · required

Get product

GET
https://api.wocart.store
/api/products/{id}
X-API-Key (header)

Returns full product detail including category, variants, and images.

Get product › path Parameters

id
​string · required

Product ID

Product ID

Get product › Responses

200

Product detail

success
​boolean · required
​ProductDetail · required

Update product

PATCH
https://api.wocart.store
/api/products/{id}
X-API-Key (header)

Partial update — only include fields you want to change. Setting status to ACTIVE auto-sets publishedAt. Send variantOptions: null to clear all variant options when converting a variant product to simple.

Update product › path Parameters

id
​string · required

Product ID

Product ID

Update product › Request Body

name
​string · minLength: 1
description
​string · maxLength: 100000
descriptionFormat
​string · enum
Enum values:
text
html
handle
​string
price
​integer · min: 0
compareAtPrice
​integer | null · min: 0
costPrice
​integer | null · min: 0
type
​string · enum
Enum values:
PHYSICAL
DIGITAL
hasVariants
​boolean
​array | null
sku
​string · minLength: 1
inventory
​integer · min: 0
lowStockThreshold
​integer · min: 0
trackInventory
​boolean
categoryId
​string | null
tags
​string[]
visibility
​boolean
status
​string · enum
Enum values:
DRAFT
ACTIVE
ARCHIVED
showInStore
​boolean
collectionIds
​string[] · maxItems: 100
shippingProfileId
​string | null
metaTitle
​string | null · maxLength: 60
metaDescription
​string | null · maxLength: 160

Update product › Responses

200

Product updated. Returns full updated product record.

success
​boolean · required
​ProductDetail · required

Delete product

DELETE
https://api.wocart.store
/api/products/{id}
X-API-Key (header)

Removes the product for good — even one that orders hold — and frees its handle and SKU. Its variants, images, reviews, stock history, offers and landing pages go with it, and its image files once nothing else shows them. Order lines that sold it keep what was sold (name, variant label, SKU, price) and lose only the link; orders a landing page of it brought lose only that attribution. GET /products/{id}/removal says all of it beforehand.

Delete product › path Parameters

id
​string · required

Product ID

Product ID

Delete product › Responses

200

Product deleted

success
​boolean · required
message
​string · required

What removing a product does

GET
https://api.wocart.store
/api/products/{id}/removal
X-API-Key (header)

What DELETE /products/{id} would take with it and what stays — read before asking the merchant to confirm.

What removing a product does › path Parameters

id
​string · required

Product ID

Product ID

What removing a product does › Responses

200

The product's removal

success
​boolean · required
​ProductRemoval · required

List product variants

GET
https://api.wocart.store
/api/products/{productId}/variants
X-API-Key (header)

Returns variants ordered by position, with parsed variations objects.

List product variants › path Parameters

productId
​string · required

Product ID

Product ID

List product variants › Responses

200

List of variants ordered by position

success
​boolean · required
​ProductVariant[] · required
count
​integer · required

Number of items returned


Create product variant

POST
https://api.wocart.store
/api/products/{productId}/variants
X-API-Key (header)

Create product variant › path Parameters

productId
​string · required

Product ID

Product ID

Create product variant › Request Body

​object · required
price
​integer · min: 0 · required
sku
​string · minLength: 1 · required
compareAtPrice
​integer | null · min: 0
barcode
​string | null
inventory
​integer · min: 0
Default: 0
lowStockThreshold
​integer · min: 0
Default: 5
weightKg
​number | null · min: 0
imageId
​string | null
isDefault
​boolean
Default: false
active
​boolean
Default: true
position
​integer · min: 1
Default: 1

Create product variant › Responses

Variant created

success
​boolean · required
​ProductVariant · required

Get product variant

GET
https://api.wocart.store
/api/products/{productId}/variants/{variantId}
X-API-Key (header)

Get product variant › path Parameters

productId
​string · required

Product ID

Product ID

variantId
​string · required

Variant ID

Variant ID

Get product variant › Responses

200

Variant detail

success
​boolean · required
​ProductVariant · required

Update product variant

PATCH
https://api.wocart.store
/api/products/{productId}/variants/{variantId}
X-API-Key (header)

Partial update — only include fields you want to change.

Update product variant › path Parameters

productId
​string · required

Product ID

Product ID

variantId
​string · required

Variant ID

Variant ID

Update product variant › Request Body

​object
price
​integer · min: 0
compareAtPrice
​integer | null · min: 0
sku
​string · minLength: 1
barcode
​string | null
inventory
​integer · min: 0
lowStockThreshold
​integer · min: 0
weightKg
​number | null · min: 0
imageId
​string | null
isDefault
​boolean
active
​boolean
position
​integer · min: 1

Update product variant › Responses

200

Variant updated

success
​boolean · required
​ProductVariant · required

Delete product variant

DELETE
https://api.wocart.store
/api/products/{productId}/variants/{variantId}
X-API-Key (header)

Permanently deletes the variant. Any order line items referencing this variant will have their variantId set to null — order history is fully preserved.

Delete product variant › path Parameters

productId
​string · required

Product ID

Product ID

variantId
​string · required

Variant ID

Variant ID

Delete product variant › Responses

Variant deleted

success
​boolean · required

Get a product's translations

GET
https://api.wocart.store
/api/products/{id}/translations
X-API-Key (header)

The translatable fields in the store's primary language and every stored translation, each flagged outdated when its source text changed after it was written.

Get a product's translations › path Parameters

id
​string · required

Get a product's translations › Responses

200

Source and translations

success
​boolean · required
​object · required

Translate a product into one language

PATCH
https://api.wocart.store
/api/products/{id}/translations
X-API-Key (header)

A JSON Merge Patch (RFC 7396) of one language: a string sets a field, null removes its translation, other fields are untouched. The language must be one the store has added, and not its primary — the resource's own fields hold that.

Translate a product into one language › path Parameters

id
​string · required

Translate a product into one language › Request Body

locale
​string · enum · required
Enum values:
ar
fr
en
​object · required

Translate a product into one language › Responses

200

Source and translations after the patch

success
​boolean · required
​object · required