Ziwako Docs
ZiwakoRéférence APIProducts

Decrement Product Stock

PUT
/products/{id}/stock/decrement

Authorization

X-API-Key<token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/products/string/stock/decrement" \  -H "Content-Type: application/json" \  -d '{    "quantity": 0  }'
{  "type": "success",  "code": "string",  "status": 0,  "message": "string",  "data": {    "id": "string",    "name": "string",    "featuredPicture": {},    "pictures": [      {        "Key": "string",        "Bucket": "string",        "Location": "string",        "public": "string"      }    ],    "description": "string",    "productType": "string",    "attributes": {      "specifications": {},      "pricing": {        "amount": 29.99,        "currency": "USD",        "pricingType": "buy",        "frequency": "monthly",        "promotion": 10,        "negotiable": false      },      "attachedServices": [        {}      ],      "condition": "new",      "conditionDetails": "string",      "warranty": {        "hasWarranty": true,        "duration": 0,        "type": "seller",        "durationType": "days",        "description": "string",        "terms": "string"      },      "stock": {        "available": 0,        "sku": "string",        "location": "string"      },      "shipping": {        "weightKg": 0,        "dimensions": {          "length": 0,          "width": 0,          "height": 0        },        "isDeliveryFree": true      },      "legal": {        "ageRestriction": 0,        "certifications": [          "string"        ]      },      "digital": {        "format": "physical",        "deliveryMethod": "download",        "downloadUrl": "string",        "fileSize": 0,        "fileFormat": "string",        "accessDuration": 0,        "downloadLimit": 0,        "licenseKey": "string",        "serialNumber": "string",        "activationInstructions": "string",        "systemRequirements": {          "os": [            "string"          ],          "processor": "string",          "memory": "string",          "storage": "string",          "graphics": "string",          "network": true        },        "features": [          "string"        ],        "supportedPlatforms": [          "string"        ]      },      "booking": {        "allowInstallments": true,        "maxInstallments": 0      }    },    "metadata": {      "isArchived": true,      "archivedAt": "2019-08-24T14:15:22Z",      "status": "draft"    },    "owner": {},    "createdAt": {},    "updatedAt": {},    "productNumber": "string",    "video": {      "uid": "string",      "status": "pending",      "duration": 0,      "size": 0,      "thumbnail": "string",      "playbackUrl": "string",      "iframeUrl": "string",      "error": "string"    }  }}