The Get Locations API retrieves all available locations configured in the Multi Location Products plugin.
This endpoint is useful for external systems (WMS, POS, ERP) to map location IDs and slugs before syncing inventory or pricing.
Endpoint
GET
/mulopimfwc/v1/locations
Headers
| Key | Value |
|---|---|
| X-API-Key | your-api-key-here |
🔐 The
X-API-Keyis required for authentication. Requests without a valid API key will be rejected. Please set up the API first by following the documentation.
Request Parameters
None
Success Response
HTTP 200 OK
{
"success": true,
"count": 3,
"data": [
{
"id": 5,
"slug": "main-store",
"name": "Main Store",
"description": "Our primary retail location"
},
{
"id": 6,
"slug": "warehouse",
"name": "Warehouse",
"description": "Distribution center"
}
]
}
Response Fields
| Field | Description |
|---|---|
| success | Indicates whether the request was successful |
| count | Total number of locations returned |
| data | Array of location objects |
| id | Unique location ID |
| slug | URL-friendly unique location identifier |
| name | Location name |
| description | Location description (optional) |
Error Responses
| HTTP Code | Reason |
|---|---|
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions |
| 500 | Internal server error |
Usage Notes
- Use this endpoint to retrieve location IDs and slugs before inventory synchronization.
- Location IDs are recommended for faster processing in bulk operations.
- Supports unlimited locations.
- Cached internally for optimal performance.