Delete a Client

DELETE
/v2/clients/{id}

Soft-deletes a descendant client and removes it from the client hierarchy. Only leaf clients can be deleted. If the client still has children, this endpoint returns client_has_children (422); delete its descendants first, from the bottom of the hierarchy upwards.

The authenticated client cannot delete itself. The authenticated client, an unknown or already deleted client, and a client outside your hierarchy all return client_not_found (404).

Requires this feature to be enabled for your account (contact us); otherwise this endpoint responds with 404.

Authorization

Bearer-Auth
headerAuthorizationBearer <token>

Path Parameters

id*string
Formatuuid

Response Body

No Content

Example Request
curl -X DELETE 'https://api.sandbox.squake.earth/v2/clients/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty

Create Travel Data Items

Accepts trip records with nested activities for travel data ingestion. **Request size limit:** A single request may contain a maximum of **50 activities** in total across all trips. For larger data sets, split your payload into batches of up to 50 activities and send each batch as a separate request. Requests exceeding this limit are rejected with a `400` error before any data is persisted. If an activity omits `methodology`, SQUAKE selects the client's configured default methodology for that activity type. Pass `methodology` only when you want to override that default for a specific activity. **Supported activity types:** `car`, `flight`, `hotel`, and `train`. **Monetary values:** Both trips and individual activities accept `amount_in_cents` and `currency`. Use activity-level values to attribute spend to a specific leg; they take precedence over trip-level values in activity-based reporting. When `currency` is present, `amount_in_cents` must be a positive integer. The API does not accept `amount_base_currency`. **Reading the data back:** alongside the flat `items` array, the response returns a `trips` array with the ID of every trip this request persisted and the IDs of the activities written under it. Store those IDs to read, or delete, the stored records later via [`/v2/travel-data/trips`](https://docs.squake.earth/reference/squake/travel-data/get-v2-travel-data-trips) — or address a trip by your own `trip_reference` instead. A `trips` entry reports the trip's identity only; a trip read returns those same fields plus the trip as you described it (name, purpose, status, dates, booking provider, amount, cost center). **On behalf of another client:** pass an optional root-level `client_id` (a client `id` as returned by [`/v2/clients`](https://docs.squake.earth/reference/squake/clients/get-v2-clients)) to store this travel data under a descendant client. Submitting data for another client must be enabled for your account (contact us); omitting `client_id` preserves the existing behavior of ingesting for the authenticated client. Note that CSV imports (`/v2/travel-data/imports`) do not accept `client_id`. **Flight routing:** `flight` activities accept the same methodology-specific fields as the corresponding `/v2/calculations` flight schemas, including `routing` for multi-leg itineraries (a hyphen-separated airport chain, e.g. `BER-FRA-JFK`) as an alternative to `origin`/`destination`. Exactly one of `routing` or the `origin`/`destination` pair must be provided; `routing` only applies to `flight` activities.

Retrieve a Client

Returns a single visible client by `id` (the authenticated client or one of its descendants). Clients outside your hierarchy are indistinguishable from missing ones: both return `client_not_found` (`404`). Requires this feature to be enabled for your account (contact us); otherwise this endpoint responds with `404`.