Skip to main content

Create Product Variant

POST 

/commerce/products/:productId/variants

Create product for a specified connection

Request

Path Parameters

    productId stringrequired

    ID of the product which the variant will be added to

Query Parameters

    credentialId stringrequired

    The ID of the credential.

Header Parameters

    Authorization stringrequired

    Default value: bearer YOUR_API_KEY

Body

    price doublerequired

    The price of the variant.

    sku stringrequired

    The SKU (stock-keeping unit) of the variant.

    optionValues

    object[]

    required

    An array of objects containing the option name and value for the variant.

  • Array [

  • name stringrequired
    value stringrequired
  • ]

  • weight

    object

    required

    An object containing the weight value and unit of measure for the variant.

    value stringrequired
    unit stringrequired
    remoteFields json

    An object containing remote fields that are not supported by the common model. The keys are the names of the fields of the corresponding resource in the remote app, and the values can be strings, numbers, arrays or objects.

Responses

200

Schema

    any

Loading...