Create product
Create a product. Requires a Write key.
POST
/productsAuthorization
AuthorizationBearer token (API key) · headerrequiredOrganization API key.
Request body
requiredapplication/jsonnamestringrequiredpricenumberrequiredPrice in cents
taxCategorystringrequiredAllowed:
8.12.63.80supplierstringcategorystringdeclarationsstringbarcodestringNormalized to lowercase; empty becomes the document id
externalIdstringdepositProductnumberDeposit in cents
depositProductLabelstringdescriptionstringsalePricenumbersalePercentagenumbersalePriceDateFromstring<date-time>salePriceDateTostring<date-time>costPricenumbermarginnumbershowOnScreenbooleanageRestrictionbooleanshowOnScalebooleansaleStopbooleanindexnumberResponses
200Product created
successbooleanrequiredidstringrequired400Bad request
statusCodeintegerrequiredHTTP status code
messagestringrequiredHuman-readable error message
timestampstring<date-time>requiredpathstringrequiredRequest path
403Unauthorized
statusCodeintegerrequiredHTTP status code
messagestringrequiredHuman-readable error message
timestampstring<date-time>requiredpathstringrequiredRequest path
Request
curl -X POST "https://dashboard.scango.ch/api/v1/products" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"price": 0,
"taxCategory": "8.1",
"supplier": "string",
"category": "string",
"declarations": "string",
"barcode": "string",
"externalId": "string",
"depositProduct": 0,
"depositProductLabel": "string",
"description": "string",
"salePrice": 0,
"salePercentage": 0,
"salePriceDateFrom": "2024-01-01T00:00:00Z",
"salePriceDateTo": "2024-01-01T00:00:00Z",
"costPrice": 0,
"margin": 0,
"showOnScreen": true,
"ageRestriction": true,
"showOnScale": true,
"saleStop": true,
"index": 0
}'const response = await fetch("https://dashboard.scango.ch/api/v1/products", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"price": 0,
"taxCategory": "8.1",
"supplier": "string",
"category": "string",
"declarations": "string",
"barcode": "string",
"externalId": "string",
"depositProduct": 0,
"depositProductLabel": "string",
"description": "string",
"salePrice": 0,
"salePercentage": 0,
"salePriceDateFrom": "2024-01-01T00:00:00Z",
"salePriceDateTo": "2024-01-01T00:00:00Z",
"costPrice": 0,
"margin": 0,
"showOnScreen": true,
"ageRestriction": true,
"showOnScale": true,
"saleStop": true,
"index": 0
})
});Response
{
"success": true,
"id": "string"
}{
"statusCode": 0,
"message": "string",
"timestamp": "2024-01-01T00:00:00Z",
"path": "string"
}{
"statusCode": 0,
"message": "string",
"timestamp": "2024-01-01T00:00:00Z",
"path": "string"
}