A variant is a product’s size, colour or other combination that is bought on its own. It has its own SKU, prices, weight and descriptions, and borrows its product’s categories and shipping category; it has no custom fields and no tax category of its own. A cart adds a variant by its SKU exactly as it adds a product.
Variants
Product variants, the purchasable combinations of a product, each with its own SKU and prices.
About variants
List variants#
GET
/cdna-api/products/product-variants
Lists variants. Without limit every match comes back. The example asks for one product’s.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- ProductVariant, in the Reference
Parameters
propertiesquery- selector
- The fields and relations to return, such as
{id,code,name,finalPrice,published,product{id,code}}. filtersquery- name=value
- Any stored field, or a relation with a dot, such as
parent.id=12. Prefix the name with!,>,<,%or|. Use stored field names exactly as in the model, and comparetotalCountwith the unfiltered list's to confirm a filter applied. orderByquery- string
field:ASCorfield:DESC, comma-separated. Stored fields only.limitquery- integer
- Records per response. There is no default.
offsetquery- integer
- Records to skip.
Example
List variants
GET /cdna-api/products/product-variants?product.id=1&properties={id,code,name,finalPrice,published,product{id,code}} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response
200 OK
{
"result": "success",
"totalCount": 1,
"data": [
{
"id": 2,
"code": "API-SANDBOX-MUG-BLUE",
"name": "API sandbox mug, blue",
"finalPrice": "14.0000",
"published": "2026-10-18T01:26:49+00:00",
"product": {
"id": 1,
"code": "API-SANDBOX-MUG"
}
}
]
}
Real response from this documentation site
Show a variant#
GET
/cdna-api/products/product-variant/{id}
Reads one variant by its id.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- ProductVariant, in the Reference
Parameters
idpathrequired- integer
- The variant id.
propertiesquery- selector
- The fields and relations to return, such as
{id,code,name,finalPrice,published,product{id,code}}.
Example
Show a variant
GET /cdna-api/products/product-variant/2?properties={id,code,name,finalPrice,published,product{id,code}} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response
200 OK
{
"result": "success",
"data": {
"id": 2,
"code": "API-SANDBOX-MUG-BLUE",
"name": "API sandbox mug, blue",
"finalPrice": "14.0000",
"published": "2026-10-18T01:26:49+00:00",
"product": {
"id": 1,
"code": "API-SANDBOX-MUG"
}
}
}
Real response from this documentation site
Create a variant#
POST
/cdna-api/products/product-variant
Creates a variant.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Returns
- The new variant, in the fields
propertiesasks for, and amessage.
Parameters
productbodyrequired- integer
- The product it is a variant of.
codebodyrequired- string
- The SKU. Unique across every product and variant.
descriptionsbodyrequired- list
- The content per language: each with
language,nameandslug. At least one, in the site’s default language. pricingsbodyrequired- list
- One price row per currency:
currencyandbasePrice, optionallyspecialPrice,rrpandcostPrice. At least one, in the site’s default currency. publishedbody- datetime
truepublishes now, a future datetime schedules,nullunpublishes. Needs the publish permission.
Example
Create a variant
POST /cdna-api/products/product-variant?properties={id,code,name,published,finalPrice,product{id,code}} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"product": 1,
"code": "API-SANDBOX-MUG-BLUE",
"published": true,
"descriptions": [
{ "language": 47, "name": "API sandbox mug, blue", "slug": "api-sandbox-mug-blue" }
],
"pricings": [
{ "currency": 142, "basePrice": "14.00" }
]
}
Response
200 OK
{
"result": "success",
"data": {
"id": 2,
"code": "API-SANDBOX-MUG-BLUE",
"name": "API sandbox mug, blue",
"published": "2026-10-18T01:26:49+00:00",
"finalPrice": "14.00",
"product": {
"id": 1,
"code": "API-SANDBOX-MUG"
}
},
"message": "The Product Variant has been added successfully."
}
Real response from this documentation site
Edit a variant#
PUT
/cdna-api/products/product-variant/{id}
Changes a variant. Fields left out keep their values.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Returns
- The saved variant under
data.productVariant, and amessage.
Parameters
idpathrequired- integer
- The variant id.
purchasablebody- boolean
falsekeeps the product visible but not buyable.code, pricings, descriptions, publishedbody- As for Create a variant.
Example
Edit a variant
PUT /cdna-api/products/product-variant/8 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"purchasable": false
}Delete a variant#
DELETE
/cdna-api/products/product-variant/{id}
Deletes a variant.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
idpathrequired- integer
- The variant id.
Example
Delete a variant
DELETE /cdna-api/products/product-variant/8 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/jsonDuplicate a variant#
POST
/cdna-api/products/duplicate-product-variant/{id}
Copies a variant with its descriptions and prices. The copy’s SKU and slug get a -copy-N suffix, and it is unpublished.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Returns
- The copy under
data.productVariant, and amessage.
Parameters
idpathrequired- integer
- The variant id.
Example
Duplicate a variant
POST /cdna-api/products/duplicate-product-variant/8 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json