Skip to main content
Version: 1.0

Locations

Create, list, retrieve, update, and deactivate locations.

  • Base path: /api/integrations/v1/locations/
  • Required scope: integrations.locations.{read|write|delete}
  • Identifier: code (see Identifiers)

Create location

POST /api/integrations/v1/locations/

Body

FieldTypeRequiredDescription
codestringYesUnique location code (e.g. A-101)
namestringNoHuman-readable name
zonestringNoZone identifier
aislestringNoAisle identifier
metadataobjectNoArbitrary metadata
curl -X POST https://<your-tenant>.datamingle.ai/api/integrations/v1/locations/ \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{"code": "A-103", "name": "Aisle A, Shelf 103", "zone": "A", "aisle": "1"}'

Response 201 Created

{
"success": true,
"data": {
"id": "...",
"code": "A-103",
"name": "Aisle A, Shelf 103",
"zone": "A",
"aisle": "1",
"is_active": true
}
}

Errors

StatusCodeWhen
400VALIDATION_ERRORMissing code
422MAPPING_ERRORMapping engine failed
409DUPLICATEA location with that code exists

List locations

GET /api/integrations/v1/locations/

Returns up to 100 active locations. See Pagination.

curl https://<your-tenant>.datamingle.ai/api/integrations/v1/locations/ \
-H "X-API-Key: sk_live_..."
{
"success": true,
"data": [
{"code": "A-101", "name": "Aisle A, Shelf 101", "zone": "A", "aisle": "1", "is_active": true}
]
}

Get location

GET /api/integrations/v1/locations/{code}/

curl https://<your-tenant>.datamingle.ai/api/integrations/v1/locations/A-101/ \
-H "X-API-Key: sk_live_..."

Returns the full record (same shape as Create). Returns 404 NOT_FOUND if the code doesn't exist.


Update location

PUT /api/integrations/v1/locations/{code}/

FieldType
namestring
zonestring
aislestring
metadataobject
is_activeboolean
curl -X PUT https://<your-tenant>.datamingle.ai/api/integrations/v1/locations/A-101/ \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{"name": "Aisle A, Shelf 101 (Renovated)", "zone": "A-NEW"}'

Deactivate location

DELETE /api/integrations/v1/locations/{code}/

Soft delete — sets is_active = false. The record stays in the database.

curl -X DELETE https://<your-tenant>.datamingle.ai/api/integrations/v1/locations/A-101/ \
-H "X-API-Key: sk_live_..."
{
"success": true,
"data": {"id": "...", "code": "A-101", "is_active": false}
}