Edit single product
PUT REST API request that requires a JSON body with authorization token in order to acquire, edit desired product
Request
Request:HTTP Method | PUT | |||||
URL | Stage | https://api.stage.ananastest.com/product/api/v1/merchant-integration/product/id | ||||
Production | https://api.ananas.rs/product/api/v1/merchant-integration/product/id | |||||
URL Parameters |
| |||||
HTTP Headers |
|
Fields name | Type | Description |
packageWeightValue | BigDecimal/Double | Package weight of product |
packageWeightUnit | String | Product weight package unit |
basePrice | BigDecimal/Double | Product price with VAT included |
vat | BigDecimal/Double | Product VAT |
stockLevel | Integer | Product available stock level |
serviceable | boolean | Serviceable flag |
sku | String | SKU value |
Example of request body:
{
"packageWeightValue": 2.55,
"packageWeightUnit": "kg",
"basePrice": 155.3,
"vat": 0,
"stockLevel": 10,
"serviceable": true,
"sku": "00280106"
}
Response Body:
Fields name | Type | Description |
grantType | String | Always “CLIENT_CREDENTIALS” |
clientId | String | Received via Merchant Portal |
clientSecret | String | Received via Merchant Portal |
scope | String | Always “public_api/full_access” |
Example of request body:
{
"packageWeightValue": 2.55,
"packageWeightUnit": "kg",
"basePrice": 155.3,
"vat": 0,
"stockLevel": 10,
"serviceable": true,
"sku": “00280106”
}
Response
If the product with the ID does not exist, the endpoint will return a status of 404. Otherwise, it returns status 200 with the corresponding message
Response Body:Fields name | Type | Description |
status | String | Action status. Values: “SUCCESS” or “FAIL” |
errors | Array of string | Errors if action failed |
myProductId | Long | Product id |
Example of response:
{
"status": "SUCCESS",
"errors": [],
"myProductId": 1770663
}