Location Types

To distinguish different types of locations, you can use location types. For example, based on the size of the location, or special locations for best sellers.

Attributes

Name Type Required Description
idlocation_type integer generated Unique identifier for the location type
name string required Name of the location type
default boolean generated Indicates whether this location type is the default type
color string required Color code for the location type (e.g., "#FF0000")

Get all location types

Retrieve a list of all location types.

GET https://example.com/api/v1/locationtypes
HTTP/1.1 200 OK [ { "idlocation_type": 1, "name": "Standard", "default": true, "color": "#1E90FF" }, { "idlocation_type": 2, "name": "Bulk Storage", "default": false, "color": "#32CD32" }, { "idlocation_type": 3, "name": "Picking", "default": false, "color": "#FFA500" } ]

Get single location type

Retrieve details of a specific location type by its ID.

GET https://example.com/api/v1/locationtypes/{id}
HTTP/1.1 200 OK { "idlocation_type": 2, "name": "Bulk Storage", "default": false, "color": "#32CD32" }

Create a location type

Create a new location type. Only the listed fields can be provided; other fields like idlocation_type and default are automatically generated by the system.

Attributes

Name Type Required Description
name string required Name of the location type
color string required Color code for the location type (e.g., "#FF0000")
POST https://example.com/api/v1/locationtypes
{ "name": "High Security", "color": "#FF0000" }
HTTP/1.1 201 Created { "idlocation_type": 4, "name": "High Security", "default": false, "color": "#FF0000" }

Update a location type

Update an existing location type. Only the listed fields can be modified.

Attributes

Name Type Required Description
name string optional Name of the location type
color string optional Color code for the location type (e.g., "#FF0000")
PUT https://example.com/api/v1/locationtypes/{id}
{ "name": "Secure Storage", "color": "#FF5733" }
HTTP/1.1 200 OK { "idlocation_type": 4, "name": "Secure Storage", "default": false, "color": "#FF5733" }

Delete a location type

Delete a specific location type by its ID. Note that you cannot delete a location type that is set as default or is still in use by locations in the warehouse.

DELETE https://example.com/api/v1/locationtypes/{id}
HTTP/1.1 204 No Content

Set as default

Set a location type as the default. This will unset any previously set default location type. No request body is required.

POST https://example.com/api/v1/locationtypes/{id}/default
HTTP/1.1 200 OK { "idlocation_type": 3, "name": "Picking", "default": true, "color": "#FFA500" }
Read more Tags