It is a simple and straightforward way to add new product variant linked to a specified main product based on productIdentifier
paramater.
If the given main product is a simple product
, by adding a variant product it is automatically upgraded to a complex product
.
The product_identifier.
[Optional] Only provide if you have access to multiple user accounts.
Product variant properties.
required only if type
is simple
variant prices
provide country code
provide currency code
the publicly available price for this product
this property is not necessary if type
is complex
the amount of stock available
required only if type
is simple
required only if type
is simple
prohibited if type
is complex
and required if type
is simple
unspsc
and mpn
must be provided
required only if type
is unspsc
curl --request POST \--url https://api.axiomdata.io/api/suppliers/products/nmvkjnljhn/variants \--header 'Authorization: Bearer undefined' \--header 'Content-Type: application/json' \--header 'UserAccountId: ' \--data '{"variant_identifier": "string","name": "string","brand": "string","manufacturer": "string","sku": "string","language_code": "en","product_page_url": "https://axiomdata.com","prices": [{"price": 0,"country": "de","currency": "eur","store_id": 0,"public_price": 0}],"stocks": [{"country_code": "AU","lead_time_days": 0,"stock": 1,"always_available": true}],"unit_label": "string","unit_size": "string","categories": ["Home","Blotting Apparatus"],"properties": "{'\''tests'\'': '\''tube2'\''}","codes": [{"code": "string","type": "upc","version": "string"}],"shipping_detail": [{"weight": {"unit": "cm","value": 12.11},"length": {"unit": "cm","value": 13.5},"width": {"unit": "cm","value": 27.5},"height": {"unit": "lb","value": 21.1},"country_code": "AU"}],"document_urls": [{"name": "Axiom Site","url": "https://axiomdata.com"}],"image_urls": ["https://axiomdata.com","https://url.com"],"options": [{"name": "color","value": "red"},{"name": "size","value": "small"}]}'
1{2"id": 14771,3"name": "variant",4"created_at": "2024-05-21T05:57:12.000000Z",5"updated_at": "2024-05-21T05:57:12.000000Z",6"description": "",7"variant_identifier": "we_variant",8"unit_size": "AE",9"unit_label": "EA",10"uuid": "4dd9f3ce-d7fe-4804-9be2-099555820994",11"product_page_url": null,12"brand": "test",13"sku": "variant",14"codes": [15{16"id": 45507,17"type": "MPN",18"code": "45743734-1",19"is_automatic": false,20"created_at": "2024-05-21T05:57:12.000000Z",21"updated_at": "2024-05-21T05:57:12.000000Z"22},23{24"id": 45508,25"type": "UNSPSC",26"code": "41100000",27"is_automatic": false,28"created_at": "2024-05-21T05:57:12.000000Z",29"updated_at": "2024-05-21T05:57:12.000000Z"30}31],32"image_urls": [33{34"id": 124936,35"name": null,36"type": "image",37"url": "https://us.vwr.com/stibo/bigweb/std.lang.all/13/56/13411356.jpg",38"created_at": "2024-05-21T05:57:12.000000Z",39"updated_at": "2024-05-21T05:57:12.000000Z"40}41],42"document_urls": [43{44"id": 124937,45"name": "Variant Doc url",46"type": "document",47"url": "https::google.com",48"created_at": "2024-05-21T05:57:12.000000Z",49"updated_at": "2024-05-21T05:57:12.000000Z"50}51],52"options": [53{54"id": 14807,55"name": "option_name",56"value": "option_value",57"created_at": "2024-05-21T05:57:12.000000Z",58"updated_at": "2024-05-21T05:57:12.000000Z"59}60],61"product_identifier": "ctairngvzfdxmvcr"62}