Skip to main content

API: operations

General conventions in How the API works.

The operations (sites) of the key's account. Read only: creating, editing or deleting operations is done in the app. An operation from another account returns 404.

EndpointPermission
GET /api/v1/operationsoperations:read
GET /api/v1/operations/:idoperations:read

:id is the operation's id or name (see References).

The operation​

{
"id": "00000000-0000-7000-8000-0000000000a2",
"name": "TEST INGENIERÍA",
"isActive": true,
"createdAt": "2026-09-28T14:44:53.060Z",
"updatedAt": "2026-09-28T14:44:53.060Z"
}
FieldTypeDescription
iduuidOperation id. It is the id of the operation reference in devices, deliveries, returns and recharges, and the operationId of their filters.
namestringSite name.
isActiveboolean
createdAt / updatedAtISO 8601 UTC

List operations​

GET /api/v1/operations

Permission: operations:read.

QueryTypeRequiredDefaultLimits / values
pageintegerno1≥ 1
pageSizeintegerno501–200
sortByenumnocreatedAtcreatedAt, name
sortOrderenumnodescasc, desc
searchstringno—Max 100. Case-insensitive "contains" on the name.
isActivebooleanno— (all)true / false

Example​

curl 'https://back.inssacs.com/api/v1/operations?isActive=true&sortBy=name&sortOrder=asc' \
-H 'x-api-key: ics_a1b2c3d4_e5f6...'

Response 200​

{
"data": [
{
"id": "00000000-0000-7000-8000-0000000000a2",
"name": "TEST INGENIERÍA",
"isActive": true,
"createdAt": "2026-09-28T14:44:53.060Z",
"updatedAt": "2026-09-28T14:44:53.060Z"
}
],
"pagination": { "page": 1, "pageSize": 50, "total": 1 }
}

Get an operation​

GET /api/v1/operations/:id

Permission: operations:read.

Path paramTypeDescription
idstringOperation id or name (ignoring case and repeated spaces).

Response 200: the operation.

Errors​

HTTPcodeWhen
401http.unauthorizedThe key is missing, invalid, revoked or expired.
403http.forbiddenThe key lacks operations:read.
404operations.not_found(:id) No operation with that id or name in the account (does not exist, was deleted or belongs to another account).
422validation.failedInvalid query: sortBy outside the enum, pageSize above 200, unknown parameter.
429http.too_many_requestsThe key's rate limit was exceeded.