Location
Warehouses and stock locations used on inventory transactions.
Path Parameter:
:CODE (string) — the location code in the URL pathEndpoints
GET
/locationList locations with pagination and filters
GET
/location/:CODEGet a single location by code
POST
/locationCreate a new location
PUT
/location/:CODEUpdate a location by code
DELETE
/location/:CODEDelete a location by code
Fields
| Field | Type | Required | Notes |
|---|---|---|---|
| code | string | Yes | Location / warehouse code. Proven: "WH-MAIN". |
| description | string | Yes | Location name. Proven: "Main Warehouse". |
| description2 | string | No | Secondary description. |
| address1 – address4 | string | No | Street address lines. |
| postcode | string | No | Postcode. |
| city | string | No | City. Proven: "Kuala Lumpur". |
| state | string | No | State / province. |
| country | string | No | Country code or name. |
| attention | string | No | Contact person. |
| phone1 | string | No | Primary phone. Proven: "03-12345678". |
| phone2 | string | No | Secondary phone. |
| fax1 / fax2 | string | No | Fax numbers. |
| string | No | Email address. | |
| project | string | No | Project code. Read from GET /project → data[].code. |
| isactive | boolean | No | Active flag. |
| attachments | string | No | File attachment reference. |
| note | string | No | Additional notes. |
Examples
POST — Create Location
POST /location
{
"code": "WH-MAIN",
"description": "Main Warehouse"
}GET — List Locations
GET /location?offset=0