Request

Security
OAuth2(Required scopes: FullAccessProductAdmin)
Path
productIDstringrequired

ID of the product.

Query
overwriteExistingboolean

Overwrite existing of the product.

Default:false
Bodyapplication/jsonrequired
Activeboolean

Overrides the Active value inherited from the product when generating variants.

Default:true
Example:false
curl -i -X POST \
  'https://api.ordercloud.io/v1/products/{productID}/variants/generate?overwriteExisting=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Active": false
  }'

Responses

Bodyapplication/json
OwnerIDstring

ID of the organization that owns the product. Only the marketplace owner can override the OwnerID on create.

Example:""
DefaultPriceScheduleIDstring

When provided, no explicit price schedule assignment is required. When a price schedule assignment exists, it will override any default provided.

Example:""
AutoForwardboolean

If true, when this product is ordered by a buyer, it will automatically be added to a new order from the marketplace owner to the default supplier and submitted. Requires a valid DefaultSupplierID.

Example:false
IDstring, <= 100 characters
Example:""
ParentIDstring

ID of the parent product. If not null, IsParent should be false

Example:""
IsParentboolean

If true, ParentID must be null, as a parent product cannot have a parent itself.

Example:false
IsBundlebooleanread-only

If true, IsParent must be false, as a parent product cannot be a bundle.

Example:false
Namestring, <= 100 characters
Example:""
Descriptionstring, <= 2000 characters
Example:""
QuantityMultiplierinteger, (int32), >= 1

For reference only, does not influence any OrderCloud behavior. Used to indicate an amount per Quantity.

Default:1
Example:0
ShipWeightnumber, (float)
Example:0
ShipHeightnumber, (float)
Example:0
ShipWidthnumber, (float)
Example:0
ShipLengthnumber, (float)
Example:0
Activeboolean

If false, product is not visible or purchasable from a buyer's perspective.

Example:false
SpecCountinteger, (int32)read-only

Count of specs assigned to the product.

Example:0
VariantCountinteger, (int32)read-only

Count of variants generated from the product/spec combinations.

Example:0
ShipFromAddressIDstring

Marketplace owner or supplier AddressID where the product will be shipped from. Can be used to calculate shipping costs.

Example:""
Inventoryobject(Inventory)
Example:
{ "Enabled": false, "NotificationPoint": 0, "VariantLevelTracking": false, "OrderCanExceed": false, "QuantityAvailable": 0, "LastUpdated": "2018-01-01T00:00:00-06:00" }
DefaultSupplierIDstring

Used for forwarding orders to suppliers.

Example:""
AllSuppliersCanSellboolean

If true, all suppliers are eligible to opt into selling this product.

Example:false
Returnableboolean
Example:false
DateCreatedstring, (date-time)read-only
Example:"2018-01-01T00:00:00-06:00"
xpobject
Example:
{}
Response
{ "OwnerID": "", "DefaultPriceScheduleID": "", "AutoForward": false, "ID": "", "ParentID": "", "IsParent": false, "IsBundle": false, "Name": "", "Description": "", "QuantityMultiplier": 0, "ShipWeight": 0, "ShipHeight": 0, "ShipWidth": 0, "ShipLength": 0, "Active": false, "SpecCount": 0, "VariantCount": 0, "ShipFromAddressID": "", "Inventory": { "Enabled": false, "NotificationPoint": 0, "VariantLevelTracking": false, "OrderCanExceed": false, "QuantityAvailable": 0, "LastUpdated": "2018-01-01T00:00:00-06:00" }, "DefaultSupplierID": "", "AllSuppliersCanSell": false, "Returnable": false, "DateCreated": "2018-01-01T00:00:00-06:00", "xp": {} }