The related operation for creating inventory bins is described.
Details of the request:
- Base URL: {host}/AFLSAPI/
- URI: /api/inventory/location
-
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/location
Parameters:
Name | Data type | Obligatory | Description |
---|---|---|---|
addlAddressInfo | String | No | Additional Address Information |
address | String | No | Headquarters address (Required for LocationTypeId = 1) |
contactMail | String | No | Contact email |
contactName | String | No | Contact Name |
contactPhone | String | No | Contact telephone number |
Description | String | Yes | Description of the venue |
isActive | Boolean | Yes | Headquarters Status |
isDefault | Boolean | Yes | Default Headquarters |
Latitude | number | No | Contact Address Latitude (Required for LocationTypeId = 1) |
locationCategoryId | Integer | Yes | Category ID Headquarters(1 - Building, 2 - Warehouse, 3 - Warehouse) Transport(4 - Vehicle, 5 - Truck) |
locationTypeId | Integer | Yes | Location Type Id (1 - Venue, 2 - Transportation) |
Longitude | number | No | Contact Address Length (Required for LocationTypeId = 1) |
Name | String | Yes | Name for LocationTypeId = 1 or License Plate for LocationTypeId = 2 |
parentId | Integer | Yes | Checking its use always goes in 4 |
Body of the petition:
The request consists of a JSON object. Example:
{
"addlAddressInfo": "Piso 7",
"address": "Floresta Outlet, Carrera 69, Santa Rosa, 11121 Suba, Distrito Capital, Colombia",
"contactMail": "tati_4@pruebas.com",
"contactName": "PRUEBAS",
"contactPhone": "3016153272",
"description": "Sede Norte",
"isActive": true,
"isDefault": true,
"latitude": 4.69191580000000,
"locationCategoryId": 3,
"locationTypeId": 1,
"longitude": -74.07453940000000,
"name": "Sede Norte",
"parentId": 4
}
Answer:
As an answer, a JSON object is obtained, with the following information:
{
"addlAddressInfo": "Piso 7",
"address": "Floresta Outlet, Carrera 69, Santa Rosa, 11121 Suba, Distrito Capital, Colombia",
"contactMail": "tati_4@pruebas.com",
"contactName": "PRUEBAS",
"contactPhone": "3016153272",
"description": "Sede Norte",
"id": 1,
"isActive": true,
"isDefault": true,
"latitude": 4.69191580000000,
"locationCategoryId": 3,
"locationTypeId": 1,
"longitude": -74.07453940000000,
"name": "Sede Norte",
"parentId": 4
}
Error messages:
Code | HTTP status | Error Message |
---|---|---|
400 | BadRequest | Address is required. |
400 | BadRequest | Latitude is required. |
400 | BadRequest | Longitude is required. |
400 | BadRequest | Maxlength of Name exceeded. |
400 | BadRequest | LocationCategoryId invalid. |
400 | BadRequest | Address is not required. |
400 | BadRequest | AddlAddressInfo is not required. |
400 | BadRequest | Latitude is not required. |
400 | BadRequest | Longitude is not required. |
400 | BadRequest | Other location exist with the same name. |
400 | BadRequest | No information found. |
500 | Internal Server Error | FailureLogin |