Link Entities by Filters
Link Entities by Filters
Bulk-link all entities matching a filter query to a project in a single operation
POST
Link Entities by Filters
Link Entities by Filters
Link all entities that match a given filter to a project — without needing to enumerate individual IDs. This is the most efficient way to associate large historical datasets or ongoing data streams to a project. The operation is idempotent: entities already linked are skipped, so it is safe to call repeatedly with the same filters.New API: This endpoint is part of the new API architecture.
Request
Headers
Your API key for authenticationExample:
sk_live_1234567890abcdefYour organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faPath Parameters
The UUID of the project to link entities toExample:
b7f2a1c3-4d5e-6f7a-8b9c-0d1e2f3a4b5cBody Parameters
The type of entities to link. Determines which filter fields are valid.Available values:
logistic_requests, logistic_recharges, logistic_packages, invoices, file_readingsFilter criteria for selecting entities. The valid fields depend on
entity_type — see the tables below.Pass an empty object {} to link all entities of the given type to the project.Filter Fields by Entity Type
logistic_requests
logistic_requests
| Field | Type | Description |
|---|---|---|
search | string | Search across movement ID and stretch ID |
clients | array[string] | Filter by client name(s) |
trip_date_from | string (YYYY-MM-DD) | Filter by trip date >= |
trip_date_until | string (YYYY-MM-DD) | Filter by trip date <= |
vehicle_type | array[string] | Filter by vehicle type(s) |
uploaded_by | array[string (UUID)] | Filter by uploader user ID(s) |
file_id | array[string (UUID)] | Filter by source file ID(s) |
created_at_from | string (YYYY-MM-DD) | Filter by creation date >= |
created_at_to | string (YYYY-MM-DD) | Filter by creation date <= |
logistic_recharges
logistic_recharges
| Field | Type | Description |
|---|---|---|
vehicle_type | array[string] | Filter by vehicle type(s) |
fuel_id | array[string (UUID)] | Filter by fuel ID(s) |
vehicle_license_plate | array[string] | Filter by license plate(s) |
file_id | array[string (UUID)] | Filter by source file ID(s) |
date_from | string (YYYY-MM-DD) | Filter by recharge date >= |
date_until | string (YYYY-MM-DD) | Filter by recharge date <= |
created_at_from | string (YYYY-MM-DD) | Filter by creation date >= |
created_at_to | string (YYYY-MM-DD) | Filter by creation date <= |
logistic_packages
logistic_packages
| Field | Type | Description |
|---|---|---|
created_at_from | string (YYYY-MM-DD) | Filter by creation date >= |
created_at_to | string (YYYY-MM-DD) | Filter by creation date <= |
invoices
invoices
| Field | Type | Description |
|---|---|---|
types | array[string] | Filter by invoice type(s) |
statuses | array[string] | Filter by invoice status(es) |
facility_ids | array[string (UUID)] | Filter by facility ID(s) |
start_date | string (YYYY-MM-DD) | Filter by invoice date >= |
end_date | string (YYYY-MM-DD) | Filter by invoice date <= |
file_readings
file_readings
| Field | Type | Description |
|---|---|---|
linked | boolean | true = only already-linked readings; false = only unlinked readings |
Response
Number of new links created
Number of entities that were already linked (skipped)
Examples
Successful Response
Common Errors
404 Not Found
Cause: Project not found or doesn’t belong to your organization422 Invalid Filters
Cause: An unknown filter key was passed for the givenentity_type
entity_type above. Only the listed fields are accepted — extra keys are rejected.
Related Endpoints
Link Entities
Link specific entities by ID
Unlink Entities
Remove entity-project associations

