A product with its variants, stock and media
GET
/api/v1/workspaces/{workspaceId}/products/{productId}
const url = 'https://api.crossmart.io/api/v1/workspaces/example/products/example';const options = {method: 'GET'};
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://api.crossmart.io/api/v1/workspaces/example/products/exampleParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspaceId
required
string
productId
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
id
required
string format: uuid
handle
required
string
title
required
string
descriptionHtml
required
string
vendor
required
string
productType
required
string
tags
required
Array<string>
status
required
string
optionNames
required
Array<string>
variants
required
Array<object>
object
id
required
string format: uuid
position
required
number
sku
required
string
barcode
required
GTIN, UPC, EAN or ISBN
string
optionValues
required
One value per product option, in order
Array<string>
price
required
Decimal string in the workspace currency
string
compareAtPrice
required
string
cost
required
What you pay per unit; never shown to buyers
string
weightGrams
required
number
requiresShipping
required
boolean
taxable
required
boolean
outOfStockPolicy
required
string
tracked
required
Whether Crossmart tracks stock for this variant
boolean
available
required
number
media
required
Array<object>
object
id
required
string format: uuid
url
required
string
altText
required
string
position
required
number
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "status": "DRAFT", "optionNames": [ "Size", "Color" ], "variants": [ { "price": "89.00", "compareAtPrice": "99.00", "cost": "40.00", "outOfStockPolicy": "STOP_SELLING" } ]}