The related operation for updating inventory products is described.
Details of the request:
- Base URL: {host}/AFLSAPI/
- URI: /api/inventory/product/{Id}
-
Type: PUT
-
Required headings:
- Content-Type: application/json
- X-Authorization: Bearer {Token}
URL Description
- {host}: It represents the domain of the environment in which the API is located.
- AFLSAPI/: Fixed API prefix.
- URI: Specific endpoint for the request.
⚐ EXAMPLE URL:
https://{host}/AFLSAPI/api/inventory/product/{Id}
Parameters:
Name | Data type | Obligatory | Description |
---|---|---|---|
Id | Integer | Yes | Product Identifier |
Cost | number | Yes | Product Cost |
Description | String | Yes | Product Description |
isActive | Boolean | Yes | Product Condition |
measureId | Integer | Yes | Measure Identifier |
minimuAmount | Integer | Yes | Minimum available quantity of product, minimum 1 |
Name | String | Yes | Product Name |
sku | String | Yes | Unique Product Code |
typeProduct | Integer | Yes | Product Type (0 - Quantity, 1 - Unique Code) |
Body of the petition:
The request consists of a JSON object. Example:
{
"cost": 1000,
"description": "Cable 20 Actualizado",
"isActive": true,
"measureId": 1,
"minimuAmount": 2,
"name": "Cable Coaxial",
"sku": "C001",
"typeProduct": 0
}
Answer:
As an answer, a JSON object is obtained, with the following information:
{
"cost": 1000,
"description": "Cable 20 Actualizado",
"id": 1
"isActive": true,
"measureId": 1,
"minimuAmount": 2,
"name": "Cable Coaxial",
"sku": "C001",
"typeProduct": 0
}
Error messages:
Code | HTTP status | Error Message |
---|---|---|
400 | BadRequest | MeasureId not found. |
400 | BadRequest | MeasureId is inactive. |
400 | BadRequest | Other product exist with the same name. |
400 | BadRequest | Other product exist with the same Sku. |
400 | BadRequest | Id is mandatory. |
400 | BadRequest | No information found. |
500 | Internal Server Error | FailureLogin |