WinShopAPI docs
ReferenceProduct

Create a supplier code

Adds a supplier's own code for this product and returns it (201, `Location` header set). Requires `Permissions.Product.Create`.

POST
/api/products/{productId}/suppliers-product-code

Authorization

Bearer
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.

Path Parameters

productId*integer
Formatint32

Request Body

application/json
  1. body

The code one supplier uses for a product.

allowedWarehouseId?|
Formatint32
colorId?|
Formatint32
createdAt?|
Formatdate-time
dimensionId?|
Formatint32
id?|
Formatint32
isInvalid?boolean|null
lastModify?|
Formatdate-time
lengthId?|
Formatint32
price?|
Formatdecimal
priceCoefficient?|
Formatdecimal
productId?|
Formatint32
quantityCoefficient?|
Formatdecimal
sizeId?|
Formatint32
supplierId?|
Formatint32
supplierProductCode?|
Lengthlength <= 50
unitId?|
Formatint32
userId?|
Formatint32
variantId?|
Formatint32

Response Body

application/json
  1. response

The code one supplier uses for a product.

allowedWarehouseId?|
Formatint32
colorId?|
Formatint32
createdAt?|
Formatdate-time
dimensionId?|
Formatint32
id?|
Formatint32
isInvalid?boolean|null
lastModify?|
Formatdate-time
lengthId?|
Formatint32
price?|
Formatdecimal
priceCoefficient?|
Formatdecimal
productId?|
Formatint32
quantityCoefficient?|
Formatdecimal
sizeId?|
Formatint32
supplierId?|
Formatint32
supplierProductCode?|
Lengthlength <= 50
unitId?|
Formatint32
userId?|
Formatint32
variantId?|
Formatint32
curl -X POST 'https://<your-instance>/api/products/0/suppliers-product-code' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{  "isInvalid": false,  "productId": 123,  "supplierId": 10,  "supplierProductCode": "SUP-CODE-001"}'
{  "allowedWarehouseId": 0,  "colorId": 0,  "createdAt": "2019-08-24T14:15:22Z",  "dimensionId": 0,  "id": 0,  "isInvalid": true,  "lastModify": "2019-08-24T14:15:22Z",  "lengthId": 0,  "price": 0,  "priceCoefficient": 0,  "productId": 0,  "quantityCoefficient": 0,  "sizeId": 0,  "supplierId": 0,  "supplierProductCode": "string",  "unitId": 0,  "userId": 0,  "variantId": 0}