younifyd
Menu

Create a new shop product variant

Create a new shop product variant

POST/products/{productIdentifier}/variants

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Create a new shop product variant action (under Variants).
  3. Fill in the fields below, then reference the result from later steps as {{createANewShopProductVariant.response.data}}.

Request

Path parameters

productIdentifieroneOfrequired

Product ID or reference key. If you are using a reference key, it is highly recommended to use the encoded equal sign (%3D) instead of the plain =

Query parameters

updateIfExistsboolean

When set to true and a variant with the provided reference key already exists, then the existing variant is updated.

Default false

witharray<string>

Comma-separated list of additional properties that should be included in the response.

ignoreAttributeLocksboolean

If set to true, then even locked attributes get updated/deleted.

Default false

Request body

Enter the body as JSON in the step's Body field.

idinteger

ID assigned by SCAYLE.

referenceKeystringrequired

A key that uniquely identifies the variant of a product (usually an SKU) within the tenant's ecosystem.

merchantReferenceKeysarray<string>

A list of merchant reference keys the variant belongs to.

eanstring

An ean that refers to a product variant .

attributesarray<object>

A list of attributes attached to the product variant.

namestringrequired

The attribute name.

typestringrequired

The attribute type.

One ofsimplesimpleListlocalizedStringlocalizedStringListadvancedadvancedList

valueanyrequired

The attribute value where the datatype is defined by the type property.

isLockedboolean

Specifies if the attribute group should be locked.

shopCountrySpecificarray<object>4 fields

Used to override the attribute value for a specific shop country. Only supported by products, product masters and variants.

pricesarray<object>

A list of prices attached to the product variant.

keystring

Key assigned by SCAYLE.

priceintegerrequired

Price of the variant.

oldPriceinteger

Old price of the variant.

recommendedRetailPriceinteger

Recommended retail price of the variant.

buyingPriceinteger

Buying price of the variant.

taxnumber (double)required

A valid tax rate.

countryCodestringrequired

ISO 3166 alpha 2 country code.

currencyCodestringrequired

ISO 4217 currency code.

groupKeystring

Key of the group the price is assigned to.

promotionKeystring

Key of the promotion the price is assigned to.

unitPriceobject3 fields

Describes the unit price.

validFromstring (date-time)

Controls when the price will be activated. If not present or null, the valid from is specified from now.

validTostring (date-time)

Controls when the price will be deactivated. If not present or null, the price is valid forever.

merchantReferenceKeystring

A merchant reference key the price belongs to.

customDataany
stocksarray<object>

The product variant stock information.

quantityintegerrequired

Current quantity of SKU.

warehouseReferenceKeystringrequired

Reference key of warehouse for which the stock update is related to.

changedAtstring (date-time)required

Date time when the stock changed in Iso8601 format.

sellableWithoutStockboolean

Defines if the variant can be sold even when the available stock is 0.

Default false

merchantReferenceKeystring

A merchant reference key the stock belongs to.

expectedAvailabilityAtstring (date)

Date when the stock is expected to be available. If provided, it MUST be in the future.

customDataany
isCompositeboolean

Indicates whether the variant is composite.

relatedVariantsoneOf

A list of variants that belong to the composite variant. All variants in the list must use the same identification method, either all use variantId or all use variantReferenceKey. Empty arrays are allowed in responses.

json
{
  "referenceKey": "M0001-black-M",
  "id": 0,
  "merchantReferenceKeys": [
    "string"
  ],
  "ean": "0000007619991",
  "attributes": [
    {
      "name": "size",
      "type": "simple",
      "value": "M",
      "isLocked": false
    }
  ],
  "prices": [
    {
      "price": 9999,
      "tax": 19,
      "countryCode": "DE",
      "currencyCode": "EUR",
      "key": "1-100",
      "oldPrice": 10999,
      "recommendedRetailPrice": 9999,
      "buyingPrice": 9999,
      "groupKey": "myPriceGroup",
      "promotionKey": "myPromotion",
      "unitPrice": {
        "unit": "ml",
        "amount": 100,
        "price": 999
      },
      "validFrom": "2021-09-23T11%3A30%3A58%2B00%3A00"
    }
  ],
  "stocks": [
    {
      "quantity": 27,
      "warehouseReferenceKey": "DefaultWarehouse",
      "changedAt": "2020-07-23T11%3A30%3A58%2B00%3A00",
      "sellableWithoutStock": true,
      "merchantReferenceKey": "string",
      "expectedAvailabilityAt": "2020-07-23"
    }
  ],
  "customData": null,
  "isComposite": false,
  "relatedVariants": null
}

Response

Returns 200 with an object. Read it in later steps with {{createANewShopProductVariant.response.data.<field>}}.

idinteger

ID assigned by SCAYLE.

referenceKeystring

A key that uniquely identifies the variant of a product (usually an SKU) within the tenant's ecosystem.

merchantReferenceKeysarray<string>

A list of merchant reference keys the variant belongs to.

eanstring

An ean that refers to a product variant .

attributesarray<object>

A list of attributes attached to the product variant.

namestringrequired

The attribute name.

typestringrequired

The attribute type.

One ofsimplesimpleListlocalizedStringlocalizedStringListadvancedadvancedList

valueanyrequired

The attribute value where the datatype is defined by the type property.

isLockedboolean

Specifies if the attribute group should be locked.

shopCountrySpecificarray<object>4 fields

Used to override the attribute value for a specific shop country. Only supported by products, product masters and variants.

pricesarray<object>

A list of prices attached to the product variant.

keystring

Key assigned by SCAYLE.

priceintegerrequired

Price of the variant.

oldPriceinteger

Old price of the variant.

recommendedRetailPriceinteger

Recommended retail price of the variant.

buyingPriceinteger

Buying price of the variant.

taxnumber (double)required

A valid tax rate.

countryCodestringrequired

ISO 3166 alpha 2 country code.

currencyCodestringrequired

ISO 4217 currency code.

groupKeystring

Key of the group the price is assigned to.

promotionKeystring

Key of the promotion the price is assigned to.

unitPriceobject3 fields

Describes the unit price.

validFromstring (date-time)

Controls when the price will be activated. If not present or null, the valid from is specified from now.

validTostring (date-time)

Controls when the price will be deactivated. If not present or null, the price is valid forever.

merchantReferenceKeystring

A merchant reference key the price belongs to.

customDataany
stocksarray<object>

The product variant stock information.

quantityintegerrequired

Current quantity of SKU.

warehouseReferenceKeystringrequired

Reference key of warehouse for which the stock update is related to.

changedAtstring (date-time)required

Date time when the stock changed in Iso8601 format.

sellableWithoutStockboolean

Defines if the variant can be sold even when the available stock is 0.

Default false

merchantReferenceKeystring

A merchant reference key the stock belongs to.

expectedAvailabilityAtstring (date)

Date when the stock is expected to be available. If provided, it MUST be in the future.

customDataany
isCompositeboolean

Indicates whether the variant is composite.

relatedVariantsoneOf

A list of variants that belong to the composite variant. All variants in the list must use the same identification method, either all use variantId or all use variantReferenceKey. Empty arrays are allowed in responses.

json
{
  "referenceKey": "M0001-black-M",
  "id": 0,
  "merchantReferenceKeys": [
    "string"
  ],
  "ean": "0000007619991",
  "attributes": [
    {
      "name": "size",
      "type": "simple",
      "value": "M",
      "isLocked": false
    }
  ],
  "prices": [
    {
      "price": 9999,
      "tax": 19,
      "countryCode": "DE",
      "currencyCode": "EUR",
      "key": "1-100",
      "oldPrice": 10999,
      "recommendedRetailPrice": 9999,
      "buyingPrice": 9999,
      "groupKey": "myPriceGroup",
      "promotionKey": "myPromotion",
      "unitPrice": {
        "unit": "ml",
        "amount": 100,
        "price": 999
      },
      "validFrom": "2021-09-23T11%3A30%3A58%2B00%3A00"
    }
  ],
  "stocks": [
    {
      "quantity": 27,
      "warehouseReferenceKey": "DefaultWarehouse",
      "changedAt": "2020-07-23T11%3A30%3A58%2B00%3A00",
      "sellableWithoutStock": true,
      "merchantReferenceKey": "string",
      "expectedAvailabilityAt": "2020-07-23"
    }
  ],
  "customData": null,
  "isComposite": false,
  "relatedVariants": null
}

Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.