Get a product
GET
/api/v1/commerce/products/{id}
const url = 'https://digize.com/api/v1/commerce/products/example';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/commerce/products/example \ --header 'x-api-key: <x-api-key>'One product with its variants, stock and recent sales.
Needs the commerce:read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”Done
Media typeapplication/json
object
id
required
string
slug
required
string
name
required
string
category
required
string
type
required
string
status
required
string
color
required
string
description
required
string
vendor
required
string
tags
required
Array<string>
options
required
Array<object>
object
name
required
string
values
required
Array<string>
variants
required
Array<object>
object
id
required
string
sku
required
string
label
required
“12 oz · Whole bean”, or “Default” for a product with one variant.
string
options
required
Array<string>
price
required
number
cost
required
number
onHand
required
On hand at the locations that ship online orders.
number
reserved
required
Held by open checkouts for 30 minutes.
number
reorderAt
required
number
compareAtPrice
required
number | null
barcode
required
string
weight
required
In grams.
number
imageId
required
string | null
channels
required
Array<string>
chargeTax
required
boolean
continueSelling
required
boolean
seo
required
object
title
required
string
description
required
string
images
required
Array<object>
object
imageId
required
string
alt
required
string
thumb
required
string
url
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
sold
required
Units sold in the last 30 days.
number
revenue
required
Net sales in the last 30 days.
number
trend
required
Units sold per week, the last 12 weeks.
Array<number>
Example
{ "type": "physical", "status": "active", "color": "primary", "channels": [ "storefront" ], "subscription": { "interval": "week" }}What was sent isn’t valid (invalid).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}