The related operation for creating inventory measures is described.
Details of the request:
- Base URL: {host}/AFLSAPI/
- URI: /api/inventory/measure
-
Type: POST
-
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/measure
Parameters:
Name | Data type | Obligatory | Description |
---|---|---|---|
Description | String | Yes | Description of the measure |
isActive | Boolean | Yes | Status of the measure |
Name | String | Yes | Measure Name |
Body of the petition:
The request consists of a JSON object. Example:
{
"description": "Metros",
"isActive": true,
"name": "Metros"
}
Answer:
As an answer, a JSON object is obtained, with the following information:
{
"description": "Metros",
"isActive": true,
"name": "Metros",
"uniqueCode": 1
}
Error messages:
Code | HTTP status | Error Message |
---|---|---|
400 | BadRequest | UniqueCode is mandatory. |
400 | BadRequest | Other measure exist with the same name. |
400 | BadRequest | No information found. |
500 | Internal Server Error | FailureLogin |