ReferenceProduct
Create a product unit
Adds a unit of measure to the product and returns it (201, `Location` header set). Requires `Permissions.Product.Create`.
POST
Bearerheader
AuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
productId*integerFormat
int32application/json- body
A unit of measure a product can be traded in, with its conversion to the base unit.
depth?|Format
decimaldepthInPackaging?|Format
decimaldepthInPackagingUnitId?|Format
int32depthUnitId?|Format
int32diameter?|Format
decimaldiameterInPackaging?|Format
decimaldiameterInPackagingUnitId?|Format
int32diameterUnitId?|Format
int32dimension?|Length
length <= 40dimensionUnitId?|Format
int32guid?|Format
guidheight?|Format
decimalheightInPackaging?|Format
decimalheightInPackagingUnitId?|Format
int32heightUnitId?|Format
int32id?|Format
int32isInvisible?boolean|nullproductId?|Format
int32quantityCoefficient?|Format
decimalunit?|DeprecatedFormat
int32unitId?|Format
int32unitOrder?|Format
int32volume?|Length
length <= 20volumeInPackaging?|Length
length <= 20volumeInPackagingUnitId?|Format
int32volumeUnitId?|Format
int32weight?|Format
decimalweightInPackaging?|Format
decimalweightInPackagingUnitId?|Format
int32weightUnitId?|Format
int32width?|Format
decimalwidthInPackaging?|Format
decimalwidthInPackagingUnitId?|Format
int32widthUnitId?|Format
int32application/json- response
A unit of measure a product can be traded in, with its conversion to the base unit.
depth?|Format
decimaldepthInPackaging?|Format
decimaldepthInPackagingUnitId?|Format
int32depthUnitId?|Format
int32diameter?|Format
decimaldiameterInPackaging?|Format
decimaldiameterInPackagingUnitId?|Format
int32diameterUnitId?|Format
int32dimension?|Length
length <= 40dimensionUnitId?|Format
int32guid?|Format
guidheight?|Format
decimalheightInPackaging?|Format
decimalheightInPackagingUnitId?|Format
int32heightUnitId?|Format
int32id?|Format
int32isInvisible?boolean|nullproductId?|Format
int32quantityCoefficient?|Format
decimalunit?|DeprecatedFormat
int32unitId?|Format
int32unitOrder?|Format
int32volume?|Length
length <= 20volumeInPackaging?|Length
length <= 20volumeInPackagingUnitId?|Format
int32volumeUnitId?|Format
int32weight?|Format
decimalweightInPackaging?|Format
decimalweightInPackagingUnitId?|Format
int32weightUnitId?|Format
int32width?|Format
decimalwidthInPackaging?|Format
decimalwidthInPackagingUnitId?|Format
int32widthUnitId?|Format
int32curl -X POST 'https://<your-instance>/api/products/0/units' \ -H 'Authorization: Bearer <access-token>' \ -H 'Content-Type: application/json' \ -d '{ "depth": 3, "depthInPackaging": 4, "depthInPackagingUnitId": 4, "depthUnitId": 4, "diameter": 2.5, "diameterInPackaging": 3, "diameterInPackagingUnitId": 4, "diameterUnitId": 4, "dimension": "10x5x3", "dimensionUnitId": 4, "height": 10, "heightInPackaging": 12, "heightInPackagingUnitId": 4, "heightUnitId": 4, "isInvisible": false, "productId": 123, "quantityCoefficient": 6, "unitId": 2, "unitOrder": 1, "volume": "0.15", "volumeInPackaging": "0.29", "volumeInPackagingUnitId": 5, "volumeUnitId": 5, "weight": 1.5, "weightInPackaging": 1.8, "weightInPackagingUnitId": 3, "weightUnitId": 3, "width": 5, "widthInPackaging": 6, "widthInPackagingUnitId": 4, "widthUnitId": 4}'{ "depth": 0, "depthInPackaging": 0, "depthInPackagingUnitId": 0, "depthUnitId": 0, "diameter": 0, "diameterInPackaging": 0, "diameterInPackagingUnitId": 0, "diameterUnitId": 0, "dimension": "string", "dimensionUnitId": 0, "guid": "string", "height": 0, "heightInPackaging": 0, "heightInPackagingUnitId": 0, "heightUnitId": 0, "id": 0, "isInvisible": true, "productId": 0, "quantityCoefficient": 0, "unit": 0, "unitId": 0, "unitOrder": 0, "volume": "string", "volumeInPackaging": "string", "volumeInPackagingUnitId": 0, "volumeUnitId": 0, "weight": 0, "weightInPackaging": 0, "weightInPackagingUnitId": 0, "weightUnitId": 0, "width": 0, "widthInPackaging": 0, "widthInPackagingUnitId": 0, "widthUnitId": 0}